Class FluidIngredient

java.lang.Object
de.cech12.bucketlib.api.crafting.FluidIngredient
All Implemented Interfaces:
net.neoforged.neoforge.common.crafting.ICustomIngredient

public class FluidIngredient extends Object implements net.neoforged.neoforge.common.crafting.ICustomIngredient
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<FluidIngredient>
     
    protected final net.minecraft.world.level.material.Fluid
     
    protected final net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>
     
    static final net.neoforged.neoforge.common.crafting.IngredientType<FluidIngredient>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FluidIngredient(Optional<net.minecraft.resources.ResourceLocation> fluidOptional, Optional<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>> tagOptional)
     
    FluidIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag)
     
    FluidIngredient(net.minecraft.world.level.material.Fluid fluid)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.neoforged.neoforge.common.crafting.IngredientType<?>
     
    boolean
     
    Stream<net.minecraft.core.Holder<net.minecraft.world.item.Item>>
     
    boolean
    test(net.minecraft.world.item.ItemStack itemStack)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.common.crafting.ICustomIngredient

    display, toVanilla
  • Field Details

    • fluid

      protected final net.minecraft.world.level.material.Fluid fluid
    • tag

      protected final net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag
    • CODEC

      public static final com.mojang.serialization.MapCodec<FluidIngredient> CODEC
    • TYPE

      public static final net.neoforged.neoforge.common.crafting.IngredientType<FluidIngredient> TYPE
  • Constructor Details

    • FluidIngredient

      public FluidIngredient(Optional<net.minecraft.resources.ResourceLocation> fluidOptional, Optional<net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid>> tagOptional)
    • FluidIngredient

      public FluidIngredient(net.minecraft.world.level.material.Fluid fluid)
    • FluidIngredient

      public FluidIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.material.Fluid> tag)
  • Method Details

    • test

      public boolean test(@Nonnull net.minecraft.world.item.ItemStack itemStack)
      Specified by:
      test in interface net.neoforged.neoforge.common.crafting.ICustomIngredient
    • items

      @Nonnull public Stream<net.minecraft.core.Holder<net.minecraft.world.item.Item>> items()
      Specified by:
      items in interface net.neoforged.neoforge.common.crafting.ICustomIngredient
    • isSimple

      public boolean isSimple()
      Specified by:
      isSimple in interface net.neoforged.neoforge.common.crafting.ICustomIngredient
    • getType

      @Nonnull public net.neoforged.neoforge.common.crafting.IngredientType<?> getType()
      Specified by:
      getType in interface net.neoforged.neoforge.common.crafting.ICustomIngredient