Record Class ShulkerFillLevelAttribute
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute
- All Implemented Interfaces:
ItemAttribute
public record ShulkerFillLevelAttribute(com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute.ShulkerLevels levels)
extends Record
implements ItemAttribute
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
ItemAttribute.ItemAttributeEntry -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ShulkerFillLevelAttribute> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, ShulkerFillLevelAttribute> -
Constructor Summary
ConstructorsConstructorDescriptionShulkerFillLevelAttribute(com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute.ShulkerLevels levels) Creates an instance of aShulkerFillLevelAttributerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level) final booleanIndicates whether some other object is "equal to" this one.Object[]getType()final inthashCode()Returns a hash code value for this object.com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute.ShulkerLevelslevels()Returns the value of thelevelsrecord component.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.simibubi.create.content.logistics.item.filter.attribute.ItemAttribute
format
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,ShulkerFillLevelAttribute> STREAM_CODEC
-
-
Constructor Details
-
ShulkerFillLevelAttribute
public ShulkerFillLevelAttribute(com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute.ShulkerLevels levels) Creates an instance of aShulkerFillLevelAttributerecord class.- Parameters:
levels- the value for thelevelsrecord component
-
-
Method Details
-
appliesTo
public boolean appliesTo(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level) - Specified by:
appliesToin interfaceItemAttribute
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceItemAttribute
-
getTranslationParameters
- Specified by:
getTranslationParametersin interfaceItemAttribute
-
getType
- Specified by:
getTypein interfaceItemAttribute
-
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). -
levels
public com.simibubi.create.content.logistics.item.filter.attribute.attributes.ShulkerFillLevelAttribute.ShulkerLevels levels()Returns the value of thelevelsrecord component.- Returns:
- the value of the
levelsrecord component
-