Posted February 17, 20187 yr Hi, so I am looking into doing two things right now: 1.) Adding a custom machine that acts sort of like a furnace, except it only outputs a single item. 2.) I want the item that it exports to act like a container with some type of metadata (i guess) to give the item different values So basically, say you put in 5 logs, I want the machine to be able to calculate the fuel value of those logs, and then output something like a "fuel source container" that can then be placed in a furnace. So somehow I'd need this "fuel source container" to be able to store a varied amount of some metadata so it can variably have different burn times in furnaces, and also not be removed from the fuel slot when depleted, just left at 0 out of the max possible containment. This is the most advanced thing I've ever tried to do and I haven't really been able to find any advanced mod tutorials for this type of thing or even just making the item. Any help or guidance would be greatly appreciated
February 18, 20187 yr I would recommend using nbt data rather than meta data. Meta data is just an integer value between 0 and 15 (inclusive), and obviously you could do all sorts of maths to that to get the burn times you want, but ultimately your item could only have 16 possible states (burn times). With an NBTTagCompound you just store what ever value like and name it say "burntime" when the itemstack is created by your machine. Now, for the function to determine the burn time of an individual container you will need to make an event handler and hook into FurnaceFuelBurnTimeEvent. This is fired when the furnace tries to determine the fuel value of an ItemStack and is where you want to look for the value you stored in nbt under the name "burntime." For the second half of your question, getting it not to remove the item its burning, I would look at how vanilla minecraft handles using buckets of lava as fuel.
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.