Posted December 17, 201311 yr I have tried this FurnaceRecipes.smelting().addSmelting(OreDictionary.getOreID("oreCopper"), new ItemStack(Blocks.rockwoolBlock), 0.1F); but I cant get it to work, can someone assist with this.
December 17, 201311 yr The getOreID is only for the hashmap in the oredictionary. No use for that. for(ItemStack ore : Oredictionary.getOres("oreCopper")) { if(ore != null) //i am always more than becarefull with that { if(ore.getItemDamage() != -1 || ore.getItemDamage() != OreDictionary.WILDCARDVALUE) { FurnaceRecipes.smelting().addSmelting(ore.itemID, ore.getItemDamage(), new ItemStack(Blocks.rockwoolBlock)); } else { FurnaceRecipes.smelting().addSmelting(ore.itemID, new ItemStack(Blocks.rockwoolBlock)); } } } Hope it help
December 17, 201311 yr Author I tried that but it didn't work unfortunately, I was wonder is it passable to instead use the items ID and make multiple recipes for the different ids Such as for IC2 copper = 249 Buildcraft copper 1398:1 FurnaceRecipes.smelting().addSmelting(?, new ItemStack(Items.rockwoolBlock), 0.1F); //rockwoolBlockis just a place holder for now
December 17, 201311 yr Author This worked, the problem I see with this is id conflicts between different mods using the id, so maybe I should make a config file that allows for the item ID's to be corrected to the appropriate item id if such conflicts occur. //IC2 copper item id 249 FurnaceRecipes.smelting().addSmelting(249, new ItemStack(Block.blockLapis), 0.7F); //Buildcraft copper item id 1398:1 FurnaceRecipes.smelting().addSmelting(1398, 1, new ItemStack(Block.blockLapis), 0.7F);
December 17, 201311 yr Vanilla furnace recipes are unique. If you use an item that another mod has already a furnace recipe for, you'll remove it. I'd recommend making a different furnace with such recipes.
December 17, 201311 yr Author I will be doing that in the future. But for now while i'm here im stuck again, What I want to do is when the block is smelted it will have a chance of dropping between 5 and 10 of the result. So far i have FurnaceRecipes.smelting().addSmelting(249, new ItemStack(Item.arrow, Random()), 0.1F); I did some searching to try and find a random int generator and i found this private static int Random() { int x; x = 5 + (int)(Math.random() * ((10 - 5) + 1)); return x ; However it just keeps returning 5
December 17, 201311 yr You can't register that recipe. You'll have to register an ICraftingHandler for that. Set the minimum result (5) in your recipe, then in onSmelting(EntityPlayer player, ItemStack result) check the result for corresponding item, and add to its stackSize a new Random().nextInt(5). By the way: ((10 - 5) + 1) = 6
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.