Record Class BeehiveBlockEntity.Occupant
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.BeehiveBlockEntity.Occupant
- Enclosing class:
BeehiveBlockEntity
public static record BeehiveBlockEntity.Occupant(CustomData entityData, int ticksInHive, int minTicksInHive)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<BeehiveBlockEntity.Occupant> private final CustomData
The field for theentityData
record component.static final com.mojang.serialization.Codec
<List<BeehiveBlockEntity.Occupant>> private final int
The field for theminTicksInHive
record component.static final StreamCodec
<io.netty.buffer.ByteBuf, BeehiveBlockEntity.Occupant> private final int
The field for theticksInHive
record component. -
Constructor Summary
ConstructorDescriptionOccupant
(CustomData entityData, int ticksInHive, int minTicksInHive) Creates an instance of aOccupant
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BeehiveBlockEntity.Occupant
create
(int p_330047_) createEntity
(Level p_328931_, BlockPos p_336164_) 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.static BeehiveBlockEntity.Occupant
private static void
setBeeReleaseData
(int p_330253_, Bee p_331091_) int
Returns the value of theticksInHive
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
entityData
The field for theentityData
record component. -
ticksInHive
private final int ticksInHiveThe field for theticksInHive
record component. -
minTicksInHive
private final int minTicksInHiveThe field for theminTicksInHive
record component. -
CODEC
-
LIST_CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Occupant
Creates an instance of aOccupant
record class.- Parameters:
entityData
- the value for theentityData
record componentticksInHive
- the value for theticksInHive
record componentminTicksInHive
- the value for theminTicksInHive
record component
-
-
Method Details
-
of
-
create
-
createEntity
-
setBeeReleaseData
-
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
-