From 9da3e0906235dedc124b08efd02538f331b9e57c Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 27 Aug 2021 19:01:31 -0700 Subject: [PATCH] snow sucks --- .../java/baritone/builder/BlockStateCachedDataBuilder.java | 2 +- .../baritone/builder/mc/BlockStatePropertiesExtractor.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/baritone/builder/BlockStateCachedDataBuilder.java b/src/main/java/baritone/builder/BlockStateCachedDataBuilder.java index 7c9d4cf59..119921b2b 100644 --- a/src/main/java/baritone/builder/BlockStateCachedDataBuilder.java +++ b/src/main/java/baritone/builder/BlockStateCachedDataBuilder.java @@ -263,7 +263,7 @@ public class BlockStateCachedDataBuilder { if ((playerMustBeHorizontalFacingInOrderToPlaceMe != null || playerMustBeEntityFacingInOrderToPlaceMe != null) && mustBePlacedAgainst == null) { throw new IllegalStateException(); } - if (collisionHeightBlips != null && (collisionHeightBlips > Blip.FULL_BLOCK + Blip.HALF_BLOCK || collisionHeightBlips <= 0)) { // playerphysics assumes this is never true + if (collisionHeightBlips != null && (collisionHeightBlips > Blip.FULL_BLOCK + Blip.HALF_BLOCK || collisionHeightBlips < 0)) { // playerphysics assumes this is never true throw new IllegalStateException(); } if (collidesWithPlayer ^ collisionHeightBlips != null) { diff --git a/src/main/java/baritone/builder/mc/BlockStatePropertiesExtractor.java b/src/main/java/baritone/builder/mc/BlockStatePropertiesExtractor.java index a47865a40..1d5fe822a 100644 --- a/src/main/java/baritone/builder/mc/BlockStatePropertiesExtractor.java +++ b/src/main/java/baritone/builder/mc/BlockStatePropertiesExtractor.java @@ -195,7 +195,6 @@ public class BlockStatePropertiesExtractor { if (block instanceof BlockBush // includes crops || block instanceof BlockReed || block instanceof BlockTorch - || (block instanceof BlockSnow && state.getValue(BlockSnow.LAYERS) == 1) //|| block instanceof BlockSign || block instanceof BlockRedstoneWire || block instanceof BlockRailBase @@ -275,10 +274,8 @@ public class BlockStatePropertiesExtractor { if (block instanceof BlockSnow) { fullyUnderstood = true; - if (state.getValue(BlockSnow.LAYERS) > 1) { // collidesWithPlayer false from earlier - builder.fullyWalkableTop().collisionHeight(0.125 * (state.getValue(BlockSnow.LAYERS) - 1)); - // funny - if you have snow layers packed 8 high, it only supports the player to a height of 0.875, but it still counts as "isTopSolid" for placing stuff like torches on it - } + builder.fullyWalkableTop().collisionHeight(0.125 * (state.getValue(BlockSnow.LAYERS) - 1)); + // funny - if you have snow layers packed 8 high, it only supports the player to a height of 0.875, but it still counts as "isTopSolid" for placing stuff like torches on it } if (block instanceof BlockSoulSand) {