Jump to content

Recommended Posts

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?

Posted
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.

 

Posted (edited)

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
Posted
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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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