Posted September 26, 20159 yr EDIT: Read my third post. Hi there, I want to look into creating a method of crafting some items for my mod. However I'm having a hard time understanding how to create and implement this. If anyone can give me a brief explanation or point me to a tutorial that would be amazing. No signature for you!
October 2, 20159 yr Author So after a bit of tinkering I think I've gotten somewhere... Right now I have a crafting table that I can open and place blocks in, but I'm not sure if I've initialised the crafting table and recipes properly. Also for some reason if I close the inventory whilst items are still in the crafting matrix, they just disappear. This was working beforehand, so I'm not sure what I broke. Here is the code I have: -snip- I don't expect any of you to actually read through the whole code. I'm just thinking that I am not either a) registering my recipes right b) my CraftingManager isn't being registered/initialised correctly c) my Gui/container isn't updating properly If someone could check these for me, or tell me how I'm supposed to do them that would be great. (also wtf am I doing wrong with the disappearing items when closing the inventory?) EDIT: All the recipes will be shapeless and require a solvent and catalyst (both items, can be null), justsoyouknow No signature for you!
October 3, 20159 yr Author Okay, so I've now fixed my problems (I was comparing item stacks rather than the items) but have run into another one. In my gui it adds two new inventory slots (on top of the normal crafting matrix, both of which are used in the crafting), but when I change the items in them it doesn't update the crafting matrix. How should I change my Slot code so that it forces the container to update and check if the items match a recipe? No signature for you!
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.