Fixed forcefield block not showing as disconnected

This commit is contained in:
LemADEC 2017-08-06 12:57:47 +02:00
parent 3975953ccf
commit 8096ef7a3d
2 changed files with 4 additions and 0 deletions

View file

@ -945,6 +945,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
public Packet getDescriptionPacket() {
NBTTagCompound tagCompound = new NBTTagCompound();
writeToNBT(tagCompound);
tagCompound.setBoolean("isConnected", isConnected);
tagCompound.setBoolean("isPowered", isPowered);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tagCompound);
}
@ -954,6 +955,7 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
NBTTagCompound tagCompound = packet.func_148857_g();
readFromNBT(tagCompound);
isPowered = tagCompound.getBoolean("isPowered");
isConnected = tagCompound.getBoolean("isConnected");
}
public ForceFieldSetup getForceFieldSetup() {

View file

@ -71,6 +71,7 @@ public class TileEntityForceFieldRelay extends TileEntityAbstractForceField impl
public Packet getDescriptionPacket() {
NBTTagCompound tagCompound = new NBTTagCompound();
writeToNBT(tagCompound);
tagCompound.setBoolean("isConnected", isConnected);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tagCompound);
}
@ -78,6 +79,7 @@ public class TileEntityForceFieldRelay extends TileEntityAbstractForceField impl
public void onDataPacket(NetworkManager networkManager, S35PacketUpdateTileEntity packet) {
NBTTagCompound tagCompound = packet.func_148857_g();
readFromNBT(tagCompound);
isConnected = tagCompound.getBoolean("isConnected");
}
@Override