This commit is contained in:
Shadows_of_Fire 2018-10-28 13:52:26 -04:00
parent 2786022b26
commit ebda3195bb

View file

@ -42,15 +42,20 @@ public class BlockGreenhouseGlass extends BlockBase {
} }
@Override @Override
public boolean isFullCube(IBlockState state) { public boolean isOpaqueCube(IBlockState state) {
return true; return false;
} }
@Override @Override
public boolean isOpaqueCube(IBlockState state) { public boolean isFullCube(IBlockState state) {
return false; return false;
} }
@Override
public int getLightOpacity(IBlockState state) {
return 0;
}
@Override @Override
@Deprecated @Deprecated
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@ -75,7 +80,6 @@ public class BlockGreenhouseGlass extends BlockBase {
@Override @Override
public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) {
if (world.isRemote) return; if (world.isRemote) return;
if (world.canBlockSeeSky(pos) && world.isDaytime()) { if (world.canBlockSeeSky(pos) && world.isDaytime()) {
Triple<BlockPos, IBlockState, IGrowable> trip = firstBlock(world, pos); Triple<BlockPos, IBlockState, IGrowable> trip = firstBlock(world, pos);
boolean once = false; boolean once = false;
@ -96,7 +100,7 @@ public class BlockGreenhouseGlass extends BlockBase {
mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ()); mut.setPos(mut.getX(), mut.getY() - 1, mut.getZ());
if (mut.getY() < 0) return null; if (mut.getY() < 0) return null;
IBlockState state = world.getBlockState(mut); IBlockState state = world.getBlockState(mut);
if (!state.isOpaqueCube() || state.getBlock() instanceof IGrowable) { if (state.isOpaqueCube() || state.getBlock() instanceof IGrowable) {
if (state.getBlock() instanceof IGrowable) return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock()); if (state.getBlock() instanceof IGrowable) return Triple.of(mut.toImmutable(), state, (IGrowable) state.getBlock());
else return null; else return null;
} }