No modded loot in chests
pblivingston opened this issue ยท 10 comments
-
ALWAYS PROVIDE INFORMATION ABOUT MODLOADER (Fabric / Forge) AND MOD VERSION (For Example 1.19.2-8.2.10)
MC1.20.1 + Fabric 0.17.2
Fabric API 0.92.6
Cloth Config 11.1.136
Cardinal Components API 5.2.3
Traveler's Backpack 9.1.38 -
Describe the bug
Iron Golem Traveler's Backpack does not appear in the armorer's chest loot table. Added loot does not appear in mineshaft or dungeon chest loot table. This might extend to all injected loot. -
Write steps to reproduce the bug
Locate or spawn one of the above chests as many times as you like; find nothing from the mod. -
What is expected behaviour
Loot from the mod should appear where expected.
I noticed that I hadn't seen any backpacks as loot, so I decided to test it. I made a new instance with only Traveler's Backpack and its dependencies installed, spawned at least 100 of each of the above chests to get a decent sample size, and found no items from this mod whatsoever. I rolled back to v9.1.18 of Traveler's Backpack, and loot seems to appear in the chests properly in the older version of the mod.
Issue fixed in 9.1.39
https://www.curseforge.com/minecraft/mc-mods/travelers-backpack-fabric
As a follow-up, I tested versions back to 9.1.29 (with the armorer's chest only) to confirm that 9.1.18 was the most recent release version where loot was showing up.
That's strange. Does bat backpack spawn properly? It's the same code for bat & iron-golem only location is changed
I've been referencing this list:
https://github.com/Tiviacz1337/Travelers-Backpack/wiki/Loot
I did check the Abandoned Mineshaft and Monster Room chests (I mentioned I had checked mineshaft and dungeon chests) - none of the listed loot from this mod showed up, including the Bat Backpack, Standard Backpack, and upgrades.
I meant to edit that comment... woops. I was asking if the changes to LootHandler.java in commit 3b37c94 could mean my testing is invalid - do the changes from LootTables.SIMPLE_DUNGEON_CHEST.equals(id) to BuiltInLootTables.SIMPLE_DUNGEON.equals(key), etc. mean the loot is tied to the structure rather than the chest? I've been using /setblock to spawn the chests.
do the changes ... mean the loot is tied to the structure rather than the chest?
I spawned 50 Armorer's houses using /place template minecraft:village/snowy/houses/snowy_armorer_house_1 (the one that actually contains a chest) and none of them had an Iron Golem backpack, so I'll wager a guess this is not the case.
Google AI suggests that when migrating to the new Fabric API, the 'table' table builder passed to the addLootPool method was changed to 'provider' when it should have been changed to 'tableBuilder'. Probably simply a typo because the param order was changed.
old - register((resourceManager, lootManager, id, table, setter) -> ...) <- table builder 'table' is 4th param
new - register((key, tableBuilder, source, provider, lootTableSource) -> ...) <- table builder 'tableBuilder' is 2nd param, 'provider' is 4th
ACCORDING TO GOOGLE so take that with as much credence as you deem fit lol
indeed google AI was right, but the crucial argument is id here, I was comparing the loot table id to the wrong parameter. It will be fixed in the next update. Thank you for report and help!