Record Class Bee
java.lang.Object
java.lang.Record
net.minestom.server.item.component.Bee
public record Bee(@NotNull CustomData entityData, int ticksInHive, int minTicksInHive)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic @NotNull BinaryTagSerializer
<Bee> static NetworkBuffer.Type
<Bee> -
Constructor Summary
ConstructorsConstructorDescriptionBee
(@NotNull CustomData entityData, int ticksInHive, int minTicksInHive) Creates an instance of aBee
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CustomData
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.@NotNull Bee
withEntityData
(@NotNull CustomData entityData) @NotNull Bee
withMinTicksInHive
(int minTicksInHive) @NotNull Bee
withTicksInHive
(int ticksInHive)
-
Field Details
-
NETWORK_TYPE
-
NBT_TYPE
-
-
Constructor Details
-
Bee
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
-
withEntityData
-
withTicksInHive
-
withMinTicksInHive
-
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
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
-