Shadows-of-Fire / Hostile-Neural-Networks

A Minecraft Forge mod about defeating hostile simulations to produce loot drops
MIT License
14 stars 16 forks source link

[1.20.1] Simulation Chamber breaks NBT tags in other inventories #63

Open RingOfSouls opened 1 day ago

RingOfSouls commented 1 day ago

I played for a while on the Forge 1.20.1 modpack with HNN, already set up automation, and started noticing that some resources stopped stacking and being recognized for autocrafting in the AE2 system.

After investigating, I figured out that the Simulation Chamber, upon placement and subsequent ticks, inserts the NBT tag 'data_model' into all ItemStack.EMPTY items in nearby inventories, including the player’s inventory. However, I was unable to figure out how this tag is being added to the items.

How to reproduce the bug:

2024-09-24_10 59 18 2024-09-24_10 59 25

Shadows-of-Fire commented 1 day ago

It's probably just mutating the global ItemStack.EMPTY field. What side effects is this causing? The empty stack is always empty regardless of any junk nbt that might be attatched to it

RingOfSouls commented 1 day ago

image In some cases, this happens. Somehow, this NBT tag gets added to existing items. I don’t know how it happens, but they stop stacking, and the ME system stops recognizing them if they are used for crafting items or set in bus filters.