Record Class CreateItemAttributeAdvancedIngredient
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.ingredient.advanced.CreateItemAttributeAdvancedIngredient
- All Implemented Interfaces:
IAdvancedIngredient<net.minecraft.world.item.ItemStack>,ITypelessAdvancedIngredient<net.minecraft.world.item.ItemStack>,Predicate<net.minecraft.world.item.ItemStack>
public record CreateItemAttributeAdvancedIngredient(com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute attribute)
extends Record
implements IAdvancedIngredient<net.minecraft.world.item.ItemStack>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CreateItemAttributeAdvancedIngredient> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, CreateItemAttributeAdvancedIngredient> -
Constructor Summary
ConstructorsConstructorDescriptionCreateItemAttributeAdvancedIngredient(com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute attribute) Creates an instance of aCreateItemAttributeAdvancedIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCounterDescription(Lang.IndentedTooltipBuilder description) voidaddToDescription(Lang.IndentedTooltipBuilder description) com.simibubi.create.content.logistics.item.filter.attribute.ItemAttributeReturns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.INamedAdvancedIngredientType<net.minecraft.world.item.ItemStack> getType()final inthashCode()Returns a hash code value for this object.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.ITypelessAdvancedIngredient
checkedCast, modifyCounterExamples, modifyExamples, streamCounterExamples, streamExamples
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,CreateItemAttributeAdvancedIngredient> STREAM_CODEC
-
-
Constructor Details
-
CreateItemAttributeAdvancedIngredient
public CreateItemAttributeAdvancedIngredient(com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute attribute) Creates an instance of aCreateItemAttributeAdvancedIngredientrecord class.- Parameters:
attribute- the value for theattributerecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.world.item.ItemStack stack) -
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>
-
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). -
attribute
public com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-