From 7888dd24e5ae388b8c4dea046fe221e1f0cfb071 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sat, 22 Sep 2018 11:23:26 -0700 Subject: [PATCH] comments --- src/main/java/baritone/pathing/movement/MovementHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index 8e0f4651..8c3ad4f4 100644 --- a/src/main/java/baritone/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/pathing/movement/MovementHelper.java @@ -82,7 +82,7 @@ public interface MovementHelper extends ActionCosts, Helper { static boolean canWalkThrough(int x, int y, int z, IBlockState state) { Block block = state.getBlock(); - if (block == Blocks.AIR) { + if (block == Blocks.AIR) { // early return for most common case return true; } if (block == Blocks.FIRE || block == Blocks.TRIPWIRE || block == Blocks.WEB || block == Blocks.END_PORTAL) { @@ -143,7 +143,7 @@ public interface MovementHelper extends ActionCosts, Helper { static boolean fullyPassable(IBlockState state) { Block block = state.getBlock(); - if (block == Blocks.AIR) { + if (block == Blocks.AIR) { // early return for most common case return true; } // exceptions - blocks that are isPassable true, but we can't actually jump through @@ -250,6 +250,8 @@ public interface MovementHelper extends ActionCosts, Helper { static boolean canWalkOn(int x, int y, int z, IBlockState state) { Block block = state.getBlock(); if (block == Blocks.AIR || block == Blocks.MAGMA) { + // early return for most common case (air) + // plus magma, which is a normal cube but it hurts you return false; } if (state.isBlockNormalCube()) {