Record Class ItemAttributeModifiers.Display.Default
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.ItemAttributeModifiers.Display.Default
- All Implemented Interfaces:
ItemAttributeModifiers.Display
- Enclosing interface:
ItemAttributeModifiers.Display
public static record ItemAttributeModifiers.Display.Default()
extends Record
implements ItemAttributeModifiers.Display
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.item.component.ItemAttributeModifiers.Display
ItemAttributeModifiers.Display.Default, ItemAttributeModifiers.Display.Hidden, ItemAttributeModifiers.Display.OverrideText, ItemAttributeModifiers.Display.Type
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final com.mojang.serialization.MapCodec
<ItemAttributeModifiers.Display.Default> (package private) static final ItemAttributeModifiers.Display.Default
(package private) static final StreamCodec
<RegistryFriendlyByteBuf, ItemAttributeModifiers.Display.Default> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(Consumer<Component> p_415634_, Player p_415547_, Holder<Attribute> p_416596_, AttributeModifier p_415942_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.type()
-
Field Details
-
INSTANCE
-
CODEC
-
STREAM_CODEC
static final StreamCodec<RegistryFriendlyByteBuf,ItemAttributeModifiers.Display.Default> STREAM_CODEC
-
-
Constructor Details
-
Default
public Default()Creates an instance of aDefault
record class.
-
-
Method Details
-
type
- Specified by:
type
in interfaceItemAttributeModifiers.Display
-
apply
public void apply(Consumer<Component> p_415634_, @Nullable Player p_415547_, Holder<Attribute> p_416596_, AttributeModifier p_415942_) - Specified by:
apply
in interfaceItemAttributeModifiers.Display
-
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.
-