This commit is contained in:
raoulvdberge
2017-01-20 22:35:13 +01:00
parent b9164231ac
commit e5bb6bb850

View File

@@ -42,7 +42,15 @@ public class BlockDiskDrive extends BlockNode {
@Override @Override
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
return ((IExtendedBlockState) super.getExtendedState(state, world, pos)).withProperty(DISK_STATE, ((TileDiskDrive) world.getTileEntity(pos)).getDiskState()); IBlockState s = super.getExtendedState(state, world, pos);
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileDiskDrive) {
s = ((IExtendedBlockState) s).withProperty(DISK_STATE, ((TileDiskDrive) tile).getDiskState());
}
return s;
} }
@Override @Override