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

So I would like to create a custom recipe where one of the items can be any furnace fuel.

I tried using AbstractFurnaceTileEntity.getFuel() and creating an Ingredient from its keys.

Unfortunately, there are a few issues with this:

  • this method is deprecated
  • it came up with this error on runData: "Tag minecraft:non_flammable_wood used before it was bound"
  • it doesn't support custom furnace fuels added by other mods (I think)

What would the correct way to generate a list of all furnace fuels be?

Comment of the method: 

Quote

//Forge - get burn times by calling ForgeHooks#getBurnTime(ItemStack)

so you should probably use it.

 

Can you show more of your code?

  • Author
40 minutes ago, poopoodice said:

Comment of the method: 

so you should probably use it.

Yes, I've used the method before.

Are you suggesting that I loop through every single registered block and see if it is burnable?

That seems pretty laggy and I'm not even sure how to get a list of all blocks.

 

43 minutes ago, poopoodice said:

Can you show more of your code?

I could yeah, but I'm not sure what you'd need to see.

 

ForgeRegistries.ITEMS.getValues() allows you to get all items. If I were you I will create and save the recipes with vanilla fuels, and then maybe check the input dynamically if it's from other mods (iterate through all other mod items once, and cache them), although there should be a better way for doing this...

In fact you might not need recipes for this, unless you really want the players to be able to customize them.

 

 

Edited by poopoodice

  • Author
14 minutes ago, poopoodice said:

ForgeRegistries.ITEMS.getValues() allows you to get all items. If I were you I will create and save the recipes with vanilla fuels, and then maybe check the input dynamically if it's from other mods (iterate through all other mod items once, and cache them), although there should be a better way for doing this...

In fact you might not need recipes for this, unless you really want the players to be able to customize them.

 

 

Hmm, okay.

Yeah I need to do recipes, but I'll probably just have to hard code in this specific case and have recipes as overrides.

Thanks!

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.