Merge pull request #6 from brandon3055/master

fixed server crash
This commit is contained in:
Martin authored and GitHub committed 2016-06-19 09:52:49 +02:00
commit efd6d87487
3 files changed
+10 -4

No files matched your search

@@ -20,7 +20,7 @@ public class ChaosShardAtmos extends BlockAir {
@Override
public void updateTick(World world, int x, int y, int z, Random random) {
if (world.isRemote) {
if (world.isRemote || world.getClosestPlayer(x, y, z, 24) == null) {
return;
}
@@ -25,13 +25,19 @@ public class LinkedEnergyDevice {
public LinkedEnergyDevice() {
}
public LinkedEnergyDevice(int xCoord, int yCoord, int zCoord, ParticleEnergyBeam beam) {
public LinkedEnergyDevice(int xCoord, int yCoord, int zCoord) {
this.xCoord = xCoord;
this.yCoord = yCoord;
this.zCoord = zCoord;
this.beam = beam;
}
// public LinkedEnergyDevice(int xCoord, int yCoord, int zCoord, ParticleEnergyBeam beam) {
// this.xCoord = xCoord;
// this.yCoord = yCoord;
// this.zCoord = zCoord;
// this.beam = beam;
// }
public TileEntity getTile(World world) {
return world.getTileEntity(xCoord, yCoord, zCoord);
}
@@ -273,7 +273,7 @@ public abstract class TileRemoteEnergyBase extends TileObjectSync implements IRe
if (ld.xCoord == x && ld.yCoord == y && ld.zCoord == z) return true;
}
linkedDevices.add(new LinkedEnergyDevice(x, y, z, null));
linkedDevices.add(new LinkedEnergyDevice(x, y, z));
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return true;