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

Hey, I started with modding and I am german, so sorry for bad english or bad knowledge...

 

I want to create a item (sunny side egg). You must first smelt an egg in a furnace to get it.

How can I do that?

 

PS: Do you call it "Sunny Side Egg" in USA? :D or "Fried Egg"? And do you say "Cornflakes"? :D

 

Thanks.

You create two items (or use one item but with different metadata, but that might not be that easy if you are new to modding): one for the raw version and one for the cooked.

You create a way for a player to obtain raw egg and add smelting recipe for it.

( GameRegistry.addSmelting(ItemStack input, ItemStackoutput, float xp); )

Where you add your recipes, add this line of code:

 

GameRegistry.addSmelting(Item.egg.shiftedIndex, new ItemStack(Item.YOURMODITEMNAME), 20);

 

Where you replace YOURMODITEMNAME with the name of the item which you used in the public static final.

The 20 is for how much exp you'll get from it, you can customize it yourself.

 

I just started coding last month, it's going great! I hope you'll get much success!

 

/Falling

Where you add your recipes, add this line of code:

 

GameRegistry.addSmelting(Item.egg.shiftedIndex, new ItemStack(Item.YOURMODITEMNAME), 20);

 

Where you replace YOURMODITEMNAME with the name of the item which you used in the public static final.

The 20 is for how much exp you'll get from it, you can customize it yourself.

 

I just started coding last month, it's going great! I hope you'll get much success!

 

/Falling

the last number must be a float not int, also 20f exp its so much exp, like an gold ingot do just 1f why 20f for an egg?

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.