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 Codec
<BannerPatterns> static final int
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
(@NotNull Holder<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
-
CODEC
-
-
Constructor Details
-
BannerPatterns
Creates an instance of aBannerPatterns
record class.- Parameters:
layers
- the value for thelayers
record component
-
BannerPatterns
-
BannerPatterns
public BannerPatterns(@NotNull @NotNull Holder<BannerPattern> pattern, @NotNull @NotNull DyeColor color)
-
-
Method Details
-
with
-
toString
-
hashCode
-
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
-