Skip to content

Commit bef9c54

Browse files
committed
Other fixes
1 parent df2b733 commit bef9c54

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
<#include "aiconditions.java.ftl">
2-
this.goalSelector.addGoal(${cbi+1}, new AvoidEntityGoal<>(this, ${generator.map(field$entity, "entities")}.class, (float)${field$radius}, ${field$farspeed}, ${field$nearspeed})<@conditionCode field$condition/>);
2+
this.goalSelector.addGoal(${cbi+1},
3+
new AvoidEntityGoal(this, ${generator.map(field$entity, "entities")}.class, (float)${field$radius}, ${field$farspeed}, ${field$nearspeed})<@conditionCode field$condition/>);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<#if (data.tameable && data.breedable && (!data.waterMob || data.flyingMob))>
22
<#include "aiconditions.java.ftl">
3-
this.goalSelector.addGoal(${cbi+1}, new FollowOwnerGoal(this, ${field$speed}, (float) ${field$min_distance}, (float) ${field$max_distance}, false)<@conditionCode field$condition/>);
4-
</#if>
3+
this.goalSelector.addGoal(${cbi+1}, new FollowOwnerGoal(this, ${field$speed}, (float) ${field$min_distance}, (float) ${field$max_distance})<@conditionCode field$condition/>);
4+
</#if>

src/main/resources/forge-1.14.4/templates/livingentity/livingentity.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ public class ${name}Entity extends ${extendsClass}Entity <#if interfaces?size gt
880880
}
881881
<#else>
882882
(entityType, world, reason, pos, random) ->
883-
(world.getBlockState(pos).isIn(Blocks.WATER) && world.getBlockState(pos.up()).isIn(Blocks.WATER))
883+
(world.getBlockState(pos) == Blocks.WATER && world.getBlockState(pos.up()) == Blocks.WATER)
884884
</#if>
885885
);
886886
<#elseif data.mobSpawningType == "undergroundWaterCreature">
@@ -895,7 +895,7 @@ public class ${name}Entity extends ${extendsClass}Entity <#if interfaces?size gt
895895
}
896896
<#else>
897897
(entityType, world, reason, pos, random) -> {
898-
return world.getFluidState(pos.down()).isTagged(FluidTags.WATER) && world.getBlockState(pos.up()).isIn(Blocks.WATER) && pos.getY() >= (world.getSeaLevel() - 13) && pos.getY() <= world.getSeaLevel();
898+
return world.getFluidState(pos.down()).isTagged(FluidTags.WATER) && world.getBlockState(pos.up()) == Blocks.WATER && pos.getY() >= (world.getSeaLevel() - 13) && pos.getY() <= world.getSeaLevel();
899899
}
900900
</#if>
901901
);

0 commit comments

Comments
 (0)