Record Class Bee
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.Bee
public record Bee(com.viaversion.nbt.tag.CompoundTag entityData, int ticksInHive, int minTicksInHive)
extends Record
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBee
(com.viaversion.nbt.tag.CompoundTag entityData, int ticksInHive, int minTicksInHive) Creates an instance of aBee
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.viaversion.nbt.tag.CompoundTag
Returns the value of theentityData
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 theminTicksInHive
record component.int
Returns the value of theticksInHive
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
TYPE
-
ARRAY_TYPE
-
-
Constructor Details
-
Bee
public Bee(com.viaversion.nbt.tag.CompoundTag entityData, int ticksInHive, int minTicksInHive) Creates an instance of aBee
record class.- Parameters:
entityData
- the value for theentityData
record componentticksInHive
- the value for theticksInHive
record componentminTicksInHive
- the value for theminTicksInHive
record 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 '=='. -
entityData
public com.viaversion.nbt.tag.CompoundTag entityData()Returns the value of theentityData
record component.- Returns:
- the value of the
entityData
record component
-
ticksInHive
public int ticksInHive()Returns the value of theticksInHive
record component.- Returns:
- the value of the
ticksInHive
record component
-
minTicksInHive
public int minTicksInHive()Returns the value of theminTicksInHive
record component.- Returns:
- the value of the
minTicksInHive
record component
-