This commit is contained in:
Leijurv 2022-07-14 21:44:42 -07:00
parent 5c7cae9ab0
commit 5c9aeab6b4
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -102,7 +102,7 @@ public interface MovementHelper extends ActionCosts, Helper {
static boolean canWalkThrough(BlockStateInterface bsi, int x, int y, int z, IBlockState state) { static boolean canWalkThrough(BlockStateInterface bsi, int x, int y, int z, IBlockState state) {
Optional<Boolean> canWalkThrough = canWalkThroughBlockState(state); Optional<Boolean> canWalkThrough = canWalkThroughBlockState(state);
if (canWalkThrough.isPresent()) { if (canWalkThrough.isPresent()) { // note: don't replace this with the functional style, because the lambda is impure (it captures local variables as context), meaning it allocates
return canWalkThrough.get(); return canWalkThrough.get();
} }
return canWalkThroughPosition(bsi, x, y, z, state); return canWalkThroughPosition(bsi, x, y, z, state);