Jeerdus Posted November 23, 2013 Share Posted November 23, 2013 Good day once again! I'm working on a "chemistry" mod and I made a machine which is supposed to extract elements from water, lava, iron, etc. Basically now I want to make so it requires 2 items to start smelting for only some recipes. Quote Link to comment Share on other sites More sharing options...
coolAlias Posted November 23, 2013 Share Posted November 23, 2013 If you've made custom furnaces before, then you should be able to do it. Think of it like this: vanilla furnace already requires 2 items to smelt, fuel and ore. All you need to do is add an extra slot to the container and update the tile entity canSmelt, smeltItem, etc. logic to take the extra slot into account. As for the recipes, look at how vanilla furnace smelting recipes are set up, in a HashMap with a List of Integers as the key to return an ItemStack. The key (list of integers) stores both the id and metadata value of the 'input' ItemStack, but since it's a List, there's nothing stopping you from storing 2 or more ItemStack's worth of information in there. You just need to update the logic and methods to handle it. If you need a more concrete example, take a look here: http://www.minecraftforum.net/topic/1961477-multi-inputoutput-furnace-with-variable-input-recipes/ Be forewarned I don't cover the basics of furnaces there; for that I recommend you check out courses.vswe.se which covers many things about tile entities and other stuff. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Jeerdus Posted November 24, 2013 Author Share Posted November 24, 2013 Thanks for the reply, but I think you didn't understand my question I have 4 slots in my machine 1. Item input 2. Cell input (it is always the same item) 3. Fuel slot 4. Output slot Now I'll give you an example: I have 1 Item that will go into the 1st slot. Now for the recipe, I require 2 cells that will go into the 2nd slot. Of course I will need some fuel, that will go into the 3rd slot. Simply, I want it go something like this, but only for certain recipes: Quote Link to comment Share on other sites More sharing options...
Jeerdus Posted November 24, 2013 Author Share Posted November 24, 2013 Quick update: Somehow made it to work, now I'm trying to do, if the cell slot stack size is smaller then 2, don't do the recipe. Quote Link to comment Share on other sites More sharing options...
Jeerdus Posted November 24, 2013 Author Share Posted November 24, 2013 Fixed it! I don't need help anymore! But thanks for the help anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.