
[Bug] Treasure Bags causes Global Loot Modifiers to run twice
TheIllusiveC4 opened this issue ยท 1 comments
Versions
- Treasure Bags: 1.18.2-1.7.0
- Forge: 40.1.73
- Modpack (if applicable): Custom
Expected behavior
Using a mod that adds loot using a GLM, the loot should only be added once.
Actual behaviour
Using a mod that adds loot using a GLM, the loot is doubled.
Steps to reproduce the problem
- Install the above Treasure Bags and Forge versions.
- Install Champions 1.18.2-2.1.5.6.
- Enter a world and run
/champions summon spider 1
. - Kill the spider and observe that instead of a single enchanted book, it drops two.
I believe the problem lies here:
Global Loot Modifiers have already been processed before the
LivingDropsEvent
fires. Calling lootTable.getRandomItems(context)
will cause all Global Loot Modifiers to fire again for the same collection of drops.