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 aAnimalVariantrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable HolderSetbiomes()Returns the value of thebiomesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themodelTyperecord component.texture()Returns the value of thetexturerecord component.final StringtoString()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 themodelTyperecord component.- Returns:
- the value of the
modelTyperecord component
-
texture
Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
biomes
Returns the value of thebiomesrecord component.- Returns:
- the value of the
biomesrecord component
-