Wiki 9Minecraft Lootr Wiki
Lootr WikiDocumentation › Lootr For Developers

Lootr For Developers

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

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.