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 SummaryFieldsModifier and TypeFieldDescriptionprivate final DyeColorThe field for thebaseColorrecord component.private final TropicalFish.PatternThe field for thepatternrecord component.private final DyeColorThe field for thepatternColorrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionVariant(TropicalFish.Pattern pattern, DyeColor baseColor, DyeColor patternColor) Creates an instance of aVariantrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thebaseColorrecord component.final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.pattern()Returns the value of thepatternrecord component.Returns the value of thepatternColorrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
patternThe field for thepatternrecord component.
- 
baseColorThe field for thebaseColorrecord component.
- 
patternColorThe field for thepatternColorrecord component.
 
- 
- 
Constructor Details- 
VariantCreates an instance of aVariantrecord class.- Parameters:
- pattern- the value for the- patternrecord component
- baseColor- the value for the- baseColorrecord component
- patternColor- the value for the- patternColorrecord component
 
 
- 
- 
Method Details- 
getPackedIdpublic int getPackedId()
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
patternReturns the value of thepatternrecord component.- Returns:
- the value of the patternrecord component
 
- 
baseColorReturns the value of thebaseColorrecord component.- Returns:
- the value of the baseColorrecord component
 
- 
patternColorReturns the value of thepatternColorrecord component.- Returns:
- the value of the patternColorrecord component
 
 
-