Class AbstractIngredient
java.lang.Object
net.minecraft.world.item.crafting.Ingredient
net.minecraftforge.common.crafting.ingredients.AbstractIngredient
- Direct Known Subclasses:
CompoundIngredient
,DifferenceIngredient
,IntersectionIngredient
,PartialNBTIngredient
,StrictNBTIngredient
Extension of
Ingredient
which makes most methods custom ingredients need to implement abstract, and removes the static constructors
Mods are encouraged to extend this class for their custom ingredients-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.crafting.Ingredient
Ingredient.ItemValue, Ingredient.TagValue, Ingredient.Value
-
Field Summary
Fields inherited from class net.minecraft.world.item.crafting.Ingredient
CODEC, CODEC_NONEMPTY, EMPTY, VANILLA_CODEC
-
Constructor Summary
ModifierConstructorDescriptionprotected
Empty constructor, for the sake of dynamic ingredientsprotected
AbstractIngredient
(Stream<? extends Ingredient.Value> values) Value constructor, for ingredients that have some vanilla representation -
Method Summary
Modifier and TypeMethodDescriptionstatic Ingredient
fromNetwork
(FriendlyByteBuf buffer) Deprecated.static Ingredient
fromValues
(Stream<? extends Ingredient.Value> values) Deprecated.abstract boolean
isSimple()
static Ingredient
of()
Deprecated.useIngredient.of()
static Ingredient
Deprecated.useIngredient.of(Stream)
(Stream)}static Ingredient
Deprecated.useIngredient.of(TagKey)
(Stream)}static Ingredient
Deprecated.useIngredient.of(ItemStack...)
(Stream)}static Ingredient
Deprecated.useIngredient.of(ItemLike...)
(Stream)}abstract IIngredientSerializer<? extends Ingredient>
Methods inherited from class net.minecraft.world.item.crafting.Ingredient
checkInvalidation, equals, getItems, getStackingIds, invalidate, invalidateAll, isEmpty, isVanilla, markValid, test, toJson, toNetwork
-
Constructor Details
-
AbstractIngredient
protected AbstractIngredient()Empty constructor, for the sake of dynamic ingredients -
AbstractIngredient
Value constructor, for ingredients that have some vanilla representation
-
-
Method Details
-
isSimple
public abstract boolean isSimple()- Overrides:
isSimple
in classIngredient
-
serializer
- Overrides:
serializer
in classIngredient
-
fromValues
Deprecated. -
of
Deprecated.useIngredient.of()
-
of
Deprecated.useIngredient.of(ItemLike...)
(Stream)} -
of
Deprecated.useIngredient.of(ItemStack...)
(Stream)} -
of
Deprecated.useIngredient.of(Stream)
(Stream)} -
of
Deprecated.useIngredient.of(TagKey)
(Stream)} -
fromNetwork
Deprecated.
-
Ingredient.fromNetwork(FriendlyByteBuf)