bte_optimization_fixes-1.32.0.jar
Curse Maven Snippet
What's new
Fix identical items not stacking because of a Damage: 0 tag
Some gold ingots, emeralds and other items carried an NBT tag
{Damage: 0}, so they no longer stacked with normal ones. It shows up
when shift-crafting in the Occultism storage crafting grid (for example
emeralds from emerald blocks): Occultism builds the result with
new ItemStack(item, 0) + setTag(result.getTag()), so the result NBT is
passed on as is.
For items without durability only (tools and armor are unchanged), a
"Damage: 0" is removed and an NBT left empty is dropped:
- setDamageValue(0) no longer creates NBT (in 1.19.2 it writes "Damage"
into any item, even without durability).
- setTag(...), which covers the Occultism path.
- copy(), which covers recipe results (assemble returns a copy).
- When an item is loaded (world, players, containers, mod storages), so
items already marked in existing worlds stack again.
This mod has no additional files

