Record Class HiveDebugPayload.HiveInfo
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.HiveDebugPayload.HiveInfo
- Enclosing class:
HiveDebugPayload
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thehiveTyperecord component.private final intThe field for thehoneyLevelrecord component.private final intThe field for theoccupantCountrecord component.private final BlockPosThe field for theposrecord component.private final booleanThe field for thesedatedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aHiveInforecord class.HiveInfo(FriendlyByteBuf p_295182_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hiveType()Returns the value of thehiveTyperecord component.intReturns the value of thehoneyLevelrecord component.intReturns the value of theoccupantCountrecord component.pos()Returns the value of theposrecord component.booleansedated()Returns the value of thesedatedrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_295315_)
-
Field Details
-
pos
The field for theposrecord component. -
hiveType
The field for thehiveTyperecord component. -
occupantCount
private final int occupantCountThe field for theoccupantCountrecord component. -
honeyLevel
private final int honeyLevelThe field for thehoneyLevelrecord component. -
sedated
private final boolean sedatedThe field for thesedatedrecord component.
-
-
Constructor Details
-
HiveInfo
-
HiveInfo
Creates an instance of aHiveInforecord class.- Parameters:
pos- the value for theposrecord componenthiveType- the value for thehiveTyperecord componentoccupantCount- the value for theoccupantCountrecord componenthoneyLevel- the value for thehoneyLevelrecord componentsedated- the value for thesedatedrecord component
-
-
Method Details
-
write
-
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 '=='. -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
hiveType
Returns the value of thehiveTyperecord component.- Returns:
- the value of the
hiveTyperecord component
-
occupantCount
public int occupantCount()Returns the value of theoccupantCountrecord component.- Returns:
- the value of the
occupantCountrecord component
-
honeyLevel
public int honeyLevel()Returns the value of thehoneyLevelrecord component.- Returns:
- the value of the
honeyLevelrecord component
-
sedated
public boolean sedated()Returns the value of thesedatedrecord component.- Returns:
- the value of the
sedatedrecord component
-