mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Fixed rendering bug with Greenhouse Glass
This commit is contained in:
parent
6f54b287d2
commit
08f141939f
1 changed files with 6 additions and 5 deletions
|
@ -16,6 +16,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.SoundType;
|
import net.minecraft.block.SoundType;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.EnumRarity;
|
import net.minecraft.item.EnumRarity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
@ -46,9 +47,11 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess worldIn, BlockPos pos, EnumFacing side){
|
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side){
|
||||||
Block block = state.getBlock();
|
IBlockState otherState = world.getBlockState(pos.offset(side));
|
||||||
return worldIn.getBlockState(pos.offset(side.getOpposite())) != state || block != this && block != this && super.shouldSideBeRendered(state, worldIn, pos, 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public BlockRenderLayer getBlockLayer(){
|
public BlockRenderLayer getBlockLayer(){
|
||||||
|
@ -70,7 +72,6 @@ public class BlockGreenhouseGlass extends BlockContainerBase{
|
||||||
return EnumRarity.EPIC;
|
return EnumRarity.EPIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int par2){
|
public TileEntity createNewTileEntity(World world, int par2){
|
||||||
return new TileEntityGreenhouseGlass();
|
return new TileEntityGreenhouseGlass();
|
||||||
|
|
Loading…
Reference in a new issue