Botania (Fabric/Quilt)

Botania (Fabric/Quilt)

5M Downloads

Village Loot Tables Not Spawning Anything

Squidsword opened this issue ยท 0 comments

commented

Version Information

Forge version: 1.16.5-36.2.4
Botania version: 1.16.5-419

Further Information

Steps to reproduce:

  1. Power a repeating command block with the command: /loot give @p loot minecraft:chests/village/village_toolsmith
  2. Spam shift-click on the inventory trash to get multiple trials

What I expected to happen:
Some Botania loot to spawn

What happened instead:
Only vanilla loot spawns

I think Minecraft updated and renamed some of their loot tables, and even subdivided their village loot tables into their own package. I believe that's why it's not working as expected.

What I tried that worked for my mod was to refactor the village-related .json files to its own "village" subpackage so it matches the Minecraft vanilla ones, and then change some lines on the code below. There might be a simpler way to do this.

I also tested all other files, and as expected they all work except for the village one.

On this file
https://github.com/VazkiiMods/Botania/blob/master/src/main/java/vazkii/botania/common/core/loot/LootHandler.java

if (name.startsWith(prefix)) {
String file = name.substring(name.indexOf(prefix) + prefix.length());
switch (file) {
case "abandoned_mineshaft":
case "desert_pyramid":
case "jungle_temple":
case "simple_dungeon":
case "spawn_bonus_chest":
case "stronghold_corridor":
case "village_blacksmith": // Delete
case "village/village_toolsmith": # Add
case "village/village_weaponsmith": #Add
evt.getTable().addPool(getInjectPool(file));
break;
default:
break;
}
}