Posted April 16, 20169 yr I been modding for a few days now, learning the hole thing in the processes but I seam to have run into a snag, I don't get an error for it either, I'm trying to make a smelting recipe for my ore but its not working in game here is the code for it. final float COAL_SMELT_XP = 0.1F; final float DIAMOND_SMELT_XP = 1.0F; final float DRAGONITE_ORE_XP = 0.0F; final int NUMBER_OF_ITEMS = 1; GameRegistry.addSmelting(Blocks.dragonite_ore, new ItemStack(Items.dragonite_ingot, NUMBER_OF_ITEMS), DRAGONITE_ORE_XP);
April 16, 20169 yr First off, are you actually calling the recipes class or wherever this code is in the actual start up? Secondly are both block and item accessible in game? Do they all show up? And try the recipes without finals. It could be something like that. (I doubt it but try) From looking at it the code itself looks fine as to why it would not be working I am unsure.
April 16, 20169 yr Author Yes I am, should of posted the entire code, both blocks are accessible in startup. I will give that a try and here's how I actually did it. package anora.guildcraft.main.init; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; public class Smelting { public static void init() { final float COAL_SMELT_XP = 0.1F; final float DIAMOND_SMELT_XP = 1.0F; final float DRAGONITE_ORE_XP = 0.0F; final int NUMBER_OF_ITEMS = 1; GameRegistry.addSmelting(Blocks.dragonite_ore, new ItemStack(Items.dragonite_ingot, NUMBER_OF_ITEMS), DRAGONITE_ORE_XP); } public static void register() { } }
April 16, 20169 yr Author Did that and still didn't work, so I move them back in to my Block and Item Class and now it works An attempt at keeping my code clean didn't work. but it should of worked witch is odd
April 16, 20169 yr Do you call Smelting.init() ? If so, show where. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
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.