Shadows-of-Fire / Hostile-Neural-Networks

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

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

Closed RingOfSouls closed 3 weeks ago

RingOfSouls commented 2 months 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 2 months 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 2 months 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.