Jump to content

Recommended Posts

Posted (edited)

In my mod I am trying to do a registry override, which works fine, but since the vanilla item didn't have any variants and my override item does, it causes a jsonparseerror on every single recipe that uses the item. I was wondering if there was any way to prevent this (it's caused by the fact that the json recipes don't have a data value as the original item doesn't have one, but since the override does have variants it requires a data value in the json). I looked through the stacktrace of the json error and could not find any place where a mod might hook into the process of loading recipe jsons. I condifered a few possible options to resolve this, but none of them are particularly helpful:

  • before the recipes are parsed, find every json recipe that would cause a jsonerror as a direct result of my override and fix the issue in the json file. This is not a solution since my mod may not always have the permissions to write, and may also cause issues in modloaders that do some form of version-checking or whatever.
  • use some method to catch exceptions from another thread. Not possible since the exception is already caught by the thread itself.
  • look for all recipes that would cause a jsonerror as a direct result of my override, parse them myself, then register the result. While definetely possible this would be a rather inefficient way to do it, and would also not prevent the json errors from occuring.

while the third option is possible, it would be nice to know if there is any point in which a mod can interrupt the recipe loading process (for instance if there's a hook i missed that let's you acess the json object or the loader or something)

Some things of note:

Vanilla recipes seem to be handled by a different loader which is perfectly capable of ignoring wheter or not an item has variants.
I can't fix the recipe registry entries after the fact, since the json error prevents the recipes from entering the registry in the first place.

Edited by DutchM
clarify
Posted (edited)

Does having your own correct recipes in assets/minecraft/recipes work?

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

Yes, recipes aren't broken in general, it's just that recipes that use string that don't set a data tag are broken, and I have no control over what other modders do with their recipes, so I would like to make it so my mod fixes those recipes (that is, other mod's json recipes that use vanilla string).

Posted

I think you could probably make your own IRecipe implementation and wrap the vanilla one to fix those conflicts. Just an idea tho

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

"the vanilla item didn't have any variants and my override item does"

That is your problem.

When replacing a registry item, do not add variants. You must replace the item exactly as is. if you need more then add an extra registry entry and translate them as needed.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  On 3/12/2019 at 12:39 AM, LexManos said:

"the vanilla item didn't have any variants and my override item does"

That is your problem.

When replacing a registry item, do not add variants. You must replace the item exactly as is. if you need more then add an extra registry entry and translate them as needed.

Expand  

I'm fully aware that that is the cause of the issue. I'm looking for a way to circumvent the issue without changing that. As far as I can tell using some reference searches in Eclipse, recipes are the only thing that break by doing this. 

Posted

Variants should be separate items in 1.13 anyway, so I think you should have the vanilla one as your default variant. 

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 3/12/2019 at 12:54 AM, Cadiboo said:

Variants should be separate items in 1.13 anyway, so I think you should have the vanilla one as your default variant. 

Expand  

I can definitely do that, and I probably will if there's really no circumventing this, but I'd really prefer seeing if there's a way to circumvent it since that wouls save alot of work rn, and also be clearer to the player imo. 

Posted
  On 3/12/2019 at 12:58 AM, DutchM said:

I can definitely do that, and I probably will if there's really no circumventing this, but I'd really prefer seeing if there's a way to circumvent it since that wouls save alot of work rn, and also be clearer to the player imo. 

Expand  

You can still change the texture and the name of the object, there should be no difference to the end user

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 3/12/2019 at 1:15 AM, Cadiboo said:

You can still change the texture and the name of the object, there should be no difference to the end user

Expand  

There is when using commands etc. Shouldn't be too big of a deal but eh there's no way to circumvent the error anyway so I suppose I'll have to redo my colored string. 

Posted

"You shouldn't do that as that is now what the system is designed for"

"I still wanna do the thing even tho you just told me that it is the wrong way to do it because... I'm special..."

Seriously? No. Don't 'circumvent it' just use the system the way it was designed.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • [06Apr2025 14:20:17.918] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, {MINECRAFT_USERNAME}, --version, 1.20.1, --gameDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt, --assetsDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\assets, --assetIndex, 5, --uuid, {MINECRAFT_UUID}, --accessToken, ????????, --clientId, c4502edb-87c6-40cb-b595-64a280cf8906, --xuid, 0, --userType, msa, --versionType, release, --width, 854, --height, 480, --launchTarget, forgeclient, --fml.forgeVersion, 47.4.0, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [06Apr2025 14:20:17.923] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.10 by Azul Systems, Inc.; OS Windows 11 arch amd64 version 10.0 [06Apr2025 14:20:19.188] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [06Apr2025 14:20:19.242] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6 [06Apr2025 14:20:19.405] [main/INFO] [EARLYDISPLAY/]: Requested GL version 4.6 got version 4.6 [06Apr2025 14:20:19.434] [main/INFO] [mixin-transmog/]: Mixin Transmogrifier is definitely up to no good... [06Apr2025 14:20:19.450] [main/INFO] [mixin-transmog/]: crimes against java were committed [06Apr2025 14:20:19.463] [main/INFO] [mixin-transmog/]: Original mixin transformation service successfully crobbed by mixin-transmogrifier! [06Apr2025 14:20:19.495] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/{COMPUTER_USERNAME}/AppData/Roaming/ModrinthApp/profiles/dude%20whatttt/mods/Connector-1.0.0-beta.46+1.20.1.jar%23361%23364!/ Service=ModLauncher Env=CLIENT [06Apr2025 14:20:19.505] [pool-2-thread-1/INFO] [EARLYDISPLAY/]: GL info: NVIDIA GeForce RTX 2060/PCIe/SSE2 GL version 4.6.0 NVIDIA 572.83, NVIDIA Corporation [06Apr2025 14:20:20.213] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\fmlcore\1.20.1-47.4.0\fmlcore-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.216] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\javafmllanguage\1.20.1-47.4.0\javafmllanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.219] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\lowcodelanguage\1.20.1-47.4.0\lowcodelanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.222] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\mclanguage\1.20.1-47.4.0\mclanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.702] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File:  and Mod File: . Using Mod File:  [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: geckolib. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\geckolib-forge-1.20.1-4.7.1.2.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: midnightlib. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\midnightlib-forge-1.4.2.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: curios. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\curios-forge-5.12.1+1.20.1.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: architectury. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\architectury-9.2.14-forge.jar [06Apr2025 14:20:20.704] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 90 dependencies adding them to mods collection [06Apr2025 14:20:21.837] [main/INFO] [org.sinytra.connector.locator.DependencyResolver/]: Dependency resolution found 0 candidates to load [06Apr2025 14:20:23.246] [main/INFO] [org.sinytra.connector.service.hacks.ModuleLayerMigrator/]: Successfully made module authlib transformable  
    • [06Apr2025 14:20:17.918] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, {MINECRAFT_USERNAME}, --version, 1.20.1, --gameDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt, --assetsDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\assets, --assetIndex, 5, --uuid, {MINECRAFT_UUID}, --accessToken, ????????, --clientId, c4502edb-87c6-40cb-b595-64a280cf8906, --xuid, 0, --userType, msa, --versionType, release, --width, 854, --height, 480, --launchTarget, forgeclient, --fml.forgeVersion, 47.4.0, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [06Apr2025 14:20:17.923] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.10 by Azul Systems, Inc.; OS Windows 11 arch amd64 version 10.0 [06Apr2025 14:20:19.188] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [06Apr2025 14:20:19.242] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6 [06Apr2025 14:20:19.405] [main/INFO] [EARLYDISPLAY/]: Requested GL version 4.6 got version 4.6 [06Apr2025 14:20:19.434] [main/INFO] [mixin-transmog/]: Mixin Transmogrifier is definitely up to no good... [06Apr2025 14:20:19.450] [main/INFO] [mixin-transmog/]: crimes against java were committed [06Apr2025 14:20:19.463] [main/INFO] [mixin-transmog/]: Original mixin transformation service successfully crobbed by mixin-transmogrifier! [06Apr2025 14:20:19.495] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/{COMPUTER_USERNAME}/AppData/Roaming/ModrinthApp/profiles/dude%20whatttt/mods/Connector-1.0.0-beta.46+1.20.1.jar%23361%23364!/ Service=ModLauncher Env=CLIENT [06Apr2025 14:20:19.505] [pool-2-thread-1/INFO] [EARLYDISPLAY/]: GL info: NVIDIA GeForce RTX 2060/PCIe/SSE2 GL version 4.6.0 NVIDIA 572.83, NVIDIA Corporation [06Apr2025 14:20:20.213] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\fmlcore\1.20.1-47.4.0\fmlcore-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.216] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\javafmllanguage\1.20.1-47.4.0\javafmllanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.219] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\lowcodelanguage\1.20.1-47.4.0\lowcodelanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.222] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\meta\libraries\net\minecraftforge\mclanguage\1.20.1-47.4.0\mclanguage-1.20.1-47.4.0.jar is missing mods.toml file [06Apr2025 14:20:20.702] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File:  and Mod File: . Using Mod File:  [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: geckolib. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\geckolib-forge-1.20.1-4.7.1.2.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: midnightlib. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\midnightlib-forge-1.4.2.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: curios. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\curios-forge-5.12.1+1.20.1.jar [06Apr2025 14:20:20.704] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: architectury. Using Mod File: C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\dude whatttt\mods\architectury-9.2.14-forge.jar [06Apr2025 14:20:20.704] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 90 dependencies adding them to mods collection [06Apr2025 14:20:21.837] [main/INFO] [org.sinytra.connector.locator.DependencyResolver/]: Dependency resolution found 0 candidates to load [06Apr2025 14:20:23.246] [main/INFO] [org.sinytra.connector.service.hacks.ModuleLayerMigrator/]: Successfully made module authlib transformable  
    • I have been trying to be Frankenstein and mix 2 modpacks together for my wife and I to both enjoy together. I downloaded both from curseforge, made a new modpack, shoved all of the mods in, and painstakenly went through all 300+ mods taking half of them out then slowly adding them in a handfull at a time until the game launched with as many mods as possible. I knew there were going to be some compatibility issues and have successfully gotten to the main menu. I went to create a new world and got the -1 crash report. I opened the report and took out the mods it said were incompatible until it no longer said anything more than... "// You're mean."  I am trying to understand this report as from what other people have said, it sounds like fabric is needed but I don't see how that's possible when both modpacks are the same version of minecraft, using forge, and work individually. I do see in there stuff like this in the crash report: Does this mean I have to go through what looks like 2/3s of all the mods in there and take them out? Or is there something else I'm missing? Please help This is the crash report:  https://paste.ee/p/E8dz1PCC        
    • I want to replace a villager with my custom mob when closing its' interface or punching it.  I got the check with the interface and punch but am missing the spawn method. I'm passing on the position of the trader but what do I need to use to set the position for the new mob + how do I even summon it? This is my first larger mod so please forgive me if thats a dumb question or it's missing information. 
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.