LootrMinecraft / Lootr

friendly loot
MIT License
48 stars 38 forks source link

Question. Having lootr affect chest of the DungeonZ mod #446

Closed ChippyLa closed 1 month ago

ChippyLa commented 2 months ago

I'm using DungeonZ, which has a function to allow people to make their own dungeon layout that will be used in game. The issue is I don't know how to get the chests in the dungeon to be changed into lootr chests. Was wondering if you could provide some insight that might help

noobanidus commented 2 months ago

I'm not sure how the DungeonZ mod works, but so long as you are using Vanilla chests and they have a specified loot table, Lootr should be able to convert them to its own chests.

ChippyLa commented 2 months ago

I thought that too. DungeonZ actually creates a dimension temporarily and then deletes it once the dungeon has been beaten. The chests and barrels inside are vanilla chests with assigned loot pools, but they don't get transformed. Could it being a dimension created from a premade nbt structure files, in the config, be the reason why? In a way they aren't world generation generated, but rathe a template for a layout of blocked placed in a new dimension

noobanidus commented 1 month ago

So, I've dug into the code a little further, and it appears as though they are manually filling the containers with loot, based on this code and the linked function fillInventoryWithLoot. This makes it incompatible with Lootr, as Lootr can only detect containers with loot tables -- it can't tell the difference between a chest that someone has put items in, and a chest that has been manually filled by a mod.

You could talk to the author of the mod about setting the loot tables instead, which would defer loot generation and allow Lootr to detect the containers, but I'm not sure how it would impact the flow/etc of their mod.

At this point, there's not much I can do about it, sorry!