Record Class ClientboundRespawnPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundRespawnPacket
- All Implemented Interfaces:
- Packet<ClientGamePacketListener>
public record ClientboundRespawnPacket(CommonPlayerSpawnInfo commonPlayerSpawnInfo, byte dataToKeep)
extends Record
implements Packet<ClientGamePacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final CommonPlayerSpawnInfoThe field for thecommonPlayerSpawnInforecord component.private final byteThe field for thedataToKeeprecord component.static final bytestatic final bytestatic final byte
- 
Constructor SummaryConstructorsConstructorDescriptionClientboundRespawnPacket(FriendlyByteBuf p_179191_) ClientboundRespawnPacket(CommonPlayerSpawnInfo commonPlayerSpawnInfo, byte dataToKeep) Creates an instance of aClientboundRespawnPacketrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thecommonPlayerSpawnInforecord component.byteReturns the value of thedataToKeeprecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_132951_) final inthashCode()Returns a hash code value for this object.booleanshouldKeep(byte p_263573_) final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_132954_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, nextProtocol
- 
Field Details- 
commonPlayerSpawnInfoThe field for thecommonPlayerSpawnInforecord component.
- 
dataToKeepprivate final byte dataToKeepThe field for thedataToKeeprecord component.
- 
KEEP_ATTRIBUTESpublic static final byte KEEP_ATTRIBUTES- See Also:
 
- 
KEEP_ENTITY_DATApublic static final byte KEEP_ENTITY_DATA- See Also:
 
- 
KEEP_ALL_DATApublic static final byte KEEP_ALL_DATA- See Also:
 
 
- 
- 
Constructor Details- 
ClientboundRespawnPacket
- 
ClientboundRespawnPacketCreates an instance of aClientboundRespawnPacketrecord class.- Parameters:
- commonPlayerSpawnInfo- the value for the- commonPlayerSpawnInforecord component
- dataToKeep- the value for the- dataToKeeprecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ClientGamePacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientGamePacketListener>
 
- 
shouldKeeppublic boolean shouldKeep(byte p_263573_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
commonPlayerSpawnInfoReturns the value of thecommonPlayerSpawnInforecord component.- Returns:
- the value of the commonPlayerSpawnInforecord component
 
- 
dataToKeeppublic byte dataToKeep()Returns the value of thedataToKeeprecord component.- Returns:
- the value of the dataToKeeprecord component
 
 
-