Posted October 10, 201213 yr Ihavent found a way to add a smelting recipe that uses metadata for the INPUT except this: FurnaceRecipes.addSmelting(Int input-id, Int input-meta, ItemStack output); problem with that for me is:| Cannot make a static reference to the non-static method addSmelting(int, int, ItemStack) from the type FurnaceRecipes Anywhere i put the statement, it returns that. Using forge version: 4.1.1.251
October 10, 201213 yr try using ModLoader.addSmelting(Int input-id, Int input-meta, ItemStack output); this is added by forge and is used to input furnace recipes into the base class without editing it Hope this helps! The Korecraft Mod
October 10, 201213 yr Author try using ModLoader.addSmelting(Int input-id, Int input-meta, ItemStack output); this is added by forge and is used to input furnace recipes into the base class without editing it Hope this helps! HOOOWWWW bout you go and look at where that leads to before commenting. There is no "addSmelting(int, int, ItemStack)" in net.minecraft.src.ModLoader. Only "addSmelting(int, ItemStack, Float)" and one without the float (for xp). And if you look at what is under those methods, it says "GameRegistry.addSmelting(input, output, experience);" and if you look at whats in THAT class, it leads to the one i mentioned.....and so, please look into this better next time
October 10, 201213 yr FurnaceRecipes.smelting().addSmelting(item, metadata, out); Is it really that hard to go through the class and check for instances of it?
October 10, 201213 yr You can also make it easily accesable by using this: public static void metaSmelting(int input, int meta, ItemStack output) { FurnaceRecipes.smelting().addSmelting(input, meta, output); } So that you don't have to type so much.
October 13, 201213 yr Author FurnaceRecipes.smelting().addSmelting(item, metadata, out); Is it really that hard to go through the class and check for instances of it? ...wondering why people arent reading all that i wrote... no, of course its not hard to go through the class and check for instances...thats exactly what i did, except through SEVERAL classes including ModLoader, GameRegistry and FurnaceRecipes ""Cannot make a static reference to the non-static method ""....apparently my reference was static although i dont know how/why. it was just in the init method along with regular recipes, etc.
October 24, 201213 yr Actually, how to add the XP param to the Metadata Smelting? (MCP 7.18_pre1 & forge 6.0.0.328) I got it working: Just added this to the item (you could switch xp based on damage value then), just doesnt drop xp orbs: @Override public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { int var2 = par1ItemStack.stackSize; float var3 = 5; //Exp for 1 Item int var4 = 0; //contains calculated xp to process if (var3 == 0.0F) { var2 = 0; } else if (var3 < 1.0F){ var4 = MathHelper.floor_float((float)var2 * var3); if (var4 < MathHelper.ceiling_float_int((float)var2 * var3) && (float)Math.random() < (float)var2 * var3 - (float)var4) { ++var4; } var2 = var4; } else var4=(int) (var2*var3); par3EntityPlayer.addExperience(var4); } Check out my Mod, NetherStuffs (http://netherstuffs.wikispaces.com/)! Its goal is to enrich the Nether to more use than "Giant Lava source". (Currently Work in Progress)
October 26, 201213 yr FurnaceRecipes.smelting().addSmelting(item, metadata, out); Is it really that hard to go through the class and check for instances of it? ...wondering why people arent reading all that i wrote... no, of course its not hard to go through the class and check for instances...thats exactly what i did, except through SEVERAL classes including ModLoader, GameRegistry and FurnaceRecipes ""Cannot make a static reference to the non-static method ""....apparently my reference was static although i dont know how/why. it was just in the init method along with regular recipes, etc. Your reference was static; You didn't use an instance of the FurnaceRecipes class to reference the method with, you used the static class. You should use an instance of the class unless the methods inside the class are static.
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.