From 339111b0977fe201689f947c3afdfd05acab320b Mon Sep 17 00:00:00 2001 From: mrmangohands Date: Tue, 5 Jan 2021 11:15:17 -0800 Subject: [PATCH] fix: Use 1.16.1 behavior for pathfinding near lava Fixes the half of lithium 185 that wasn't addressed by e3de204 --- .../mods/lithium/common/ai/pathing/PathNodeDefaults.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/jellysquid/mods/lithium/common/ai/pathing/PathNodeDefaults.java b/src/main/java/me/jellysquid/mods/lithium/common/ai/pathing/PathNodeDefaults.java index 83badbb28..efbf8ccd7 100644 --- a/src/main/java/me/jellysquid/mods/lithium/common/ai/pathing/PathNodeDefaults.java +++ b/src/main/java/me/jellysquid/mods/lithium/common/ai/pathing/PathNodeDefaults.java @@ -22,6 +22,8 @@ public static PathNodeType getNeighborNodeType(BlockState state) { return PathNodeType.DANGER_FIRE; } else if (state.getFluidState().isIn(FluidTags.WATER)) { return PathNodeType.WATER_BORDER; + } else if (state.getFluidState().isIn(FluidTags.LAVA)) { + return PathNodeType.LAVA; } else { return PathNodeType.OPEN; } @@ -96,6 +98,6 @@ public static PathNodeType getNodeType(BlockState state) { } private static boolean isFireDangerSource(BlockState blockState) { - return blockState.isIn(BlockTags.FIRE) || blockState.isOf(Blocks.LAVA) || blockState.isOf(Blocks.MAGMA_BLOCK) || CampfireBlock.isLitCampfire(blockState); + return blockState.isIn(BlockTags.FIRE) || blockState.isOf(Blocks.MAGMA_BLOCK) || CampfireBlock.isLitCampfire(blockState); } }