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 fellow modders, this is probs an easy one but I have some ores in my mod that contain meta and I want them to be able to be smelted. how can I make the recipe?

Use the overload of GameRegistry.addSmelting(or FurnaceRecipes#addSmeltingRecipe) that takes an ItemStack as it's first parameter

7 minutes ago, V0idWa1k3r said:

Use the overload of GameRegistry.addSmelting(or FurnaceRecipes#addSmeltingRecipe) that takes an ItemStack as it's first parameter

could you go into more details on this please 

5 minutes ago, James_HD_UK said:

could you go into more details on this please 

I don't think I could provide more detail even if I wanted to. I gave you the method names, their location and even which overload to use.

Edited by V0idWa1k3r

Just now, V0idWa1k3r said:

I don't think I could provide more detail even if I wanted to. I gave you the method names, their location and even which overload to use.

im new to this sorry 

The most complete furnace recipes works like this:

  • an ItemStack as an input (what will be smelted)
  • an ItemStack as output (the result of the smelting)
  • a float amount of xp

Using these 3 parameters you can pretty much smelt everything and get everything in result. So, if you want to smelt a certain variant of a block you can use something like this where you register your smelting recipes

 

ItemStack input = new ItemStack(MyBlockOrItem, 1, metadata);
ItemStack output = new ItemStack(MySmeltedBlockOrItem );
float xp = 0.0F;

GameRegistry.addSmelting(input, output, xp);

 

About the parameters 

  • MyBlockOrItem is the block/item you want to smelt. This must be changed to what your block/item is called in the source code.
  • metadata is the numeric variant that you want to smelt. For example: if you have a block/item that has 3 variants and you want to smelt the second one, then you have to type 1 assuming that variants numbers starts to 0. If you want to know what the numeric variant of your block/item is, just press F3+H in game and have a look at your block/item in inventory. You'll notice the block id followed by / and a number. That number is the metadata value
  • MySmeltedBlockOrItem is the block/item you get as result of the smelting. Now, here you can go further using this 
    ItemStack output = new ItemStack(MySmeltedBlockOrItem, quantity, metadata);

    so you can even return a specific variant of a block/item as result too in the quantity you prefer.

  • xp is the amount of experience you get when you take the smelt result from the furnace. You can get an idea of what value type in by looking at the vanilla values here https://minecraft.gamepedia.com/Smelting

 

Don't blame me if i always ask for your help. I just want to learn to be better :)

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.