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

Hello,

 

I'm having trouble with my addSmelting recipe. I'm making an item that's supposed to give a bit more xp than other vanilla items, but I can't seem to get more than 1 xp from smelting my item.

 

It seems:

GameRegistry.addSmelting(input, output, 500.0f);

 

gives the same amount of xp as:

GameRegistry.addSmelting(input, output, 1.0f);

 

How can I get more than 1 xp per smelted item?

 

Thanks!

  • Author

Hello,

 

I'm having trouble with my addSmelting recipe. I'm making an item that's supposed to give a bit more xp than other vanilla items, but I can't seem to get more than 1 xp from smelting my item.

 

It seems:

GameRegistry.addSmelting(input, output, 500.0f);

 

gives the same amount of xp as:

GameRegistry.addSmelting(input, output, 1.0f);

 

How can I get more than 1 xp per smelted item?

 

Thanks!

You can't.

 

The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt."

 

You would need to use events to drop more.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

You can't.

 

The number is not "how much experience to drop per smelt" it is "what is the probability of dropping 1 experience per smelt."

 

You would need to use events to drop more.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

I looked for events but couldn't find one for furnace stuff. Are there events for furnace interaction? Or did you mean something else with the events?

  • Author

I looked for events but couldn't find one for furnace stuff. Are there events for furnace interaction? Or did you mean something else with the events?

  • Author

Set it to drop 0 experience, then drop the experience manually in

PlayerEvent.ItemSmeltedEvent

.

 

Aha! well.. almost. Is there a way to see, in ItemSmeltedEvent, what item was smelted?

My custom item smelts into coal, there's event.smelting.getItem() which gives coal but how do I see what smelted into this coal?

 

Granted, vanilla doesn't have anything that smelts into coal but another mod might, so I don't want to simply check if coal was taken out of the furnace, I want to make sure it was smelted from my custom item.

 

Surely there's a way to see this?

Apparently not, just looked at the call stack for it.  The only thing passed to the event is the player and the result stack.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Apparently not, just looked at the call stack for it.  The only thing passed to the event is the player and the result stack.

 

Hahaha, I was going to do something simple for my first mod, to get into modding. Turns out it can't be done (or at least not easily) xD.

Ah well, I'll do something else :)

 

Thanks for the help!

If you smelted to a custom item then you'd be able to tell.  But yeah, smelting isn't supposed to give you a lot of exp.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.