Class ClientboundLoginPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundLoginPacket(int entityId, boolean hardcore, @NonNull net.kyori.adventure.key.Key[] worldNames, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, PlayerSpawnInfo commonPlayerSpawnInfo, boolean enforcesSecureChat) ClientboundLoginPacket(io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintintintint@NonNull net.kyori.adventure.key.Key[]inthashCode()booleanbooleanbooleanbooleanbooleanvoidserialize(io.netty.buffer.ByteBuf out, MinecraftCodecHelper helper) booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.@NonNull StringtoString()@NonNull ClientboundLoginPacketwithCommonPlayerSpawnInfo(PlayerSpawnInfo commonPlayerSpawnInfo) @NonNull ClientboundLoginPacketwithDoLimitedCrafting(boolean doLimitedCrafting) @NonNull ClientboundLoginPacketwithEnableRespawnScreen(boolean enableRespawnScreen) @NonNull ClientboundLoginPacketwithEnforcesSecureChat(boolean enforcesSecureChat) @NonNull ClientboundLoginPacketwithEntityId(int entityId) @NonNull ClientboundLoginPacketwithHardcore(boolean hardcore) @NonNull ClientboundLoginPacketwithMaxPlayers(int maxPlayers) @NonNull ClientboundLoginPacketwithReducedDebugInfo(boolean reducedDebugInfo) @NonNull ClientboundLoginPacketwithSimulationDistance(int simulationDistance) @NonNull ClientboundLoginPacketwithViewDistance(int viewDistance) @NonNull ClientboundLoginPacketwithWorldNames(@NonNull net.kyori.adventure.key.Key[] worldNames) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ClientboundLoginPacket
-
ClientboundLoginPacket
public ClientboundLoginPacket(int entityId, boolean hardcore, @NonNull @NonNull net.kyori.adventure.key.Key[] worldNames, int maxPlayers, int viewDistance, int simulationDistance, boolean reducedDebugInfo, boolean enableRespawnScreen, boolean doLimitedCrafting, PlayerSpawnInfo commonPlayerSpawnInfo, boolean enforcesSecureChat)
-
-
Method Details
-
serialize
- Specified by:
serializein interfaceMinecraftPacket
-
shouldRunOnGameThread
public boolean shouldRunOnGameThread()Description copied from interface:PacketGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Specified by:
shouldRunOnGameThreadin interfacePacket- Returns:
- Whether the packet be handled async from the Netty thread.
-
getEntityId
public int getEntityId() -
isHardcore
public boolean isHardcore() -
getWorldNames
@NonNull public @NonNull net.kyori.adventure.key.Key[] getWorldNames() -
getMaxPlayers
public int getMaxPlayers() -
getViewDistance
public int getViewDistance() -
getSimulationDistance
public int getSimulationDistance() -
isReducedDebugInfo
public boolean isReducedDebugInfo() -
isEnableRespawnScreen
public boolean isEnableRespawnScreen() -
isDoLimitedCrafting
public boolean isDoLimitedCrafting() -
getCommonPlayerSpawnInfo
-
isEnforcesSecureChat
public boolean isEnforcesSecureChat() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withEntityId
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHardcore
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withWorldNames
public @NonNull ClientboundLoginPacket withWorldNames(@NonNull @NonNull net.kyori.adventure.key.Key[] worldNames) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMaxPlayers
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withViewDistance
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withSimulationDistance
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withReducedDebugInfo
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withEnableRespawnScreen
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDoLimitedCrafting
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCommonPlayerSpawnInfo
public @NonNull ClientboundLoginPacket withCommonPlayerSpawnInfo(PlayerSpawnInfo commonPlayerSpawnInfo) - Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withEnforcesSecureChat
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-