Lootr icon indicating copy to clipboard operation
Lootr copied to clipboard

How to make lootr change chests/items/blocks for Cobblemon (or other mods) ?!

Open PassyFox opened this issue 3 weeks ago • 5 comments

At the moment lootr does everything in our world with the biggest world gen mods for exploration:

  • Choice Theorem's Overhauled Village
  • Towns and Towers
  • Dungeons and Taverns
  • all YUNG mods It perfectly changes all the chests/items with their respected loot tables into lootr chests and even works perfectly with just respawning the loot after a set time.

Now the biggest modpack of the moment is off course Cobblemon. And here comes the problem, this mod introduces a different kind of chest called "Gilded chests". We would really love for a way to have these chests convert into lootr chests as well or even have them in a list that they won't convert.

My question is how does lootr know what chests/items to convert? Somewhere in the code you should have specified that the mods looks for "minecraft::chest" for example to convert it. Isn't it possible to have the code point to an variable, which you can set in the config file as to what blocks (or chests) needs to be changed into lootr chests? That way people can add chests/blocks/items from other mods if necessary by just adding the in game name, without having to change the loot tables, since these are provided for by the mod makers.

At the moment you have two lines of code pointing towards this solution in your config file under the "conversion" part, which states even elytra's and mineshaft (probably only means minecart chests) should be converted. it could look something like this (the bedrock block is an example off course):

"conversion": { "convert_item": [ minecraft:elytra ], "convert_container": [ minecraft:chest, minecraft:chest_minecart, cobblemon:gilded_chest, cobblemon:gimmighoul_chest ], "convert_block": [ minecraft:bedrock ] }

i'm very curious if this might be a solution to the challenge of having containers or even other blocks from other mods to use the lootr system as well. As an extension you could also apply the conversion code to the textures if the need to be original/modded or changed into the lootr chest texture.

PassyFox avatar Feb 02 '25 17:02 PassyFox