aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/events
diff options
context:
space:
mode:
authorD-Cysteine <54219287+D-Cysteine@users.noreply.github.com>2023-02-23 02:21:33 -0700
committerGitHub <noreply@github.com>2023-02-23 10:21:33 +0100
commit4975036496b2227a3efdd9e80ffc4dd5cfdf59a9 (patch)
treedb18b3ff73dd263bafb9bcf09db058a450fbb016 /src/main/java/gregtech/api/events
parent684d42cdf20ac0d3692049f89b182faa7990a26b (diff)
downloadGT5-Unofficial-4975036496b2227a3efdd9e80ffc4dd5cfdf59a9.tar.gz
GT5-Unofficial-4975036496b2227a3efdd9e80ffc4dd5cfdf59a9.tar.bz2
GT5-Unofficial-4975036496b2227a3efdd9e80ffc4dd5cfdf59a9.zip
Fix mutating ItemData NBT (#1762)
* Fix mutating ItemData NBT Fix for a very old bug where we were overwriting NBT in stored `ItemData` every time we called `GT_OreDictUnificator.get()` or `GT_OreDictUnificator.get_nocopy()` Maybe fixes: * https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/12678 Please review this carefully, since it's very difficult to properly test changes to this part of the codebase. In `get_nocopy()`, since we now make a copy, I was able to set stack size too. Also I removed `assert rStack != null` since it is already checked by `GT_Utility.isStackInvalid()`. In `isInputStackEqual()`, I just deleted `rStack.setTagCompound()` since the only reference to `rStack` is in `GT_Utility.areStacksEqual()`, which has `aIgnoreNBT == true` so setting NBT does nothing. * Don't copy if no NBT is present
Diffstat (limited to 'src/main/java/gregtech/api/events')
0 files changed, 0 insertions, 0 deletions