Jump to content

Recommended Posts

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!

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!

Posted

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.

Posted

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.

Posted

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?

Posted

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?

Posted

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?

Posted

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.

Posted

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!

Posted

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

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