Protect reads from world being null
This commit is contained in:
@@ -32,8 +32,10 @@ public abstract class TileBase extends TileEntity implements ITickable {
|
||||
}
|
||||
|
||||
public void updateBlock() {
|
||||
if (worldObj != null) {
|
||||
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 1 | 2);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDirection(EnumFacing direction) {
|
||||
this.direction = direction;
|
||||
|
||||
@@ -164,11 +164,9 @@ public class TileDiskDrive extends TileNode implements IItemStorageProvider, IFl
|
||||
network.getFluidStorageCache().invalidate();
|
||||
}
|
||||
|
||||
if (worldObj != null) {
|
||||
updateBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack extractItem(int slot, int amount, boolean simulate) {
|
||||
|
||||
Reference in New Issue
Block a user