From 08f141939f1c3f1f8245e1168d0898a9c6a680ab Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 1 Jun 2016 15:03:20 +0200 Subject: [PATCH] Fixed rendering bug with Greenhouse Glass --- .../mod/blocks/BlockGreenhouseGlass.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index 0831d9a51..eba6ee25b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -16,6 +16,7 @@ import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -46,9 +47,11 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ @SuppressWarnings("deprecation") @Override @SideOnly(Side.CLIENT) - public boolean shouldSideBeRendered(IBlockState state, IBlockAccess worldIn, BlockPos pos, EnumFacing side){ - Block block = state.getBlock(); - return worldIn.getBlockState(pos.offset(side.getOpposite())) != state || block != this && block != this && super.shouldSideBeRendered(state, worldIn, pos, side); + public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){ + IBlockState otherState = world.getBlockState(pos.offset(side)); + Block block = otherState.getBlock(); + + return state != otherState || block != this && super.shouldSideBeRendered(state, world, pos, side); } @@ -58,7 +61,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ return false; } - @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer(){ @@ -70,7 +72,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase{ return EnumRarity.EPIC; } - @Override public TileEntity createNewTileEntity(World world, int par2){ return new TileEntityGreenhouseGlass();