JustEnoughResources icon indicating copy to clipboard operation
JustEnoughResources copied to clipboard

Reading Loot Tables?

Open Mike-U5 opened this issue 7 years ago • 6 comments

So in the pre-1.12 versions of the mod required other mods to add support for JER in order to see their mob drops, because there was no reliable way to read them.

But now loot tables are a thing. Yet, the mod does not appear to actually read loot tables added by other mods. So wouldn't it be possible to display dropped loot based on those loot tables? This would presumably also fix #110.

Mike-U5 avatar Jul 11 '18 09:07 Mike-U5

The main issue here is that I would have to guess where to find the loot tables. So unless there is a way now to get all loot tables registered, I can't do much.

way2muchnoise avatar Jul 11 '18 09:07 way2muchnoise

Right, not all loot tables locations are in the right place. Perhaps a config option where players can point to loot tables that JER should read?

Mike-U5 avatar Jul 11 '18 10:07 Mike-U5

Mods like CraftTweaker can generate a complete list of loot tables. The trick would be figuring out which loot table is attached to which mob.

TheDeviantCrafter avatar Jul 13 '18 01:07 TheDeviantCrafter

Maybe a config array with mobID as key and the loot table as value?

Mike-U5 avatar Jul 13 '18 15:07 Mike-U5

In 1.15, the loot table locations can be retrieved using Block#getLootTable and EntityType#getLootTable. The LootTable can then be retrieved from the server LootTableManager using getLootTableFromLocation.

It would be great if the generated blocks could be parsed from the biome features as well. I would help/create a PR, except I don't know enough about parsing the correct values from the retrieved LootTables/ConfiguredFeatures for display.

Alpvax avatar May 07 '20 14:05 Alpvax

is this ever getting added? It's extremely disabling and makes JER basically useless

Azagwen avatar May 24 '24 07:05 Azagwen