Jump to content

Recommended Posts

Posted
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 

Posted (edited)
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
Posted

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

×   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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • seguridad seguridad
    • I am creating a server with mods but when i try tostart it it say in the logs:   [29Jan2025 20:36:50.715] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/fmlcore/1.20.1-47.3.27/fmlcore-1.20.1-47.3.27.jar is missing mods.toml file 159[29Jan2025 20:36:50.717] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar 160[29Jan2025 20:36:50.717] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar is missing mods.toml file 161[29Jan2025 20:36:50.718] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar 162[29Jan2025 20:36:50.718] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar is missing mods.toml file 163[29Jan2025 20:36:50.719] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar 164[29Jan2025 20:36:50.719] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar is missing mods.toml file
    • How do you configure the entity reach of a custom weapon? Asking for 1.21 Minecraft parchment
    • This topic is over a year old. If you are having an issue, please read the FAQ for the proper way to post logs, and create your own thread.
    • hello i have been trying to put this specific pack for a while now but ive been hit with a new error everytime. no matter if its a previous version or if i change the pack format it will just not work please help latest log:https://mclo.gs/b6Qra5d <----- this is with pack version 1.20 no changes done to it debug log: https://mclo.gs/jczkfRK
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.