Record Class IsCompressedItemAttribute
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.core.item.IsCompressedItemAttribute
- All Implemented Interfaces:
PetrolparkItemAttribute,com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
public record IsCompressedItemAttribute(net.minecraft.world.item.ItemStack baseItem)
extends Record
implements PetrolparkItemAttribute
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute.ItemAttributeEntry -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<IsCompressedItemAttribute> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, IsCompressedItemAttribute> static final IsCompressedItemAttribute.Type -
Constructor Summary
ConstructorsConstructorDescriptionIsCompressedItemAttribute(net.minecraft.world.item.ItemStack baseItem) Creates an instance of aIsCompressedItemAttributerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) net.minecraft.world.item.ItemStackbaseItem()Returns the value of thebaseItemrecord component.final booleanIndicates whether some other object is "equal to" this one.Object[]com.simibubi.create.content.logistics.item.filter.attribute.ItemAttributeTypegetType()final inthashCode()Returns a hash code value for this object.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.compat.create.core.item.PetrolparkItemAttribute
format
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,IsCompressedItemAttribute> STREAM_CODEC -
TYPE
-
-
Constructor Details
-
IsCompressedItemAttribute
public IsCompressedItemAttribute(net.minecraft.world.item.ItemStack baseItem) Creates an instance of aIsCompressedItemAttributerecord class.- Parameters:
baseItem- the value for thebaseItemrecord component
-
-
Method Details
-
appliesTo
public boolean appliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world) - Specified by:
appliesToin interfacecom.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
-
getType
public com.simibubi.create.content.logistics.item.filter.attribute.ItemAttributeType getType()- Specified by:
getTypein interfacecom.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
-
getTranslationKey
- Specified by:
getTranslationKeyin interfacecom.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
-
getTranslationParameters
- Specified by:
getTranslationParametersin interfacecom.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
-
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). -
baseItem
public net.minecraft.world.item.ItemStack baseItem()Returns the value of thebaseItemrecord component.- Returns:
- the value of the
baseItemrecord component
-