Class BlockIngredient

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

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

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

    Constructors
    Constructor
    Description
    BlockIngredient(Optional<net.minecraft.resources.ResourceLocation> blockOptional, Optional<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> tagOptional)
     
    BlockIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag)
     
    BlockIngredient(net.minecraft.world.level.block.Block block)
     
  • 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

    • block

      protected final net.minecraft.world.level.block.Block block
    • tag

      protected final net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag
    • CODEC

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

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

    • BlockIngredient

      public BlockIngredient(Optional<net.minecraft.resources.ResourceLocation> blockOptional, Optional<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> tagOptional)
    • BlockIngredient

      public BlockIngredient(net.minecraft.world.level.block.Block block)
    • BlockIngredient

      public BlockIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> 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