Posted November 1, 20186 yr 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?
November 1, 20186 yr Use the overload of GameRegistry.addSmelting(or FurnaceRecipes#addSmeltingRecipe) that takes an ItemStack as it's first parameter
November 1, 20186 yr 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
November 1, 20186 yr 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 November 1, 20186 yr by V0idWa1k3r
November 1, 20186 yr 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
November 1, 20186 yr 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.