From 1bfabdf66bc1bfb559d6d30e5dd6438d3665a2fe Mon Sep 17 00:00:00 2001 From: Brady Date: Thu, 2 Aug 2018 10:56:26 -0700 Subject: [PATCH] Fix possible NPE warning --- .../java/baritone/bot/pathing/action/ActionWorldHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/bot/pathing/action/ActionWorldHelper.java b/src/main/java/baritone/bot/pathing/action/ActionWorldHelper.java index c28fe82d5..574dec07c 100644 --- a/src/main/java/baritone/bot/pathing/action/ActionWorldHelper.java +++ b/src/main/java/baritone/bot/pathing/action/ActionWorldHelper.java @@ -55,7 +55,7 @@ public interface ActionWorldHelper extends ActionCosts { static boolean avoidBreaking(BlockPos pos) { Block b = BlockStateInterface.get(pos).getBlock(); Block below = BlockStateInterface.get(new BlockPos(pos.getX(), pos.getY() - 1, pos.getZ())).getBlock(); - return Block.getBlockFromName("minecraft:ice").equals(b)//ice becomes water, and water can mess up the path + return Blocks.ICE.equals(b) // ice becomes water, and water can mess up the path || isLiquid(new BlockPos(pos.getX(), pos.getY() + 1, pos.getZ()))//don't break anything touching liquid on any side || isLiquid(new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ())) || isLiquid(new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()))