wisp-forest / numismatic-overhaul

Terraria-style currency in Minecraft
https://modrinth.com/mod/numismatic-overhaul
MIT License
26 stars 20 forks source link

A small tutorial/config on how to add mobs to the entity tag #103

Closed Ricenami closed 11 months ago

Ricenami commented 1 year ago

I hope all is well. I'm not a developer, nor do I have experience in making datapacks. I already have attempted making a datapack to add mobs to to the entity tag so that they drop coins. However, no matter what I try I can't succeed in mobs dropping coins. If it's not too much trouble, I would greatly appreciate if you could implement a config option to allow players to add mobs, or even a wiki on how to add mobs such as your tutorial for villager trades. I'll leave my datapack if anyone is willing to help me.

{
        "replace": false,
        "values": [
          "minecraft:pillager",
          "minecraft:skeleton",
          "minecraft:creeper",
          "minecraft:drowned",
          "minecraft:husk",
          "minecraft:blaze",
          "minecraft:magma_cube",
          "minecraft:vex",
          "minecraft:vindicator",
          "minecraft:ravager",
          "minecraft:evoker",
          "minecraft:zombie_villager",
          "minecraft:slime",
          "minecraft:stray",
          "minecraft:guardian",
          "minecraft:phantom",
          "minecraft:piglin_brute"
    ]
  }
{
    "pack": {
        "pack_format": 10,
        "description": "Mobs drop coins from the Numismatic Overhaul mod"
    }
}

My datapack folder layout: It is placed in datapack folder, I can see it showing up in the datapacks upon world creation.

numismatic-mob-drops/data/mobdrops/tags/entity_types/the_bourgeoisie.json numismatic-mob-drops/pack.mcmeta

I appreciate your time

Noaaan commented 1 year ago

You are not using numismatic overhauls namespace when adding values to this tag. As such, numismatic-overhaul:the_bourgeoisie remains unchanged, and a new tag is created named mobdrops:the_bourgeoisie. Changing the namespace here should fix this.

Ricenami commented 1 year ago

That did the trick, appreciate your help!

Noaaan commented 11 months ago

To close this issue, I will provide the example datapack we have in our Discord which holds the default behaviour of Numismatic Overhaul. Changing the values listed in this tag is enough to let you change what mobs drop coins: https://cdn.discordapp.com/attachments/826144880610115595/1052282992657190912/bourgoisie.zip Install it in the world of your server manually, or use something like Paxi or Global Datapacks to load it for your modpack.

For more extensive loot table configuration (for example having a boss monster drop a ton of coins) you want to seek out a different mod that can modify loot tables this extensively.