From ef28edb526d960e5e27a1531d37ce27cf8e72b33 Mon Sep 17 00:00:00 2001 From: LexManos Date: Mon, 8 Aug 2016 17:32:32 -0700 Subject: [PATCH] Make stair culling use actual state, and be more robust. Closes #3170 --- .../net/minecraft/block/BlockStairs.java.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/BlockStairs.java.patch b/patches/minecraft/net/minecraft/block/BlockStairs.java.patch index ad7d87ac8..c83b6ce0b 100644 --- a/patches/minecraft/net/minecraft/block/BlockStairs.java.patch +++ b/patches/minecraft/net/minecraft/block/BlockStairs.java.patch @@ -1,6 +1,6 @@ --- ../src-base/minecraft/net/minecraft/block/BlockStairs.java +++ ../src-work/minecraft/net/minecraft/block/BlockStairs.java -@@ -445,6 +445,20 @@ +@@ -445,6 +445,28 @@ return new BlockStateContainer(this, new IProperty[] {field_176309_a, field_176308_b, field_176310_M}); } @@ -13,9 +13,17 @@ + if ( state.func_185914_p() ) + return true; + ++ state = this.func_176221_a(state, world, pos); ++ + EnumHalf half = state.func_177229_b(field_176308_b); + EnumFacing side = state.func_177229_b(field_176309_a); -+ return side == face || (half == EnumHalf.TOP && face == EnumFacing.UP) || (half == EnumHalf.BOTTOM && face == EnumFacing.DOWN); ++ EnumShape shape = state.func_177229_b(field_176310_M); ++ if ((half == EnumHalf.TOP && face == EnumFacing.UP) || (half == EnumHalf.BOTTOM && face == EnumFacing.DOWN)) return true; ++ if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) return false; ++ if (face == side) return true; ++ if (shape == EnumShape.INNER_LEFT && face.func_176735_f() == side) return true; ++ if (shape == EnumShape.INNER_RIGHT && face.func_176746_e() == side) return true; ++ return false; + } + public static enum EnumHalf implements IStringSerializable