mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Fix crate NBT inconsistency in crates
Apparently, a mined crate used to differ from a freshly crafted one because the former didn't have any spiders in it. The latter? Neither.
This commit is contained in:
parent
169f1666e7
commit
0f7c8b49f3
@ -152,8 +152,13 @@ public class BlockStorageCrate extends BlockContainer implements IBlockMulti, IT
|
||||
}
|
||||
}
|
||||
|
||||
if(inv instanceof TileEntityCrateBase)
|
||||
nbt.setBoolean("spiders", ((TileEntityCrateBase) inv).hasSpiders);
|
||||
if(inv instanceof TileEntityCrateBase) {
|
||||
TileEntityCrateBase crate = (TileEntityCrateBase) inv;
|
||||
// Saves memory and ensures consistency between crafted crates and mined ones
|
||||
if (crate.hasSpiders) {
|
||||
nbt.setBoolean("spiders", true);
|
||||
}
|
||||
}
|
||||
|
||||
if(!nbt.hasNoTags()) {
|
||||
drop.stackTagCompound = nbt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user