EMI Loot

EMI Loot

5M Downloads

Is it possible for EMI loot to read Global Loot Modifier?

ffuentesm opened this issue ยท 6 comments

commented

I noticed that some mods use GLM for certain mobdrops, like Tinker's, Ars, where boss mobs drop items that are not affected by looting. Like the nether star drop.

commented

The Nether Star is a "Direct Drop", that doesn't use a loot table at all. I'm not certain exactly what "GLM" is, if it's a forge-exclusive thing maybe. But there is a resource format for visualizing "direct drops".

https://github.com/fzzyhmstrs/EMI_loot/wiki/Direct-Drops

commented

@fzzyhmstrs with GLM I mean Global Loot Modifiers.
I was mostly wondering since recently I've seen some mods where their mob drops do not show in the mob drop tab but have an exclusive INFO tab telling how that item drops. Irons'Spell and Spellbook come to mind. Where Hog Skin is not shown under the hogling table. I think the mod has its own method, which confused me.

Iron Spellbook has its loot tables under data\irons_spellbooks\loot_tables\entities\additional_hoglin_loot.json

{
  "pools": [
    {
      "rolls": 1,
      "bonus_rolls": 0.0,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "type": "minecraft:uniform",
                "min": 0.0,
                "max": 1.0
              },
              "add": false
            },
            {
              "function": "minecraft:looting_enchant",
              "count": {
                "type": "minecraft:uniform",
                "min": 0.0,
                "max": 2.0
              }
            }
          ],
          "name": "irons_spellbooks:hogskin"
        }
      ]
    }
  ]
}

I assume that "additional" in the file name messes things up for EMI loot?

commented

the "additional" part would indeed dodge EMI Loots detection.

commented

From what I see here. Irons Spellbook adds custom drops, but they rename their loot table files so it does not overwrite the vanilla drops. like: Their Blaze custom drops are located on data\irons_spellbooks\loot_table\entities\additional_blaze_loot.json
When I tried to move the file to data\minecraft\loot_table\entities\blaze.json, the custom drops were shown on EMI_Loot, but that caused the Blaze rods to not drop.
image

And just renaming it to blaze.json while keeping it in the data\irons_spellbooks\loot_table\entities\ folder, does not let EMI_loot see those Drops. They still drop from the Mob, but they are not seen by EMI_Loot.
image

This is the custom loot_table to let the Blaze drop that book.


{
  "pools": [
    {
      "rolls": 1,
      "bonus_rolls": 0.0,
      "conditions": [
        {
          "condition": "minecraft:killed_by_player"
        },
        {
          "condition": "minecraft:random_chance_with_enchanted_bonus",
          "enchantment": "minecraft:looting",
          "unenchanted_chance": 0.01,
          "enchanted_chance": {
            "type": "minecraft:linear",
            "base": 0.01,
            "per_level_above_first": 0.01
          }
        }
      ],
      "entries": [
        {
          "type": "minecraft:item",
          "name": "irons_spellbooks:blaze_spell_book"
        }
      ]
    }
  ]
}
commented

I have had a chance to look into Global Loot Modifiers a bit more, and in their current implementation I don't have an easy way to implement EMI Loot support for them. They are created with hard coding in the background, so I have no way to deterministically parse what they might be actually doing.

commented

I understand the limitations.
The reply I sent about Irons spellbook drops is not about GLM, but more about adding new loot tables to mobs.

Irons add drops to some mobs by making a new loot table for them, and as you mentioned before, the different naming on the file causes EMI_Loot to not recognize them.
It was more of a technical question asking if is possible to add custom drops to a mob without overwriting the vanilla ones.

I tried to manually add the drops to show on EMI Loot by changing the file name, which just made the custom drop replace the vanilla ones. The only solution I had was to copy and paste the vanilla loot table file and manually add the new drop to that file. Instead of having two files in different mod folders.
image