diff --git a/patches/minecraft/net/minecraft/pathfinding/PathNodeType.java.patch b/patches/minecraft/net/minecraft/pathfinding/PathNodeType.java.patch new file mode 100644 index 0000000000..012842b6d4 --- /dev/null +++ b/patches/minecraft/net/minecraft/pathfinding/PathNodeType.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/pathfinding/PathNodeType.java ++++ b/net/minecraft/pathfinding/PathNodeType.java +@@ -33,4 +33,13 @@ + public float func_186289_a() { + return this.field_186307_r; + } ++ ++ @javax.annotation.Nullable ++ public PathNodeType getDanger() { ++ return (this == DAMAGE_FIRE || this == DANGER_FIRE ) ? DANGER_FIRE : ++ (this == DAMAGE_CACTUS || this == DANGER_CACTUS) ? DANGER_CACTUS : ++ (this == DAMAGE_OTHER || this == DANGER_OTHER ) ? DANGER_OTHER : ++ (this == LAVA) ? DAMAGE_FIRE : ++ null; ++ } + } diff --git a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch index 41d0757a84..f1d47f3df4 100644 --- a/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch +++ b/patches/minecraft/net/minecraft/pathfinding/WalkNodeProcessor.java.patch @@ -14,8 +14,8 @@ - } else { - p_193578_4_ = PathNodeType.DANGER_FIRE; - } -+ PathNodeType type = func_189553_b(p_193578_0_, p_193578_1_, p_193578_2_, p_193578_3_); -+ if (type == PathNodeType.DANGER_CACTUS || type == PathNodeType.DANGER_FIRE || type == PathNodeType.DANGER_OTHER) ++ PathNodeType type = func_189553_b(p_193578_0_, p_193578_1_ + i, p_193578_2_ + j, p_193578_3_ + k).getDanger(); ++ if (type != null) + p_193578_4_ = type; } } diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java index 52b57001a8..a4b76b7380 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java @@ -882,7 +882,7 @@ public interface IForgeBlock @Nullable default PathNodeType getAiPathNodeType(BlockState state, IBlockReader world, BlockPos pos, @Nullable MobEntity entity) { - return state.isBurning(world, pos) ? PathNodeType.DANGER_FIRE : null; + return state.getBlock() == Blocks.LAVA ? PathNodeType.LAVA : state.isBurning(world, pos) ? PathNodeType.DAMAGE_FIRE : null; } /**