Record Class BannerPatterns
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BannerPatterns
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final BinaryTagSerializer
<BannerPatterns> static final NetworkBuffer.Type
<BannerPatterns> -
Constructor Summary
ConstructorsConstructorDescriptionBannerPatterns
(@NotNull List<BannerPatterns.Layer> layers) Creates an instance of aBannerPatterns
record class.BannerPatterns
(@NotNull BannerPatterns.Layer layer) BannerPatterns
(DynamicRegistry.Key<BannerPattern> pattern, @NotNull DyeColor color) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<BannerPatterns.Layer> layers()
Returns the value of thelayers
record component.final String
toString()
Returns a string representation of this record class.@NotNull BannerPatterns
with
(@NotNull BannerPatterns.Layer layer)
-
Field Details
-
MAX_LAYERS
public static final int MAX_LAYERS- See Also:
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
BannerPatterns
Creates an instance of aBannerPatterns
record class.- Parameters:
layers
- the value for thelayers
record component
-
BannerPatterns
-
BannerPatterns
public BannerPatterns(@NotNull DynamicRegistry.Key<BannerPattern> pattern, @NotNull @NotNull DyeColor color)
-
-
Method Details
-
with
-
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)
. -
layers
Returns the value of thelayers
record component.- Returns:
- the value of the
layers
record component
-