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

I was thinking of making a sandwich in my mod where you would put 2 slices of bread (I already make that item!) together (one on top of the other) to get a Sandwich with item description "empty". Then, you could shapeless craft it with any food to get half the stats of that food added to the sandwich but you can only add a certain number of things to the sandwich and you cannot add twice of the same. I kind of know how to do this but I can't think of any working code. My main problem is accessing and editing a copy of the addShapelessRecipe function. Any help would be appreciated.

 

Going off memory and guesswork but here is an idea.

 

I think you will have to create all the shapeless recipies to generate your sandwich.  Have it output the same 'empty' sandwich.  Might want a different name.

 

use the crafting event to see what you did and add nbt data to your itemstack for your sandwich indicating what is in it.  Have your render check to see to chagne graphic.  Probably need some packets love here.  Also could change tooltip.

 

When you do this on the crafting event, if it is full, change it to a different item so the crafting won't work anymore.  It could be a simple extension of the previos item so you don't have to recode, but that will stop the crafting.

Long time Bukkit & Forge Programmer

Happy to try and help

  • Author

well they say what the functions do but they don't really explain how and where you would put them into your program

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.