Record Class BannerPatterns.Layer
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BannerPatterns.Layer
- Enclosing class:
BannerPatterns
public static record BannerPatterns.Layer(DynamicRegistry.Key<BannerPattern> pattern, @NotNull DyeColor color)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BinaryTagSerializer
<BannerPatterns.Layer> static final NetworkBuffer.Type
<BannerPatterns.Layer> -
Constructor Summary
ConstructorDescriptionLayer
(DynamicRegistry.Key<BannerPattern> pattern, @NotNull DyeColor color) Creates an instance of aLayer
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DyeColor
color()
Returns the value of thecolor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pattern()
Returns the value of thepattern
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
Layer
Creates an instance of aLayer
record class.- Parameters:
pattern
- the value for thepattern
record componentcolor
- the value for thecolor
record component
-
-
Method Details
-
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)
. -
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
color
Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-