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

[SOLVED] [1.15.2] Recipe JSON isn't loading


Blazer Nitrox
 Share

Recommended Posts

Hello, wonderful modding community!

 

Today, I bring you a tale of such woe that I must insist you be firmly seated before I can begin - otherwise, your sympathetic despair may cause you to collapse.

 

Well, it's really not that bad (aside from spending nigh on 12 hours trying to get a working JDK for use with Forge because I'm a masochist that doesn't want to give Oracle my info).

What it boils down to is that for some unknown reason Forge isn't recognizing my recipe JSON.

Now would be a good time to note that I haven't touched Forge since 1.12.2, and I'm one of those poor fools who was taught to manually register everything (via GameRegistry.register) and to put everything into proxies. I'm now taking the time to re-learn how to write mods *properly*. Problem is, one of the things that changed out from under me was recipe registering. Supposedly, you just create a recipe file (in JSON format) with the type of recipe, recipe pattern (like the old registering pattern), key (also like the old registering key), and result.

I've already gone and created the associated item and block, and triple-checked the registry IDs.

 

assets/agab/recipes/example_ore.json (the recipe file):

Spoiler

{
	"type": "minecraft:crafting_shaped",
	"pattern": [
		"xxx",
		"xxx",
		"xxx"
	],
	"key": {
		"x": {
			"item": "agab:example_item",
			"data": 0
		}
	},
	"result": {
		"item": "agab:example_ore",
		"count": 1,
		"data": 0
	}
}

 

((don't ask about the MODID, it's not important other than that it's consistent))

 

I can confirm that the item and the block are both appearing in the game, but for some unknown reason this JSON isn't loading, and I can't find any mention of it in the log.
For reference, I'm using Forge 1.15.2-31.1.0, along with Eclipse 2019-12.
Relating to that statement about being a masochist, I'm using AdoptOpenJDK ver. 1.8.0_242-b08 with the HotSpot JVM ver. 25.242-b08 on a 64-bit machine (that last bit was ~2 of the 12 hours lol).

I'd include a pastebin for debug.log, but uh... apparently it's like 3.3 meg??

Edited by Blazer Nitrox
fix title to represent the state of the question
Link to comment
Share on other sites

6 hours ago, Blazer Nitrox said:

assets/agab/recipes/example_ore.json

Recipes go in data, not assets :)

Same for loot tables, and I forget if there's anything else, check the vanilla stuff and see what they put in there :)

 

edit: dug this link out, has some good info on a lot of the changes since 1.12: https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a

Edited by Ugdhar
added update primer link
Link to comment
Share on other sites

4 hours ago, Ugdhar said:

Recipes go in data, not assets :)

Hunh, well I'll be. It also turned out that I didn't need the `data` fields (which I suspected but couldn't prove).
That's interesting... The docs say it should be `./assets/<modid>/recipes`. I assume that's one of the things that hasn't been updated yet, though.

 

Quote

edit: dug this link out, has some good info on a lot of the changes since 1.12: https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a

Ah, very very nice! That'll be much appreciated. Thanks for your help, mate!

Link to comment
Share on other sites

16 hours ago, Blazer Nitrox said:

The docs say it should be `./assets/<modid>/recipes`

That’s the way it was in 1.12.2, it changed in 1.13

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

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)

Link to comment
Share on other sites

19 hours ago, Blazer Nitrox said:

Hunh, well I'll be. It also turned out that I didn't need the `data` fields (which I suspected but couldn't prove).

If you need proof, look at ShapedRecipe#deserializeItem(), where the "data" field is explicitly disallowed.

 

This is due to the Flattening: item and block data is no longer a thing as of Minecraft 1.13 (which is great).  See https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a#whats-the-deal-with-metadata

Edited by desht
Link to comment
Share on other sites

6 hours ago, desht said:

If you need proof, look at ShapedRecipe#deserializeItem(), where the "data" field is explicitly disallowed.

 

This is due to the Flattening: item and block data is no longer a thing as of Minecraft 1.13 (which is great).  See https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a#whats-the-deal-with-metadata

Yeah, I had noticed that when I was reading through his document. I gotta admit, part of me is sad to see magic metadata numbers go, if only for nostalgia's sake. On the other hand, I would much rather avoid magic numbers entirely.

 

9 hours ago, Cadiboo said:

That’s the way it was in 1.12.2, it changed in 1.13

Yeah, I'm loving the changes you guys made so far. Now that I'm getting used to it again everything feels a lot... I dunno, cleaner? It just seems like a much nicer experience than it used to be

 

Oh, I suppose I should mark this solved now lol

Edited by Blazer Nitrox
Link to comment
Share on other sites

3 hours ago, Blazer Nitrox said:

Yeah, I'm loving the changes you guys made so far. Now that I'm getting used to it again everything feels a lot... I dunno, cleaner? It just seems like a much nicer experience than it used to be

It was both Mojang and Forge that made these changes but I quite agree about hot it’s cleaner.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

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)

Link to comment
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • We have created a pickaxe.json below MInecraft-MOD-1.17/src/main/resources/data/minecraft.tags.blocks/mineable/pickaxe.json github link  https://github.com/ocome85/MInecraft-MOD-1.17    I can't add Tag and you can't dig. Please help me.
    • Thank you I completely forgot about that. I will attempt to put a delay in  
    • While chugging along making the JSONs by hand (to get an idea of how they need to be generated for each type of block), I cam up with a possibly brilliant idea. Could I somehow make template JSONs and when a new block of a certain type is being generated it will just pull the template and replace certain keywords like "NAME" and "COLOR" instead of all of this getVariantBuilder stuff
    • Hello everyone!     I'm quite new to forge, I used to do development for spigot. I needed to create a GUI Overlays and I found an article https://emxtutorials.wordpress.com/simple-in-game-gui-overlay/ on how to create a gui overlay, but as I understood the classes were renamed. Can you           share a sample code that would perform this function? Thank you in advance
    • I am at my wit's end trying to figure out what keeps going wrong. Reading the error log tells me absolutely nothing I can understand, and after making a blank new server and finally having it work after so long, just to have it break again, is extremely irritating. I would love for someone to decipher what this error log says and point me in a direction, at least, so I'm not swinging blindly. Minecraft 1.16.5 and Forge 36.2.2   [14:47:37] [Server thread/INFO] [minecraft/PlayerList]: Hyratos[/192.168.1.195:64650] logged in with entity id 45 at (481.30365299459726, 78.0, 426.6331819365098) [14:47:37] [Server thread/INFO] [minecraft/DedicatedServer]: Hyratos joined the game [14:47:37] [Netty Server IO #2/ERROR] [tconstruct/]: MaterialRecipeSerializer: Error reading recipe from packet java.lang.NullPointerException: null     at slimeknights.tconstruct.library.recipe.material.MaterialRecipeSerializer.writeSafe(MaterialRecipeSerializer.java:70) ~[tconstruct:1.16.5-3.1.1.252]     at slimeknights.tconstruct.library.recipe.material.MaterialRecipeSerializer.writeSafe(MaterialRecipeSerializer.java:20) ~[tconstruct:1.16.5-3.1.1.252]     at slimeknights.tconstruct.common.recipe.LoggingRecipeSerializer.func_199427_a_(LoggingRecipeSerializer.java:49) ~[tconstruct:1.16.5-3.1.1.252]     at net.minecraft.network.play.server.SUpdateRecipesPacket.func_218771_a(SourceFile:64) ~[?:?]     at net.minecraft.network.play.server.SUpdateRecipesPacket.func_148840_b(SourceFile:43) ~[?:?]     at net.minecraftforge.network.VanillaPacketSplitter.appendPackets(VanillaPacketSplitter.java:100) ~[forge:?]     at net.minecraftforge.network.ForgeConnectionNetworkFilter.splitPacket(ForgeConnectionNetworkFilter.java:85) ~[forge:?]     at net.minecraftforge.network.VanillaPacketFilter.encode(VanillaPacketFilter.java:75) ~[forge:?]     at net.minecraftforge.network.VanillaPacketFilter.encode(VanillaPacketFilter.java:38) ~[forge:?]     at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:88) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) ~[server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) ~[server-1.16.5-20210115.111550-extra.jar:?]     at net.minecraft.network.NetworkManager.lambda$sendPacket$5(NetworkManager.java:196) ~[?:?]     at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) [server-1.16.5-20210115.111550-extra.jar:?]     at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [server-1.16.5-20210115.111550-extra.jar:?]     at java.lang.Thread.run(Unknown Source) [?:1.8.0_301] [14:47:38] [Server thread/WARN] [Mekanism/]: Failed to retrieve username for UUID 594cf1d3-7a0c-4e6f-bd16-5df4bb7ce72b, you might want to add it to the JSON cache [14:47:38] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class dev.itsmeow.whisperwoods.entity.EntityMoth from class dev.itsmeow.whisperwoods.imdlib.entity.EntityTypeContainer [14:47:38] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class dev.itsmeow.whisperwoods.entity.EntityMoth from class dev.itsmeow.whisperwoods.imdlib.entity.util.EntityTypeContainerContainable [14:47:38] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class its_meow.betteranimalsplus.common.entity.EntityButterfly from class dev.itsmeow.betteranimalsplus.imdlib.entity.EntityTypeContainer [14:47:38] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class its_meow.betteranimalsplus.common.entity.EntityButterfly from class dev.itsmeow.betteranimalsplus.imdlib.entity.util.EntityTypeContainerContainable [14:47:38] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class dev.itsmeow.whisperwoods.entity.EntityZotzpyre from class dev.itsmeow.whisperwoods.imdlib.entity.EntityTypeContainer [14:47:38] [Server thread/INFO] [survive/]: Syncing Armor Data To Client (Hyratos) [14:47:38] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Hyratos lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException [14:47:38] [Server thread/INFO] [minecraft/DedicatedServer]: Hyratos left the game  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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