Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

  • 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!

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.