Jump to content

Recipe registration issue [SOLVED]


RedshiftTheFox

Recommended Posts

I'm new to seeking modding help here, but I'll try to keep it somewhat short and simple.

 

I have a recipe registration issue with a certain type of block; slabs. Particularly slab blocks referencing normal blocks added by this mod. Slab recipes using Vanilla blocks are fine and work without issue.

\A side issue which I believe ties into this is that the top-most slab recipe appears in the crafting table after crafting any item/block and appears when any item/block is placed in a crafting table and then removed. 

 

The first issue I have no idea what I could do to fix. I don't quite know of a different way of handling slabs right now, of which how they are being registered could be the root issue. One thing I should also state which may very well lead to the registration being part of the problem is that I have to hard code these slab recipes, I run into problems if I try using .JSON files for these slab recipes. 

 

The mod is called BuildiBlocks, and was initially developed by another person. However they've allowed me to continue development in their absence. 

I have the project up on GitHub for anyone who may be able to help me out. It it built on the Forge version 14.23.2.2611 for Minecraft 1.12.2. Taking an older edit of this code, it works flawlessly in 1.12.0, hard coded recipes included. If anyone is able to lend a hand, I very much-so appreciate it. 

 

GitHub Link: BuildiBlocks project

 

As a side note, I also can't get it running on Forge servers in this version of earlier versions back to 1.10, but that's for a different post. 

 

Edit:

Included some images from my development environment that should help show what this issue is for any that may be confused. Or even if you're not confused, maybe it'll help in some way. 

2019-01-24_23.57.11.png

2019-01-24_23.57.34.png

2019-01-24_23.57.47.png

Edited by RedshiftTheFox
Issue solved.
Link to comment
Share on other sites

in your assets/<MOD_ID>/recipes json files registering automatically you shouldn't use GameRegistry

 

and in your RecipeRegistry you forget to enter your modid to @EventBusSubscriber. It should looks like @EventBusSubscriber(modid = "[MOD_ID]")

 

Also i prefer minecraft:crafting_shaped/shapeless rather than forge:ore_shaped.

Developing Kodev Minecraft Hardcore Mod!

If You're Wondering, My Mod Page. http://minecraft.curseforge.com/projects/minecraft-hardcore-mod

Link to comment
Share on other sites

8 hours ago, Zamion101 said:

in your assets/<MOD_ID>/recipes json files registering automatically you shouldn't use GameRegistry

 

and in your RecipeRegistry you forget to enter your modid to @EventBusSubscriber. It should looks like @EventBusSubscriber(modid = "[MOD_ID]")

 

Also i prefer minecraft:crafting_shaped/shapeless rather than forge:ore_shaped.

For whatever reason, using the minecraft:crafting_shaped/shapless parameter landed me with errors before, but now it doesn't. Odd. Back when I was starting to learn Minecraft modding, I wasn't aware that the @EventBusSubscriber could have a mod ID part inside it. It doesn't seem to of done much, but it probably helps having the ID defined in some way. 

 

I know that they are registered automatically from the json files, however I get an error when I attempt to have my slab recipes in them. The error states that there is missing data for the blocks. I'm cure this is how my slabs are being registered, I had this particular issue with 1.12.0 as well, but hard coding the recipes in that version worked fine. I'm not sure what exactly is going wrong. None of the other json recipes report missing data errors like this. 

Untitled.png

Untitled1.png

Link to comment
Share on other sites

You're missing a data value in the result.

  • Like 1
  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

22 minutes ago, Draco18s said:

You're missing a data value in the result.

I feel like such a massive idiot. I'm so embarrassed right now. Thank you so much. I didn't give one thought that the meta data needed to be determined for the recipe result. You typed exactly what I needed to read. I even tried to put the meta data value in the hard code recipe, but I never thought about putting it in the json recipe file result. 

 

This has been bugging me for eight months now. I thought it was something with how hard code recipes were being handled, how the registry process changed or how I was registering the slabs. I never thought that it'd be something so simple. 

2019-01-25_14.39.25.png

Link to comment
Share on other sites

8 hours ago, RedshiftTheFox said:

I feel like such a massive idiot. I'm so embarrassed right now. Thank you so much. I didn't give one thought that the meta data needed to be determined for the recipe result. You typed exactly what I needed to read.

Its called "reading your damn errors." Its literally right there, in the error.

 

Good news: I'm a strong proponent of teaching people to read their damn errors.

 

missing.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

6 minutes ago, Draco18s said:

Its called "reading your damn errors." Its literally right there, in the error.

 

Good news: I'm a strong proponent of teaching people to read their damn errors.

 

missing.png

I tend to look at errors before loading a world to see if textures and other files have issues before loading a world. Though I didn't think to define the slab meta data state in the recipe result. I thought it meant something in the registry process lead to the block not being recognized properly. It never crossed my mind that all I needed was the data string. I didn't need to define this in other recipes. I'll keep it in mind for future things I do with modding. 

 

I do get some errors for glass slabs, however those errors seem to be largely inconsequential. "No item texture found" errors and model loading exceptions, but they work properly. Probably duplicate methods somewhere in there causing those errors.

Link to comment
Share on other sites

17 hours ago, RedshiftTheFox said:

"No item texture found" errors and model loading exceptions, but they work properly. Probably duplicate methods somewhere in there causing those errors.

Without seeing them I can only speculate. Note that missing model errors are a general error that's Caused By an other error (which will actually tell you what's wrong).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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