Record Class ClientboundLoginPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLoginPacket
- 所有已实现的接口:
Packet<ClientGamePacketListener>
public record ClientboundLoginPacket(int playerId, boolean hardcore, GameType gameType, @Nullable GameType previousGameType, Set<ResourceKey<Level>> levels, RegistryAccess.Frozen registryHolder, ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown)
extends Record
implements Packet<ClientGamePacketListener>
-
字段概要
字段修饰符和类型字段说明private static final RegistryOps<Tag>
private final int
chunkRadius
记录组件的字段。private final ResourceKey<Level>
dimension
记录组件的字段。private final ResourceKey<DimensionType>
dimensionType
记录组件的字段。private final GameType
gameType
记录组件的字段。private final boolean
hardcore
记录组件的字段。private final boolean
isDebug
记录组件的字段。private final boolean
isFlat
记录组件的字段。lastDeathLocation
记录组件的字段。private final Set<ResourceKey<Level>>
levels
记录组件的字段。private final int
maxPlayers
记录组件的字段。private final int
playerId
记录组件的字段。private final int
portalCooldown
记录组件的字段。private final GameType
previousGameType
记录组件的字段。private final boolean
reducedDebugInfo
记录组件的字段。private final RegistryAccess.Frozen
registryHolder
记录组件的字段。private final long
seed
记录组件的字段。private final boolean
showDeathScreen
记录组件的字段。private final int
simulationDistance
记录组件的字段。 -
构造器概要
构造器构造器说明ClientboundLoginPacket
(int playerId, boolean hardcore, GameType gameType, GameType previousGameType, Set<ResourceKey<Level>> levels, RegistryAccess.Frozen registryHolder, ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown) 创建ClientboundLoginPacket
记录的实例。ClientboundLoginPacket
(FriendlyByteBuf pBuffer) -
方法概要
修饰符和类型方法说明int
返回chunkRadius
记录组件的值。返回dimension
记录组件的值。返回dimensionType
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。gameType()
返回gameType
记录组件的值。void
handle
(ClientGamePacketListener pHandler) boolean
hardcore()
返回hardcore
记录组件的值。final int
hashCode()
返回此对象的哈希代码值。boolean
isDebug()
返回isDebug
记录组件的值。boolean
isFlat()
返回isFlat
记录组件的值。返回lastDeathLocation
记录组件的值。levels()
返回levels
记录组件的值。int
返回maxPlayers
记录组件的值。int
playerId()
返回playerId
记录组件的值。int
返回portalCooldown
记录组件的值。返回previousGameType
记录组件的值。boolean
返回reducedDebugInfo
记录组件的值。返回registryHolder
记录组件的值。long
seed()
返回seed
记录组件的值。boolean
返回showDeathScreen
记录组件的值。int
返回simulationDistance
记录组件的值。final String
toString()
返回此记录的字符串表示形式。void
write
(FriendlyByteBuf pBuffer) 从接口继承的方法 net.minecraft.network.protocol.Packet
isSkippable
-
字段详细资料
-
playerId
private final int playerIdplayerId
记录组件的字段。 -
hardcore
private final boolean hardcorehardcore
记录组件的字段。 -
gameType
gameType
记录组件的字段。 -
previousGameType
previousGameType
记录组件的字段。 -
levels
levels
记录组件的字段。 -
registryHolder
registryHolder
记录组件的字段。 -
dimensionType
dimensionType
记录组件的字段。 -
dimension
dimension
记录组件的字段。 -
seed
private final long seedseed
记录组件的字段。 -
maxPlayers
private final int maxPlayersmaxPlayers
记录组件的字段。 -
chunkRadius
private final int chunkRadiuschunkRadius
记录组件的字段。 -
simulationDistance
private final int simulationDistancesimulationDistance
记录组件的字段。 -
reducedDebugInfo
private final boolean reducedDebugInforeducedDebugInfo
记录组件的字段。 -
showDeathScreen
private final boolean showDeathScreenshowDeathScreen
记录组件的字段。 -
isDebug
private final boolean isDebugisDebug
记录组件的字段。 -
isFlat
private final boolean isFlatisFlat
记录组件的字段。 -
lastDeathLocation
lastDeathLocation
记录组件的字段。 -
portalCooldown
private final int portalCooldownportalCooldown
记录组件的字段。 -
BUILTIN_CONTEXT_OPS
-
-
构造器详细资料
-
ClientboundLoginPacket
-
ClientboundLoginPacket
public ClientboundLoginPacket(int playerId, boolean hardcore, GameType gameType, @Nullable GameType previousGameType, Set<ResourceKey<Level>> levels, RegistryAccess.Frozen registryHolder, ResourceKey<DimensionType> dimensionType, ResourceKey<Level> dimension, long seed, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean isDebug, boolean isFlat, Optional<GlobalPos> lastDeathLocation, int portalCooldown) 创建ClientboundLoginPacket
记录的实例。- 参数:
playerId
-playerId
记录组件的值hardcore
-hardcore
记录组件的值gameType
-gameType
记录组件的值previousGameType
-previousGameType
记录组件的值levels
-levels
记录组件的值registryHolder
-registryHolder
记录组件的值dimensionType
-dimensionType
记录组件的值dimension
-dimension
记录组件的值seed
-seed
记录组件的值maxPlayers
-maxPlayers
记录组件的值chunkRadius
-chunkRadius
记录组件的值simulationDistance
-simulationDistance
记录组件的值reducedDebugInfo
-reducedDebugInfo
记录组件的值showDeathScreen
-showDeathScreen
记录组件的值isDebug
-isDebug
记录组件的值isFlat
-isFlat
记录组件的值lastDeathLocation
-lastDeathLocation
记录组件的值portalCooldown
-portalCooldown
记录组件的值
-
-
方法详细资料
-
write
- 指定者:
write
在接口中Packet<ClientGamePacketListener>
-
handle
- 指定者:
handle
在接口中Packet<ClientGamePacketListener>
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
playerId
public int playerId()返回playerId
记录组件的值。- 返回:
playerId
记录组件的值
-
hardcore
public boolean hardcore()返回hardcore
记录组件的值。- 返回:
hardcore
记录组件的值
-
gameType
返回gameType
记录组件的值。- 返回:
gameType
记录组件的值
-
previousGameType
返回previousGameType
记录组件的值。- 返回:
previousGameType
记录组件的值
-
levels
返回levels
记录组件的值。- 返回:
levels
记录组件的值
-
registryHolder
返回registryHolder
记录组件的值。- 返回:
registryHolder
记录组件的值
-
dimensionType
返回dimensionType
记录组件的值。- 返回:
dimensionType
记录组件的值
-
dimension
返回dimension
记录组件的值。- 返回:
dimension
记录组件的值
-
seed
public long seed()返回seed
记录组件的值。- 返回:
seed
记录组件的值
-
maxPlayers
public int maxPlayers()返回maxPlayers
记录组件的值。- 返回:
maxPlayers
记录组件的值
-
chunkRadius
public int chunkRadius()返回chunkRadius
记录组件的值。- 返回:
chunkRadius
记录组件的值
-
simulationDistance
public int simulationDistance()返回simulationDistance
记录组件的值。- 返回:
simulationDistance
记录组件的值
-
reducedDebugInfo
public boolean reducedDebugInfo()返回reducedDebugInfo
记录组件的值。- 返回:
reducedDebugInfo
记录组件的值
-
showDeathScreen
public boolean showDeathScreen()返回showDeathScreen
记录组件的值。- 返回:
showDeathScreen
记录组件的值
-
isDebug
public boolean isDebug()返回isDebug
记录组件的值。- 返回:
isDebug
记录组件的值
-
isFlat
public boolean isFlat()返回isFlat
记录组件的值。- 返回:
isFlat
记录组件的值
-
lastDeathLocation
返回lastDeathLocation
记录组件的值。- 返回:
lastDeathLocation
记录组件的值
-
portalCooldown
public int portalCooldown()返回portalCooldown
记录组件的值。- 返回:
portalCooldown
记录组件的值
-