Record Class ClientboundLoginPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLoginPacket
- All Implemented Interfaces:
- Packet<ClientGamePacketListener>
public record ClientboundLoginPacket(int playerId, boolean hardcore, Set<ResourceKey<Level>> levels, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean doLimitedCrafting, CommonPlayerSpawnInfo commonPlayerSpawnInfo)
extends Record
implements Packet<ClientGamePacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thechunkRadiusrecord component.private final CommonPlayerSpawnInfoThe field for thecommonPlayerSpawnInforecord component.private final booleanThe field for thedoLimitedCraftingrecord component.private final booleanThe field for thehardcorerecord component.private final Set<ResourceKey<Level>>The field for thelevelsrecord component.private final intThe field for themaxPlayersrecord component.private final intThe field for theplayerIdrecord component.private final booleanThe field for thereducedDebugInforecord component.private final booleanThe field for theshowDeathScreenrecord component.private final intThe field for thesimulationDistancerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionClientboundLoginPacket(int playerId, boolean hardcore, Set<ResourceKey<Level>> levels, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean doLimitedCrafting, CommonPlayerSpawnInfo commonPlayerSpawnInfo) Creates an instance of aClientboundLoginPacketrecord class.ClientboundLoginPacket(FriendlyByteBuf p_178960_) 
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the value of thechunkRadiusrecord component.Returns the value of thecommonPlayerSpawnInforecord component.booleanReturns the value of thedoLimitedCraftingrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_132397_) booleanhardcore()Returns the value of thehardcorerecord component.final inthashCode()Returns a hash code value for this object.levels()Returns the value of thelevelsrecord component.intReturns the value of themaxPlayersrecord component.intplayerId()Returns the value of theplayerIdrecord component.booleanReturns the value of thereducedDebugInforecord component.booleanReturns the value of theshowDeathScreenrecord component.intReturns the value of thesimulationDistancerecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_132400_) 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- 
playerIdprivate final int playerIdThe field for theplayerIdrecord component.
- 
hardcoreprivate final boolean hardcoreThe field for thehardcorerecord component.
- 
levelsThe field for thelevelsrecord component.
- 
maxPlayersprivate final int maxPlayersThe field for themaxPlayersrecord component.
- 
chunkRadiusprivate final int chunkRadiusThe field for thechunkRadiusrecord component.
- 
simulationDistanceprivate final int simulationDistanceThe field for thesimulationDistancerecord component.
- 
reducedDebugInfoprivate final boolean reducedDebugInfoThe field for thereducedDebugInforecord component.
- 
showDeathScreenprivate final boolean showDeathScreenThe field for theshowDeathScreenrecord component.
- 
doLimitedCraftingprivate final boolean doLimitedCraftingThe field for thedoLimitedCraftingrecord component.
- 
commonPlayerSpawnInfoThe field for thecommonPlayerSpawnInforecord component.
 
- 
- 
Constructor Details- 
ClientboundLoginPacket
- 
ClientboundLoginPacketpublic ClientboundLoginPacket(int playerId, boolean hardcore, Set<ResourceKey<Level>> levels, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean doLimitedCrafting, CommonPlayerSpawnInfo commonPlayerSpawnInfo) Creates an instance of aClientboundLoginPacketrecord class.- Parameters:
- playerId- the value for the- playerIdrecord component
- hardcore- the value for the- hardcorerecord component
- levels- the value for the- levelsrecord component
- maxPlayers- the value for the- maxPlayersrecord component
- chunkRadius- the value for the- chunkRadiusrecord component
- simulationDistance- the value for the- simulationDistancerecord component
- reducedDebugInfo- the value for the- reducedDebugInforecord component
- showDeathScreen- the value for the- showDeathScreenrecord component
- doLimitedCrafting- the value for the- doLimitedCraftingrecord component
- commonPlayerSpawnInfo- the value for the- commonPlayerSpawnInforecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ClientGamePacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ClientGamePacketListener>
 
- 
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 '=='.
- 
playerIdpublic int playerId()Returns the value of theplayerIdrecord component.- Returns:
- the value of the playerIdrecord component
 
- 
hardcorepublic boolean hardcore()Returns the value of thehardcorerecord component.- Returns:
- the value of the hardcorerecord component
 
- 
levelsReturns the value of thelevelsrecord component.- Returns:
- the value of the levelsrecord component
 
- 
maxPlayerspublic int maxPlayers()Returns the value of themaxPlayersrecord component.- Returns:
- the value of the maxPlayersrecord component
 
- 
chunkRadiuspublic int chunkRadius()Returns the value of thechunkRadiusrecord component.- Returns:
- the value of the chunkRadiusrecord component
 
- 
simulationDistancepublic int simulationDistance()Returns the value of thesimulationDistancerecord component.- Returns:
- the value of the simulationDistancerecord component
 
- 
reducedDebugInfopublic boolean reducedDebugInfo()Returns the value of thereducedDebugInforecord component.- Returns:
- the value of the reducedDebugInforecord component
 
- 
showDeathScreenpublic boolean showDeathScreen()Returns the value of theshowDeathScreenrecord component.- Returns:
- the value of the showDeathScreenrecord component
 
- 
doLimitedCraftingpublic boolean doLimitedCrafting()Returns the value of thedoLimitedCraftingrecord component.- Returns:
- the value of the doLimitedCraftingrecord component
 
- 
commonPlayerSpawnInfoReturns the value of thecommonPlayerSpawnInforecord component.- Returns:
- the value of the commonPlayerSpawnInforecord component
 
 
-