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 aVariantrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DyeColorReturns the value of thebaseColorrecord component.final booleanIndicates whether some other object is "equal to" this one.static @NotNull TropicalFishMeta.VariantfromPackedId(int packedId) final inthashCode()Returns a hash code value for this object.intpackedId()@NotNull TropicalFishMeta.Patternpattern()Returns the value of thepatternrecord component.@NotNull DyeColorReturns the value of thepatternColorrecord component.final StringtoString()Returns a string representation of this record class.@NotNull TropicalFishMeta.VariantwithBodyColor(@NotNull DyeColor newBodyColor) @NotNull TropicalFishMeta.VariantwithPattern(@NotNull TropicalFishMeta.Pattern newPattern) @NotNull TropicalFishMeta.VariantwithPatternColor(@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 aVariantrecord class.- Parameters:
pattern- the value for thepatternrecord componentbaseColor- the value for thebaseColorrecord componentpatternColor- the value for thepatternColorrecord 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
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 thepatternrecord component.- Returns:
- the value of the
patternrecord component
-
baseColor
Returns the value of thebaseColorrecord component.- Returns:
- the value of the
baseColorrecord component
-
patternColor
Returns the value of thepatternColorrecord component.- Returns:
- the value of the
patternColorrecord component
-