Record Class TropicalFish.Variant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.TropicalFish.Variant
- Enclosing class:
TropicalFish
public static record TropicalFish.Variant(TropicalFish.Pattern pattern, DyeColor baseColor, DyeColor patternColor)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DyeColor
The field for thebaseColor
record component.static final com.mojang.serialization.Codec
<TropicalFish.Variant> private final TropicalFish.Pattern
The field for thepattern
record component.private final DyeColor
The field for thepatternColor
record component. -
Constructor Summary
ConstructorDescriptionVariant
(int p_334003_) Variant
(TropicalFish.Pattern pattern, DyeColor baseColor, DyeColor patternColor) Creates an instance of aVariant
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseColor
record component.final boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.pattern()
Returns the value of thepattern
record component.Returns the value of thepatternColor
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
pattern
The field for thepattern
record component. -
baseColor
The field for thebaseColor
record component. -
patternColor
The field for thepatternColor
record component. -
CODEC
-
-
Constructor Details
-
Variant
public Variant(int p_334003_) -
Variant
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
-
getPackedId
public int getPackedId() -
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 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
-