Fix a Crash on Server with the Laser Relay /derp

This commit is contained in:
Ellpeck 2015-10-31 14:42:51 +01:00
parent c753104586
commit ae584fce2f

View file

@ -87,8 +87,10 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){
if(pkt != null){
NBTTagCompound compound = pkt.func_148857_g();
if(compound != null){
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord));
NBTTagList list = compound.getTagList("Connections", 10);
@ -97,6 +99,8 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
LaserRelayConnectionHandler.getInstance().addConnection(pair.firstRelay, pair.secondRelay);
}
}
}
}
@Override
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){