Skip to content

Commit

Permalink
Fix world dependency misuse by flight attack AI task conditions (MCre…
Browse files Browse the repository at this point in the history
  • Loading branch information
Defeatomizer authored Feb 25, 2024
1 parent c014403 commit e96abb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
</#if>
return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true</#if>;
} else {
Expand All @@ -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();
</#if>
return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> &&</#if>
${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
</#if>
return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true</#if>;
} else {
Expand All @@ -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();
</#if>
return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> &&</#if>
${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
</#if>
return <#if hasProcedure(conditions[0])><@procedureOBJToConditionCode conditions[0]/><#else>true</#if>;
} else {
Expand All @@ -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();
</#if>
return <#if hasProcedure(conditions[1])><@procedureOBJToConditionCode conditions[1]/> &&</#if>
${name}Entity.this.getMoveControl().hasWanted() && ${name}Entity.this.getTarget() != null && ${name}Entity.this.getTarget().isAlive();
Expand Down

0 comments on commit e96abb3

Please sign in to comment.