TrazorMC Posted August 8, 2018 Posted August 8, 2018 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: Spoiler Recipe Handler Container Quote
Animefan8888 Posted August 8, 2018 Posted August 8, 2018 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. Quote 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.
_Cruelar_ Posted August 17, 2018 Posted August 17, 2018 Have you tried what Animefn8888 said? Quote My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
TrazorMC Posted August 17, 2018 Author Posted August 17, 2018 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. Quote
_Cruelar_ Posted August 17, 2018 Posted August 17, 2018 You return ItemStack.EMPTY from your second 5 minutes ago, TrazorMC said: getImbuementResult Try to return your airsword. Quote My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
TrazorMC Posted August 17, 2018 Author Posted August 17, 2018 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. Quote
MiKeY_ Posted August 17, 2018 Posted August 17, 2018 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? Quote
TrazorMC Posted August 17, 2018 Author Posted August 17, 2018 28 minutes ago, MiKeY_ said: To confirm, you are running in debugging mode and not the normal run mode? Yep, it stops on the other breakpoints. Quote
Animefan8888 Posted August 17, 2018 Posted August 17, 2018 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? Quote 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.
TrazorMC Posted August 19, 2018 Author Posted August 19, 2018 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. Quote
TrazorMC Posted August 26, 2018 Author Posted August 26, 2018 Still can't figure it out. Is there another way of creating recipes that I should use? Or am I just doing something wrong? Quote
Recommended Posts
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.