mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-26 14:53:04 +00:00
Backwards compatibility for old nbt
This commit is contained in:
1 parent
f941141879
commit
aab41d1a45
1 file changed
+5
-1
@@ -114,7 +114,11 @@ public abstract class InventoryLogic extends TileEntity implements IInventory, I
|
||||
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||
int j = nbttagcompound1.getShort("Slot") & 0xffff;
|
||||
|
||||
int j = nbttagcompound1.getShort("Slot");
|
||||
|
||||
// Backwards compatibility for when "Slot" was stored in a byte
|
||||
if (j < 0) j += 256;
|
||||
|
||||
if (j >= 0 && j < this.inventory.length) {
|
||||
this.inventory[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
|
||||
|
||||
Reference in new issue
Block a user