Record Class AnimalVariant
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.AnimalVariant
- Record Components:
modelType
- model type idtexture
- texture pathbiomes
- biomes this variant can spawn in, if limited to specific biomes
public record AnimalVariant(int modelType, String texture, @Nullable HolderSet biomes)
extends Record
Represents an animal variant (e.g. for cows, pigs, chickens).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAnimalVariant
(int modelType, String texture, @Nullable HolderSet biomes) Creates an instance of aAnimalVariant
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable HolderSet
biomes()
Returns the value of thebiomes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themodelType
record component.texture()
Returns the value of thetexture
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
modelType
public int modelType()Returns the value of themodelType
record component.- Returns:
- the value of the
modelType
record component
-
texture
Returns the value of thetexture
record component.- Returns:
- the value of the
texture
record component
-
biomes
Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-