Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 :)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.