mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
More NBT consistency
Normalize empty NBT to null NBT. Fixes stackability for empty inventories, as usual.
This commit is contained in:
parent
51ad12d51a
commit
e9888a8634
@ -38,7 +38,10 @@ public abstract class ItemInventory implements IInventory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagCompound checkNBT(NBTTagCompound nbt) {
|
public NBTTagCompound checkNBT(NBTTagCompound nbt) {
|
||||||
if(nbt != null && !nbt.hasNoTags()) {
|
|
||||||
|
if(nbt == null || nbt.hasNoTags())
|
||||||
|
return null;
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -77,10 +80,10 @@ public abstract class ItemInventory implements IInventory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new NBTTagCompound(); // Reset.
|
return null; // Reset.
|
||||||
}
|
}
|
||||||
} catch (IOException ignored) {}
|
} catch (IOException ignored) {}
|
||||||
}
|
|
||||||
return nbt;
|
return nbt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user