mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 00:16:27 +01:00
Fix Deployer inventory-voiding bug
- Deployers' inventories will no longer be voided when their contraption is disassembled and reassembled before the DeployerTileEntity can initialize
This commit is contained in:
parent
6d177c4366
commit
e71d03c375
1 changed files with 3 additions and 2 deletions
|
@ -327,12 +327,13 @@ public class DeployerTileEntity extends KineticTileEntity {
|
||||||
compound.putBoolean("Powered", redstoneLocked);
|
compound.putBoolean("Powered", redstoneLocked);
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
compound.put("HeldItem", player.getHeldItemMainhand()
|
|
||||||
.serializeNBT());
|
|
||||||
ListNBT invNBT = new ListNBT();
|
ListNBT invNBT = new ListNBT();
|
||||||
player.inventory.write(invNBT);
|
player.inventory.write(invNBT);
|
||||||
compound.put("Inventory", invNBT);
|
compound.put("Inventory", invNBT);
|
||||||
|
compound.put("HeldItem", player.getHeldItemMainhand().serializeNBT());
|
||||||
compound.put("Overflow", NBTHelper.writeItemList(overflowItems));
|
compound.put("Overflow", NBTHelper.writeItemList(overflowItems));
|
||||||
|
} else if (deferredInventoryList != null) {
|
||||||
|
compound.put("Inventory", deferredInventoryList);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.write(compound, clientPacket);
|
super.write(compound, clientPacket);
|
||||||
|
|
Loading…
Reference in a new issue