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.



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • oh thats not all it didnt copied all is that enough to know the problem
    • 21:49:22.953 STDERR main [org.spongepowered.asm.mixin.transformer.MixinTransformer:transformClassBytes:519]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 21:49:22.953 LaunchWrapper main Unable to launch java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: net/minecraft/world/World at net.minecraft.client.main.Main.main(SourceFile:38) ... 6 more Caused by: java.lang.ClassNotFoundException: net.minecraft.world.World at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 7 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:521) at org.spongepowered.asm.mixin.transformer.Proxy.transform(Proxy.java:72) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ... 9 more Caused by: java.lang.AbstractMethodError at org.spongepowered.asm.mixin.transformer.MixinInfo.preApply(MixinInfo.java:1212) at org.spongepowered.asm.mixin.transformer.MixinTargetContext.preApply(MixinTargetContext.java:1126) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:274) at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:353) at org.spongepowered.asm.mixin.transformer.MixinTransformer.apply(MixinTransformer.java:724) at org.spongepowered.asm.mixin.transformer.MixinTransformer.applyMixins(MixinTransformer.java:703) at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:509) ... 12 more 21:49:22.966 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException 21:49:22.966 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49) 21:49:22.967 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.SecurityManager.checkExit(SecurityManager.java:761) 21:49:22.967 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.Runtime.exit(Runtime.java:107) 21:49:22.967 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.System.exit(System.java:971) 21:49:22.967 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:138) 21:49:22.967 STDERR main [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 21:49:23.085 launcher main Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0 21:49:23.085 monitor Process Monitor Process crashed with exit code 1   Thats the log after the launch
    • It is a tile entity block, the list will max out at 9 slots, so there will be 9 block models (a bit like a composter)
    • When i start minecraft with my forge modpack it loads and ends instantly with the error code 0 in the logs there is the error code 0 so what can i do to fix it.
    • I'm writing a mod for weapons and I ran into the problem of projectile position when shooting. How can I spawn a projectile so that when viewed from the first person, it flies out of the weapon, and not from the center of the screen?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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