-
-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Possible Bug/Compat Issue] Botania resulting in LootJS scripts rolling entity loot modifiers twice #4752
Comments
Botania injects a separate loot table for whenever certain mobs are killed via Elementium Axe. This injection is as generic as possible, being evaluated for every mob death. The loot table itself will always be the same, Can LootJS recognize the loot table being applied? If so, that's the preferred way to exclude it injecting into this one. |
Just tested with just Botania and LootJS + dependencies and JEI/EMI, and the drops still double. @LLytho could you chime in to respond to the Wormbo's question? I suspect you know way more about the technicals lol |
LootJS has a way to create dynamic drops when a specific entity dies. This will always check against the entity or an entity tag. Botania triggers the loot table for the Elementium Axe when an entity dies no matter what the player holds, which then leads to the double invoke from LootJS. The issue will not occur when the user creates a LootJS modifier for a specific loot table (
I don't think the injection should happen this way. In my opinion for loot table injection the best solution is to add a loot pool for each entity loot table instead of having one loot table which handles everything and is always triggered for every mob.
It knows which loot table is rolled but I'm not a huge fan of excluding something because of such behavior. It's not clearly visible for the user. |
Mod Loader
Fabric
Minecraft Version
1.20.1
Botania version
1.20.1-446
Modloader version
Fabric Loader 0.16.3 + API 0.92.2+1.20.1
Modpack info
Custom (not on CurseForge yet)
The latest.log file
N/A
Issue description
When using LootJS's
.addEntityLootModifier
, whether it's vanilla or modded, the entity loot modifier will roll twice, therefore doubling the dropped loot added by the modifier when the defined conditions are met.Steps to reproduce
.addEntityLootModifier()
.addEntityLootModifier()
; the loot drops added by the modifier should appear doubled, which should not happenOther information
I did not test this on a minimal instance.
I tested this issue briefly with the following LootJS script after hearing about it:
When the conditions were met, two Bramblethorns dropped rather than just one, which was not supposed to happen. Using
.addLootTableModifier
instead only resulted in one roll when the entity died and conditions were met, as intended.In the LootJS Discord, the potential cause was determined to be something related with Botania, specifically the Elementium Axe. Comment from one of the LootJS developers:
The text was updated successfully, but these errors were encountered: