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

Hello!

 

I've been trying to make something happen in my mod when a fuel item in for example a vanilla furnace is consumed, but I can't quite figure out how to do this.

The event that came close was the FurnaceFuelBurnTimeEvent, which fires whenever a fuel item is used, but it also fires when an item is inserted into the fuel slot of the furnace.

When it is inserted using shift-click, it even fires twice and when inserted using a hopper it fires even more often.

How would I go about making my mod do something only when a fuel item is actually consumed?

 

Thanks for your help,

Desharin

 

  • Author

I was thinking of releasing something like pollution into the environment when an unclean fuel source is used.

Is there no "hacky" way of doing it by keeping track of the items in the inventory? I imagine this would be quite resource intensive though.

  • Author

I guess I could work around it by releasing the pollution whenever the items are inserted into the furnace, and subtracting it if they are taken out again, but that seems rather messy to me.

  • Author

I'd rather not overwrite the vanilla furnace. Perhaps I could work on a subevent of FurnaceFuelBurnTimeEvent which would only fire when the burnTime is checked to add burnTime to the furnace, while the main event would still fire every time burnTime is checked? I should probably post a suggestion for this first since I don't trust my coding skills too much and to poll other people's opinions.

Thanks for your help though, I'll shelve my mod idea for now.

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.