diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/BlockInfo.java b/src/main/java/net/minecraftforge/client/model/pipeline/BlockInfo.java index 9f2b8fab58..3f01f5a137 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/BlockInfo.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/BlockInfo.java @@ -21,10 +21,12 @@ package net.minecraftforge.client.model.pipeline; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.world.IEnviromentBlockReader; public class BlockInfo @@ -134,7 +136,13 @@ public class BlockInfo } for(Direction side : SIDES) { - if(!state.doesSideBlockRendering(world, blockPos, side)) + BlockPos pos = blockPos.offset(side); + BlockState state = world.getBlockState(pos); + + BlockState thisStateShape = this.state.isSolid() && this.state.func_215691_g() ? this.state : Blocks.AIR.getDefaultState(); + BlockState otherStateShape = state.isSolid() && state.func_215691_g() ? state : Blocks.AIR.getDefaultState(); + + if(state.getOpacity(world, blockPos) == 15 || VoxelShapes.func_223416_b(thisStateShape.func_215702_a(world, blockPos, side), otherStateShape.func_215702_a(world, pos, side.getOpposite()))) { int x = side.getXOffset() + 1; int y = side.getYOffset() + 1; diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java index 85d90fb37a..2c1292f5dc 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java @@ -136,6 +136,7 @@ public interface IForgeBlock return false; } + //TODO: remove in 1.15 /** * Check if the face of a block should block rendering. * @@ -147,7 +148,9 @@ public interface IForgeBlock * @param pos Block position in world * @param face The side to check * @return True if the block is opaque on the specified side. + * @deprecated This is no longer used for rendering logic. */ + @Deprecated default boolean doesSideBlockRendering(BlockState state, IEnviromentBlockReader world, BlockPos pos, Direction face) { return state.isOpaqueCube(world, pos); diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java index 5741a77381..3cb151969b 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeBlockState.java @@ -102,6 +102,7 @@ public interface IForgeBlockState return getBlockState().getBlock().isLadder(getBlockState(), world, pos, entity); } + //TODO: remove in 1.15 /** * Check if the face of a block should block rendering. * @@ -112,7 +113,9 @@ public interface IForgeBlockState * @param pos Block position in world * @param face The side to check * @return True if the block is opaque on the specified side. + * @deprecated This is no longer used for rendering logic. */ + @Deprecated default boolean doesSideBlockRendering(IEnviromentBlockReader world, BlockPos pos, Direction face) { return getBlockState().getBlock().doesSideBlockRendering(getBlockState(), world, pos, face);