Record Class ItemIngredientValueAdvancedIngredient
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.ingredient.advanced.ItemIngredientValueAdvancedIngredient
- All Implemented Interfaces:
IAdvancedIngredient<net.minecraft.world.item.ItemStack>,IForcingItemAdvancedIngredient,ItemAdvancedIngredient,ITypelessAdvancedIngredient<net.minecraft.world.item.ItemStack>,Predicate<net.minecraft.world.item.ItemStack>
public record ItemIngredientValueAdvancedIngredient(net.minecraft.world.item.crafting.Ingredient.Value ingredientValue)
extends Record
implements ItemAdvancedIngredient
-
Field Summary
Fields inherited from interface com.petrolpark.core.recipe.ingredient.advanced.ItemAdvancedIngredient
CODEC, STREAM_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionItemIngredientValueAdvancedIngredient(net.minecraft.world.item.crafting.Ingredient.Value ingredientValue) Creates an instance of aItemIngredientValueAdvancedIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCounterDescription(Lang.IndentedTooltipBuilder description) voidaddToDescription(Lang.IndentedTooltipBuilder description) final booleanIndicates whether some other object is "equal to" this one.NamedAdvancedIngredientType<net.minecraft.world.item.ItemStack> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.Ingredient.ValueReturns the value of theingredientValuerecord component.booleantest(net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.petrolpark.core.recipe.ingredient.advanced.IAdvancedIngredient
simplifyMethods inherited from interface com.petrolpark.core.recipe.ingredient.advanced.ItemAdvancedIngredient
forbidLootItemFunction, forbidTradeListing, forceLootItemFunction, forceTradeListing, translate, translateInverse, translateSimpleMethods inherited from interface com.petrolpark.core.recipe.ingredient.advanced.ITypelessAdvancedIngredient
checkedCast, modifyCounterExamples, modifyExamples, streamCounterExamples, streamExamples
-
Constructor Details
-
ItemIngredientValueAdvancedIngredient
public ItemIngredientValueAdvancedIngredient(net.minecraft.world.item.crafting.Ingredient.Value ingredientValue) Creates an instance of aItemIngredientValueAdvancedIngredientrecord class.- Parameters:
ingredientValue- the value for theingredientValuerecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.world.item.ItemStack stack) - Specified by:
testin interfaceItemAdvancedIngredient- Specified by:
testin interfacePredicate<net.minecraft.world.item.ItemStack>
-
addToDescription
- Specified by:
addToDescriptionin interfaceITypelessAdvancedIngredient<net.minecraft.world.item.ItemStack>
-
addToCounterDescription
- Specified by:
addToCounterDescriptionin interfaceITypelessAdvancedIngredient<net.minecraft.world.item.ItemStack>
-
getType
- Specified by:
getTypein interfaceIAdvancedIngredient<net.minecraft.world.item.ItemStack>- Specified by:
getTypein interfaceItemAdvancedIngredient
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ingredientValue
public net.minecraft.world.item.crafting.Ingredient.Value ingredientValue()Returns the value of theingredientValuerecord component.- Returns:
- the value of the
ingredientValuerecord component
-