Jump to content

Recipes for a Custom Workbench


TrazorMC

Recommended Posts

I've been trying to figure out how to create recipes for my imbuement table, a crafting table with two inputs. I've been attempting to use a table to create the recipes, but it isn't working. I'm not sure if it's because I'm using a table as the recipe, or if I'm just not implementing the recipe properly in my container. Here's a link to my recipe handler and container classes: 

Link to comment
Share on other sites

4 hours ago, TrazorMC said:

I've been trying to figure out how to create recipes for my imbuement table, a crafting table with two inputs. I've been attempting to use a table to create the recipes, but it isn't working. I'm not sure if it's because I'm using a table as the recipe, or if I'm just not implementing the recipe properly in my container. Here's a link to my recipe handler and container classes: 

Try running through the code in your IDE's debugger and see where the code is going awry.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

  • 2 weeks later...
42 minutes ago, _Cruelar_ said:

Have you tried what Animefn8888 said?

So, I went through it. My first problem was that onCraftMatrixChanged wasn't being called properly, so I added it to slotClick and it's getting called. Now my problem is that in my recipe handler, getImbuementResult is only returning an empty itemstack, even when I have the correct inputs. I found that method from a tutorial and I don't know exactly how it works, so I'm not sure how to fix it. I still fell like I might be doing the recipes wrong by using a table for them.

Link to comment
Share on other sites

1 hour ago, _Cruelar_ said:

Try to return your airsword.

So I tried that, but that just set the output to the airsword as soon as the workbench is opened. It doesn't look like it gets all the way through the for loops when the method is run. It always skips past the breakpoint I put there.

Link to comment
Share on other sites

2 minutes ago, TrazorMC said:

So I tried that, but that just set the output to the airsword as soon as the workbench is opened. It doesn't look like it gets all the way through the for loops when the method is run. It always skips past the breakpoint I put there.

To confirm, you are running in debugging mode and not the normal run mode?

Link to comment
Share on other sites

3 hours ago, TrazorMC said:

It doesn't look like it gets all the way through the for loops when the method is run. It always skips past the breakpoint I put there.

Does it ever enter the for loops? If not do you ever add any recipes to the list, if so where and when?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

On 8/17/2018 at 6:11 PM, Animefan8888 said:

Does it ever enter the for loops? If not do you ever add any recipes to the list, if so where and when?

It doesn't look like it enters the for loops. I add recipes in the constructor of the recipe handler. 

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.