Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

DoctorC

Members
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DoctorC

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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!
  2. 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. I could yeah, but I'm not sure what you'd need to see.
  3. 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?
  4. It works! I'm not sure about your final point about Ingredient.fromJson working already, as I used a different JSON key ('ingredientWithout' instead of 'ingredient') - so I didn't change this. Sorry to bother you again but what did you mean by 'forge:compound' earlier as a method of removing both bricks and nether bricks. I can easily do this with a custom tag, just wondering if that would be an easier way? Thanks!
  5. Yep, thanks - I've fixed this. Now that I have fixed up the getItems() method, JEI has all the ingots except brick - so that respect is working great! I've done this - but unfortunately the recipe still works with brick. Here are my new files: IngredientWithout.java: package my.mod.crafting; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; import net.minecraft.tags.ITag; import javax.annotation.Nonnull; import javax.ann
  6. Okay, so I've tried to implement this: IngredientWithout.java package my.mod.crafting; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; import net.minecraft.tags.ITag; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Arrays; import java.util.stream.Collectors; import java.util.stream.Stream; public class IngredientWithout extends Ingredient { private final Ingredient of; private final Ingredient without;
  7. Okay, I implemented this (without the forge:compound, no idea how to do this): package my.mod.crafting; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; import java.util.Arrays; import java.util.stream.Stream; public class IngredientWithout extends Ingredient { protected IngredientWithout(Stream<? extends IItemList> p_i49381_1_) { super(p_i49381_1_); } public static IngredientWithout of(Ingredient of, Ingredient without) { Stream<ItemStack> withoutItems = Arrays.stream(of.getItems()).filter(without); Ing
  8. Sorry, I'm still not sure what you mean? I have a RegistryObject<IRecipeSerializer<PressingRecipe>> which is used for my custom recipe type. I have tried creating an Ingredient from a list of ItemStacks, generated using Tags.Items.INGOTS and removing the brick and nether brick tags (similar to as seen above) - but this produced the same error as in my original post.
  9. It uses a custom recipe builder, but it's pretty similar to the furnace builders: PressingRecipeBuilder.builder(Ingredient.of(ModTags.Items.INGOTS_METAL), ModItems.SHEET_METAL.get()) .unlockedBy("has_item", has(ModTags.Items.INGOTS_METAL)) .save(consumer, mod("sheet_metal_pressing"))
  10. Sorry. You said that 'I would just check at runtime if the item is in the ingots tag but not in the brick or nether brick tags'. How would I go about doing this?
  11. Okay, I guess that's the only option. I'd like to have multiple recipes, so is there a good way to remove the bricks for the specific recipe instead of completely removing any support for them as an input Ingredient?
  12. I think this is what you mean? ModItemTagsProvider.java package my.mod.data; import my.mod.Main; import my.mod.setup.ModTags; import net.minecraft.data.BlockTagsProvider; import net.minecraft.data.DataGenerator; import net.minecraft.data.ItemTagsProvider; import net.minecraft.item.Item; import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.ExistingFileHelper; import java.util.List; public class ModItemTagsProvider extends ItemTagsProvider { public ModItemTagsProvider(DataGenerator dataGenerator, BlockTagsProvider blockTagsProvider, ExistingFileHelper exis
  13. Sorry, that's what I was doing? If you mean create my own complete tag, I tried mod:metal_ingots, but this raised the exact same error. Or, if you mean just putting iron, gold, and netherite in the same tag - other mods won't automatically integrate if they add their ingots to the forge:ingots tag.
  14. I have been trying to use the forge:ingots tag (as an Ingredient) in a custom recipe to create a 'sheet metal' item. Unfortunately, I found that this tag includes brick and nether brick as well as the metal ingots. I could just use the individual forge:ingots/gold, forge:ingots/iron, etc. tags - but this means that new ingots added to the forge:ingots tag won't automatically work with my recipe. As a workaround, I tried to create a forge:ingots/metals tag, using the following code: List<Item> metalIngots = Tags.Items.INGOTS.getValues(); metalIngots.removeAll(Tags.Items
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.