Jump to content

[Solved] Item Recipe


Flemmli97

Recommended Posts

I have implemented a custom crafting system. To actually craft items you have to put a recipe item containing the recipe into the crafting table. how can i cycle through all the possible recipe from that item like in jei? (everything works: crafting, gui, tileentity and render) i only have problems with recipe where i ignore the metadata as i used the oredict wildcard value.

 

i could in theory put the "max" metadata into the item class itself so when the incrementing number (for rendering the item + meta) in the gui render hits that it starts at 0 again but i feel like there should be a better way, like a way to check wether an item has a registered model or something.

 

as it is now its something like this (ignore the exact calculation of displaying the item.):

 

https://pastebin.com/Gw9VLxpz

 

edit: figured out the missing model check, but for future references: is there a way to check for relevant items e.g.: using the ItemDye in recipe ignoring metadata (thus using the oredict wildcard) and only cycle through all available dyes and not make the metadata go past it without hardcoding it for every single item i want to use. (not using the oredictionary entries for that item, which works,  but the item itself)

Edited by Flemmli97
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.