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() {
|
public void updateBlock() {
|
||||||
|
if (worldObj != null) {
|
||||||
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 1 | 2);
|
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 1 | 2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setDirection(EnumFacing direction) {
|
public void setDirection(EnumFacing direction) {
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
|
|||||||
@@ -164,11 +164,9 @@ public class TileDiskDrive extends TileNode implements IItemStorageProvider, IFl
|
|||||||
network.getFluidStorageCache().invalidate();
|
network.getFluidStorageCache().invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (worldObj != null) {
|
|
||||||
updateBlock();
|
updateBlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack extractItem(int slot, int amount, boolean simulate) {
|
public ItemStack extractItem(int slot, int amount, boolean simulate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user