From 40a3177ae70772881b5b995bff5167281e8035bc Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 26 Sep 2018 13:05:36 -0700 Subject: [PATCH] no need to get that twice --- .../pathing/movement/movements/MovementDescend.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/movements/MovementDescend.java b/src/main/java/baritone/pathing/movement/movements/MovementDescend.java index b8c6bc43..79d5a305 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementDescend.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementDescend.java @@ -65,7 +65,8 @@ public class MovementDescend extends Movement { } double totalCost = 0; - totalCost += MovementHelper.getMiningDurationTicks(context, destX, y - 1, destZ, false); + IBlockState destDown = BlockStateInterface.get(destX, y - 1, destZ); + totalCost += MovementHelper.getMiningDurationTicks(context, destX, y - 1, destZ, destDown, false); if (totalCost >= COST_INF) { return IMPOSSIBLE; } @@ -93,8 +94,7 @@ public class MovementDescend extends Movement { return dynamicFallCost(context, x, y, z, destX, destZ, totalCost, below); } - Block tmp1 = BlockStateInterface.get(destX, y - 1, destZ).getBlock(); - if (tmp1 == Blocks.LADDER || tmp1 == Blocks.VINE) { + if (destDown.getBlock() == Blocks.LADDER || destDown.getBlock() == Blocks.VINE) { return IMPOSSIBLE; }