HyperPigeon / Eldritch-Mobs

A port of the Infernal Mobs mod for Fabric 1.16. Made for Modfest 2020.
https://www.curseforge.com/minecraft/mc-mods/eldritch-mobs
MIT License
8 stars 14 forks source link

Feature Request: Configure Eldritch mob drops. #16

Closed Derpford closed 3 years ago

Derpford commented 3 years ago

The easiest way to do this would probably be to add a loot table that can be modified via datapack. This may even already be possible, as the loot table for Eldritch drops is sitting pretty in src/main/resources/data/eldritch_mobs/loot_tables/entities/elite_loot.json. It may just be a matter of documenting this and providing an example configuration. I don't 100% understand the datapack format myself, unfortunately, so IDK exactly how this would work on your end.

FewerFlaws commented 3 years ago
  1. Go to your minecraft folder, find the saves folder, and open the folder of the world you'd like to edit.
  2. Open the "datapacks" folder. Every folder in here is a datapack actively changing something in your world. Create a folder with whatever name you want. For example, you may call it "customEldritchMobLoot"
  3. Within the folder you just created, make a file called "pack.mcmeta" and use a text editor like notepad to fill it with the following information:
    {
    "pack": {
        "pack_format": 6,
        "description": "Changes the loot dropped by eldritch mobs."
    }
    }
  4. Right beside that file, create a folder called "data"
  5. Within "data" create a folder called "eldritch_mobs"
  6. Within "eldritch_mobs" create a folder called "loot_tables"
  7. Within "loot_tables" create a folder called "entities"
  8. Within "entities" create a file called "elite_loot.json"
  9. Use a text editor like notepad to edit the file you just made. Refer to this datapack creation tutorial for information on how to achieve what you want. The loot table page itself will also help.

If you'd like to refer to a specific item but don't know what to call it in the loot table, use F3+H in the game to enable advanced tooltips. Then find the item and read the tooltip, which will say something like "minecraft:stick" or "terrestria:redwood_leaves"

If you'd like to check whether an arbitrary mod can be adjusted with datapacks, use a tool like 7zip to decompress the .jar. Everything in the resources/assets folder can be replaced using a resource pack. Everything in the resources/data folder can be replaced using a datapack. You can also see the exact folder structure you'll have to use by doing this.

That should be plenty to get you going =]

HyperPigeon commented 3 years ago

added in latest update