Record Class TropicalFishMeta.Variant
java.lang.Object
java.lang.Record
net.minestom.server.entity.metadata.water.fish.TropicalFishMeta.Variant
- Enclosing class:
TropicalFishMeta
public static record TropicalFishMeta.Variant(@NotNull TropicalFishMeta.Pattern pattern, @NotNull DyeColor baseColor, @NotNull DyeColor patternColor)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVariant
(@NotNull TropicalFishMeta.Pattern pattern, @NotNull DyeColor baseColor, @NotNull DyeColor patternColor) Creates an instance of aVariant
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DyeColor
Returns the value of thebaseColor
record component.final boolean
Indicates whether some other object is "equal to" this one.static @NotNull TropicalFishMeta.Variant
fromPackedId
(int packedId) final int
hashCode()
Returns a hash code value for this object.int
packedId()
@NotNull TropicalFishMeta.Pattern
pattern()
Returns the value of thepattern
record component.@NotNull DyeColor
Returns the value of thepatternColor
record component.final String
toString()
Returns a string representation of this record class.@NotNull TropicalFishMeta.Variant
withBodyColor
(@NotNull DyeColor newBodyColor) @NotNull TropicalFishMeta.Variant
withPattern
(@NotNull TropicalFishMeta.Pattern newPattern) @NotNull TropicalFishMeta.Variant
withPatternColor
(@NotNull DyeColor newPatternColor)
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Variant
public Variant(@NotNull @NotNull TropicalFishMeta.Pattern pattern, @NotNull @NotNull DyeColor baseColor, @NotNull @NotNull DyeColor patternColor) Creates an instance of aVariant
record class.- Parameters:
pattern
- the value for thepattern
record componentbaseColor
- the value for thebaseColor
record componentpatternColor
- the value for thepatternColor
record component
-
-
Method Details
-
fromPackedId
-
packedId
public int packedId() -
withPattern
@NotNull public @NotNull TropicalFishMeta.Variant withPattern(@NotNull @NotNull TropicalFishMeta.Pattern newPattern) -
withBodyColor
@NotNull public @NotNull TropicalFishMeta.Variant withBodyColor(@NotNull @NotNull DyeColor newBodyColor) -
withPatternColor
@NotNull public @NotNull TropicalFishMeta.Variant withPatternColor(@NotNull @NotNull DyeColor newPatternColor) -
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)
. -
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
baseColor
Returns the value of thebaseColor
record component.- Returns:
- the value of the
baseColor
record component
-
patternColor
Returns the value of thepatternColor
record component.- Returns:
- the value of the
patternColor
record component
-