mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +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) {
|
||||
if(nbt != null && !nbt.hasNoTags()) {
|
||||
|
||||
if(nbt == null || nbt.hasNoTags())
|
||||
return null;
|
||||
|
||||
Random random = new Random();
|
||||
|
||||
try {
|
||||
@ -77,10 +80,10 @@ public abstract class ItemInventory implements IInventory {
|
||||
}
|
||||
}
|
||||
|
||||
return new NBTTagCompound(); // Reset.
|
||||
return null; // Reset.
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
|
||||
return nbt;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user