Class HTItemIngredient
-
- All Implemented Interfaces:
-
hiiragi283.core.api.recipe.ingredient.HTIngredient,hiiragi283.core.api.text.HTHasText,java.util.function.BiPredicate
@JvmInline() public final class HTItemIngredient implements HTIngredient<Item, HTItemResourceType>
HTItemResourceType向けにHTIngredientを実装したクラスです。
- Since:
0.4.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description public final static BiCodec<RegistryFriendlyByteBuf, HTItemIngredient>UNSIZED_CODECpublic final static BiCodec<RegistryFriendlyByteBuf, HTItemIngredient>CODECprivate final SizedIngredientdelegateprivate final Ingredientingredient
-
Constructor Summary
Constructors Constructor Description HTItemIngredient(SizedIngredient delegate)HTItemIngredient(Ingredient ingredient, Integer count)
-
Method Summary
Modifier and Type Method Description final SizedIngredientgetDelegate()final IngredientgetIngredient()final Booleantest(ItemStack stack)final BooleantestOnlyType(ItemStack stack)BooleantestOnlyType(HTItemResourceType resource)指定したresourceが条件を満たしているか判定します。 final HTItemIngredientcopyWithCount(IntUnaryOperator operator)IntegergetRequiredAmount()この材料が要求する量を返します。 Either<TagKey<Item>, List<HTItemResourceType>>unwrap()この材料に一致するすべての種類を返します。 -
Methods inherited from class hiiragi283.core.api.recipe.ingredient.HTIngredient
getText, test -
Methods inherited from class java.util.function.BiPredicate
and, negate, or -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTItemIngredient
HTItemIngredient(SizedIngredient delegate)
-
HTItemIngredient
HTItemIngredient(Ingredient ingredient, Integer count)
-
-
Method Detail
-
getDelegate
final SizedIngredient getDelegate()
-
getIngredient
final Ingredient getIngredient()
-
testOnlyType
final Boolean testOnlyType(ItemStack stack)
-
testOnlyType
Boolean testOnlyType(HTItemResourceType resource)
指定したresourceが条件を満たしているか判定します。
-
copyWithCount
final HTItemIngredient copyWithCount(IntUnaryOperator operator)
-
getRequiredAmount
Integer getRequiredAmount()
この材料が要求する量を返します。
-
unwrap
Either<TagKey<Item>, List<HTItemResourceType>> unwrap()
この材料に一致するすべての種類を返します。
-
-
-
-