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