Class NeoForgeIngredient<T extends IngredientLogic<T>>

java.lang.Object
net.darkhax.bookshelf.neoforge.impl.data.NeoForgeIngredient<T>
All Implemented Interfaces:
net.neoforged.neoforge.common.crafting.ICustomIngredient

public class NeoForgeIngredient<T extends IngredientLogic<T>> extends Object implements net.neoforged.neoforge.common.crafting.ICustomIngredient
  • Constructor Summary

    Constructors
    Constructor
    Description
    NeoForgeIngredient(T logic, Supplier<net.neoforged.neoforge.common.crafting.IngredientType<?>> type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Stream<net.minecraft.world.item.ItemStack>
     
    @NotNull net.neoforged.neoforge.common.crafting.IngredientType<?>
     
    boolean
     
    static <T extends IngredientLogic<T>>
    net.neoforged.neoforge.common.crafting.IngredientType<NeoForgeIngredient<T>>
    makeIngredientType(net.minecraft.resources.ResourceLocation id, com.mojang.serialization.MapCodec<T> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,T> stream)
     
    boolean
    test(@NotNull net.minecraft.world.item.ItemStack stack)
     

    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

    toVanilla
  • Constructor Details

    • NeoForgeIngredient

      public NeoForgeIngredient(T logic, Supplier<net.neoforged.neoforge.common.crafting.IngredientType<?>> type)
  • Method Details

    • test

      public boolean test(@NotNull @NotNull net.minecraft.world.item.ItemStack stack)
      Specified by:
      test in interface net.neoforged.neoforge.common.crafting.ICustomIngredient
    • getItems

      @NotNull public @NotNull Stream<net.minecraft.world.item.ItemStack> getItems()
      Specified by:
      getItems in interface net.neoforged.neoforge.common.crafting.ICustomIngredient
    • isSimple

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

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

      public static <T extends IngredientLogic<T>> net.neoforged.neoforge.common.crafting.IngredientType<NeoForgeIngredient<T>> makeIngredientType(net.minecraft.resources.ResourceLocation id, com.mojang.serialization.MapCodec<T> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,T> stream)