diff --git a/plugins/generator-1.19.4/forge-1.19.4/aitasks/attack_fly.java.ftl b/plugins/generator-1.19.4/forge-1.19.4/aitasks/attack_fly.java.ftl index 664db27da43..4199f2337af 100644 --- a/plugins/generator-1.19.4/forge-1.19.4/aitasks/attack_fly.java.ftl +++ b/plugins/generator-1.19.4/forge-1.19.4/aitasks/attack_fly.java.ftl @@ -17,6 +17,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true; } else { @@ -30,6 +31,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> && ${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive(); diff --git a/plugins/generator-1.20.1/forge-1.20.1/aitasks/attack_fly.java.ftl b/plugins/generator-1.20.1/forge-1.20.1/aitasks/attack_fly.java.ftl index 664db27da43..4199f2337af 100644 --- a/plugins/generator-1.20.1/forge-1.20.1/aitasks/attack_fly.java.ftl +++ b/plugins/generator-1.20.1/forge-1.20.1/aitasks/attack_fly.java.ftl @@ -17,6 +17,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true; } else { @@ -30,6 +31,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> && ${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive(); diff --git a/plugins/generator-reference-1.20.1/ref-forge-1.20.1/aitasks/attack_fly.java.ftl b/plugins/generator-reference-1.20.1/ref-forge-1.20.1/aitasks/attack_fly.java.ftl index 664db27da43..4199f2337af 100644 --- a/plugins/generator-reference-1.20.1/ref-forge-1.20.1/aitasks/attack_fly.java.ftl +++ b/plugins/generator-reference-1.20.1/ref-forge-1.20.1/aitasks/attack_fly.java.ftl @@ -17,6 +17,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true; } else { @@ -30,6 +31,7 @@ this.goalSelector.addGoal(${cbi+1}, new Goal() { double y = ${name}Entity.this.getY(); double z = ${name}Entity.this.getZ(); Entity entity = ${name}Entity.this; + Level world = ${name}Entity.this.level(); return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> && ${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive();