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

    • 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?
    • Can you please tell me how to fix this?   ---- Minecraft Crash Report ---- WARNING: coremods are present:   FMLLoadingPlugin (Keystrokes-8.0.2 (1.8.9) (1).jar)   FMLLoadingPlugin (AutoGG-4.0.3 (1.8.9).jar)   LabyModCoreMod (LabyMod-3.jar) Contact their authors BEFORE contacting forge // Shall we play a game? Time: 4/10/21 2:56 PM Description: Initializing game java.lang.NumberFormatException: For input string: " 300"     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)     at java.lang.Integer.parseInt(Integer.java:569)     at java.lang.Integer.parseInt(Integer.java:615)     at com.erel.Main.Main.preInit(Main.java:102)     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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:560)     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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189)     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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)     at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:556)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:417)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:329)     at net.minecraft.client.main.Main.main(SourceFile:124)     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) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace:     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)     at java.lang.Integer.parseInt(Integer.java:569)     at java.lang.Integer.parseInt(Integer.java:615)     at com.erel.Main.Main.preInit(Main.java:102)     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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:560)     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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189)     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 com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)     at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:556)     at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:417) -- Initialization -- Details: Stacktrace:     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:329)     at net.minecraft.client.main.Main.main(SourceFile:124)     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) -- System Details -- Details:     Minecraft Version: 1.8.9     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 265271952 bytes (252 MB) / 771751936 bytes (736 MB) up to 2147483648 bytes (2048 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.19 Powered by Forge 11.15.1.1722 Optifine OptiFine_1.8.9_HD_U_L5 9 mods loaded, 9 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     UCH    mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)      UCH    FML{8.0.99.99} [Forge Mod Loader] (forge-1.8.9-11.15.1.1722.jar)      UCH    Forge{11.15.1.1722} [Minecraft Forge] (forge-1.8.9-11.15.1.1722.jar)      UCH    modcore{0.1.47} [ModCore] (Sk1er Modcore-0.1.47 (1.8.9).jar)      UCE    CPSmod{1.0} [CPSmod] ((1.8.9)CPSmod_v1.0.jar)      UCH    autogg{4.0.3} [AutoGG] (AutoGG-4.0.3 (1.8.9).jar)      UCH    keystrokesmod{8.0.2} [KeystrokesMod] (Keystrokes-8.0.2 (1.8.9) (1).jar)      UCH    labymod{3.8.4} [LabyMod] (LabyMod-3.jar)      UCH    timechanger{2.1} [TimeChanger] (TimeChanger-2.2.1 (1).jar)      Loaded coremods (and transformers):  FMLLoadingPlugin (Keystrokes-8.0.2 (1.8.9) (1).jar)    FMLLoadingPlugin (AutoGG-4.0.3 (1.8.9).jar)   club.sk1er.mods.core.forge.ClassTransformer LabyModCoreMod (LabyMod-3.jar)   net.labymod.core.asm.LabyModTransformer   net.labymod.addons.itemphysic.asm.ItemPhysicTransformer   net.labymod.addons.resourcepacks24.asm.Resourcepacks24Transformer     GL info: ' Vendor: 'Intel' Version: '4.6.0 - Build 26.20.100.7926' Renderer: 'Intel(R) UHD Graphics'     Launched Version: 1.8.9-forge1.8.9-11.15.1.1722     LWJGL: 2.9.4     OpenGL: Intel(R) UHD Graphics GL version 4.6.0 - Build 26.20.100.7926, Intel     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'fml,forge'     Type: Client (map_client.txt)     Resource Packs: Lebbyy Retrowave.zip, Bridge Gang     Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 4x Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz     OptiFine Version: OptiFine_1.8.9_HD_U_L5     OptiFine Build: 20191204-143016     Render Distance Chunks: 5     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: 4.6.0 - Build 26.20.100.7926     OpenGlRenderer: Intel(R) UHD Graphics     OpenGlVendor: Intel     CpuCount: 4
    • You're going to need to be more specific. What list is changing size, how often does it change, how many entries can be stored within the list, does the block have a tile entity?
    • Yes, you can still sign jars as that is not a Forge concept, that is a java one. ForgeGradle adds the ability to sign a jar within your buildscript while the event was used to check if there was a violation in the signature. Although the event doesn't exist anymore, ForgeGradle still supports signing a jar through the SignJar task. As for how to sign a java jar, you would need to generate an key-pair. Using Java's keytool command also wraps the public key into a X.509 self-signed certificate which can be used in a bunch of other places. Once you have this generated, make sure to remember the location it's stored on your computer, the alias given for unique identification, the keystore password, and the key password. We can then create the signed jar by having the base jar finalized by our task and making sure it executes after the jar has been reobfuscated via 'reobfJar' within the build.gradle.
    • So i'm running modded minecraft with shaders and noticed my fps was quite low. I did some tests and found that on minecraft with optifine alone, my pc could handle shaders at 130 fps at 48 render distance and also that the gpu usage was on 100%, while when i had forge and optifine at the same time, it wouldn't even handle 90 constant at 12 render distance, and the gpu usage varied from 30-50%. Is there any fix to this?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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