Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

The vanilla tag system isnt suitable for ore dictionary


Recommended Posts

The problem with using the vanilla tag system for ore dictionary is that tags must exist to be accessed. If you reference a tag that doesnt exist in a recipe it will fail to load. For most things this will only result in console spam but there are cases where it matters.

{
  "type": "charcoal_pit:orekiln",
  "ingredients": [
    [
        {
          "tag": "forge:ores/copper"
        },
        {
          "tag": "forge:ingots/copper"
        },
        {
          "tag": "forge:dusts/copper"
        }
    ]
  ],
  "result": {
    "tag": "forge:ingots/copper"
  },
  "amount": 1
}

This recipe accepts either ores, ingots or dusts and outputs ingots. However if only one of those doesnt exist the recipe will not load. i have managed to work around this by creating empty tags for the dusts and hopping the ores and ingots will always come paired but that is inconvenient at best. Separating this into multiple recipes is not valid for multiple reasons. Another place this matters is advancements as if one fails to load it cuts the entire branch.

 

A possible solution is to add an "oredict" input to ingredients that points to forge:empty if the tag doesnt exist. For example "tag": "forge:ingots/copper" would become "oredict": "forge:ingots/copper". By input i mean like how the ingredient can have both "tag" and "item".

 

Ive included a more complex recipe in attachments to make my use case more clear.

bismuth_bronze.json

Link to post
Share on other sites
9 minutes ago, diesieben07 said:

Why? With datagen this takes minutes to do.

i mostly completed my mod before finding out about it. And it looks complicated so theres no point trying to figure it out now. also having a bunch of empty tags doesnt seem very efficient.

Link to post
Share on other sites

You can also use conditionals, However empty tags are probably the best way to go. Data gens make any argument of being hard to use moot. So there is nothing we need to do in this reguard.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.