mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 12:42:36 +00:00
How many times do you think we can fix the same bug?
This commit is contained in:
1 parent
e13c48dcb4
commit
ed9ee0c180
2 files changed
+14
-10
No files matched your search
@@ -43,11 +43,13 @@ public class PacketCurrentTask extends MessageTileEntity<AbstractPoweredTaskEnti
|
||||
@Override
|
||||
public IMessage onMessage(PacketCurrentTask message, MessageContext ctx) {
|
||||
AbstractPoweredTaskEntity tile = message.getTileEntity(EnderIO.proxy.getClientWorld());
|
||||
if(tile != null && message.nbtRoot.hasKey("currentTask")) {
|
||||
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("currentTask");
|
||||
tile.currentTask = PoweredTask.readFromNBT(message.nbtRoot.getCompoundTag("currentTask"));
|
||||
} else {
|
||||
tile.currentTask = null;
|
||||
if (tile != null) {
|
||||
if(message.nbtRoot.hasKey("currentTask")) {
|
||||
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("currentTask");
|
||||
tile.currentTask = PoweredTask.readFromNBT(message.nbtRoot.getCompoundTag("currentTask"));
|
||||
} else {
|
||||
tile.currentTask = null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -45,11 +45,13 @@ public class PacketZombieTank extends MessageTileEntity<TileZombieGenerator> imp
|
||||
public IMessage onMessage(PacketZombieTank message, MessageContext ctx) {
|
||||
EntityPlayer player = EnderIO.proxy.getClientPlayer();
|
||||
TileZombieGenerator tile = message.getTileEntity(player.worldObj);
|
||||
if(tile != null && message.nbtRoot.hasKey("tank")) {
|
||||
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("tank");
|
||||
tile.fuelTank.readFromNBT(tankRoot);
|
||||
} else {
|
||||
tile.fuelTank.setFluid(null);
|
||||
if (tile != null) {
|
||||
if(message.nbtRoot.hasKey("tank")) {
|
||||
NBTTagCompound tankRoot = message.nbtRoot.getCompoundTag("tank");
|
||||
tile.fuelTank.readFromNBT(tankRoot);
|
||||
} else {
|
||||
tile.fuelTank.setFluid(null);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user