Posted July 15, 20214 yr 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?
July 15, 20214 yr 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?
July 15, 20214 yr 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.
July 15, 20214 yr 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 July 15, 20214 yr by poopoodice
July 15, 20214 yr 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.