Lootr for Developers - LootrMinecraft/Lootr GitHub Wiki
Modpack Authors
There is a loot table condition which can be consulted to determine how many times a loot table has been opened before. That condition is LootItemConditionType "lootr:loot_count"
. This allows you to adjust loot quality depending on the number of people who have previously opened a chest.
Mod Authors
This section is currently unclear! I'd recommend contacting me directly on Discord to discuss.
Simply put, it's possible to provide native support for Lootr in your mod. This is done via the LootrAPI
package. You will need to:
- Provide a unique identifier for each container that is saved with that container
- Provide a loot table for that container
- Create a separate class which has a function that accepts this information and then calls the relevant
LootrAPI
function. - In your block entity "open" code, determine if Lootr as a mod is loaded; if so, call the function in your separate class; if not, simply call the
super
method or however you would otherwise handle this.