snow sucks

This commit is contained in:
Leijurv
2021-08-27 19:01:31 -07:00
parent 9fce9ef5e3
commit 9da3e09062
2 changed files with 3 additions and 6 deletions

View File

@@ -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) {

View File

@@ -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) {