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 Details

  • Constructor Details

    • Variant

      public Variant(@NotNull @NotNull TropicalFishMeta.Pattern pattern, @NotNull @NotNull DyeColor baseColor, @NotNull @NotNull DyeColor patternColor)
      Creates an instance of a Variant record class.
      Parameters:
      pattern - the value for the pattern record component
      baseColor - the value for the baseColor record component
      patternColor - the value for the patternColor record component
  • Method Details

    • fromPackedId

      @NotNull public static @NotNull TropicalFishMeta.Variant fromPackedId(int packedId)
    • 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pattern

      @NotNull public @NotNull TropicalFishMeta.Pattern pattern()
      Returns the value of the pattern record component.
      Returns:
      the value of the pattern record component
    • baseColor

      @NotNull public @NotNull DyeColor baseColor()
      Returns the value of the baseColor record component.
      Returns:
      the value of the baseColor record component
    • patternColor

      @NotNull public @NotNull DyeColor patternColor()
      Returns the value of the patternColor record component.
      Returns:
      the value of the patternColor record component