Fixes
This commit is contained in:
@@ -63,26 +63,24 @@ public abstract class TileBase extends TileEntity implements ITickable {
|
||||
return super.writeToNBT(nbt);
|
||||
}
|
||||
|
||||
public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
public NBTTagCompound writeToUpdatePacketNBT(NBTTagCompound tag) {
|
||||
tag.setInteger(NBT_DIRECTION, direction.ordinal());
|
||||
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void readFromDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
public void readFromUpdatePacketNBT(NBTTagCompound tag) {
|
||||
direction = EnumFacing.getFront(tag.getInteger(NBT_DIRECTION));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SPacketUpdateTileEntity getUpdatePacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
writeToDescriptionPacketNBT(nbt);
|
||||
|
||||
return new SPacketUpdateTileEntity(pos, 1, nbt);
|
||||
return new SPacketUpdateTileEntity(pos, 1, writeToUpdatePacketNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity packet) {
|
||||
readFromDescriptionPacketNBT(packet.getNbtCompound());
|
||||
readFromUpdatePacketNBT(packet.getNbtCompound());
|
||||
|
||||
RefinedStorageUtils.updateBlock(worldObj, pos);
|
||||
}
|
||||
|
@@ -545,15 +545,15 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.writeToDescriptionPacketNBT(tag);
|
||||
|
||||
public NBTTagCompound writeToUpdatePacketNBT(NBTTagCompound tag) {
|
||||
tag.setInteger(NBT_DESC_ENERGY, getEnergyStored(null));
|
||||
|
||||
return super.writeToUpdatePacketNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.readFromDescriptionPacketNBT(tag);
|
||||
public void readFromUpdatePacketNBT(NBTTagCompound tag) {
|
||||
super.readFromUpdatePacketNBT(tag);
|
||||
|
||||
setEnergyStored(tag.getInteger(NBT_DESC_ENERGY));
|
||||
}
|
||||
|
@@ -166,17 +166,17 @@ public class TileDetector extends TileMachine implements ICompareConfig {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.readFromDescriptionPacketNBT(tag);
|
||||
public void readFromUpdatePacketNBT(NBTTagCompound tag) {
|
||||
super.readFromUpdatePacketNBT(tag);
|
||||
|
||||
powered = tag.getBoolean(NBT_DESC_POWERED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.writeToDescriptionPacketNBT(tag);
|
||||
|
||||
public NBTTagCompound writeToUpdatePacketNBT(NBTTagCompound tag) {
|
||||
tag.setBoolean(NBT_DESC_POWERED, powered);
|
||||
|
||||
return super.writeToUpdatePacketNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -156,14 +156,14 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
|
||||
return super.writeToNBT(nbt);
|
||||
}
|
||||
|
||||
public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.writeToDescriptionPacketNBT(tag);
|
||||
|
||||
public NBTTagCompound writeToUpdatePacketNBT(NBTTagCompound tag) {
|
||||
tag.setBoolean(NBT_DESC_CONNECTED, isActive());
|
||||
|
||||
return super.writeToUpdatePacketNBT(tag);
|
||||
}
|
||||
|
||||
public void readFromDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.readFromDescriptionPacketNBT(tag);
|
||||
public void readFromUpdatePacketNBT(NBTTagCompound tag) {
|
||||
super.readFromUpdatePacketNBT(tag);
|
||||
|
||||
connected = tag.getBoolean(NBT_DESC_CONNECTED);
|
||||
}
|
||||
|
@@ -124,15 +124,15 @@ public class TileSolderer extends TileMachine {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.writeToDescriptionPacketNBT(tag);
|
||||
|
||||
public NBTTagCompound writeToUpdatePacketNBT(NBTTagCompound tag) {
|
||||
tag.setBoolean(NBT_WORKING, working);
|
||||
|
||||
return super.writeToUpdatePacketNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromDescriptionPacketNBT(NBTTagCompound tag) {
|
||||
super.readFromDescriptionPacketNBT(tag);
|
||||
public void readFromUpdatePacketNBT(NBTTagCompound tag) {
|
||||
super.readFromUpdatePacketNBT(tag);
|
||||
|
||||
working = tag.getBoolean(NBT_WORKING);
|
||||
}
|
||||
|
Reference in New Issue
Block a user