Record Class PigVariant
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.PigVariant
-
Constructor Summary
ConstructorsConstructorDescriptionPigVariant(int modelId, net.kyori.adventure.key.Key texture, @Nullable HolderSet biomes) Creates an instance of aPigVariantrecord 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.intmodelId()Returns the value of themodelIdrecord component.net.kyori.adventure.key.Keytexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PigVariant
public PigVariant(int modelId, net.kyori.adventure.key.Key texture, @Nullable @Nullable HolderSet biomes) Creates an instance of aPigVariantrecord class.- Parameters:
modelId- the value for themodelIdrecord componenttexture- the value for thetexturerecord componentbiomes- the value for thebiomesrecord component
-
-
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 '=='. -
modelId
public int modelId()Returns the value of themodelIdrecord component.- Returns:
- the value of the
modelIdrecord component
-
texture
public net.kyori.adventure.key.Key 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
-