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>
  • 字段详细资料

    • playerId

      private final int playerId
      playerId 记录组件的字段。
    • hardcore

      private final boolean hardcore
      hardcore 记录组件的字段。
    • gameType

      private final GameType gameType
      gameType 记录组件的字段。
    • previousGameType

      @Nullable private final GameType previousGameType
      previousGameType 记录组件的字段。
    • levels

      private final Set<ResourceKey<Level>> levels
      levels 记录组件的字段。
    • registryHolder

      private final RegistryAccess.Frozen registryHolder
      registryHolder 记录组件的字段。
    • dimensionType

      private final ResourceKey<DimensionType> dimensionType
      dimensionType 记录组件的字段。
    • dimension

      private final ResourceKey<Level> dimension
      dimension 记录组件的字段。
    • seed

      private final long seed
      seed 记录组件的字段。
    • maxPlayers

      private final int maxPlayers
      maxPlayers 记录组件的字段。
    • chunkRadius

      private final int chunkRadius
      chunkRadius 记录组件的字段。
    • simulationDistance

      private final int simulationDistance
      simulationDistance 记录组件的字段。
    • reducedDebugInfo

      private final boolean reducedDebugInfo
      reducedDebugInfo 记录组件的字段。
    • showDeathScreen

      private final boolean showDeathScreen
      showDeathScreen 记录组件的字段。
    • isDebug

      private final boolean isDebug
      isDebug 记录组件的字段。
    • isFlat

      private final boolean isFlat
      isFlat 记录组件的字段。
    • lastDeathLocation

      private final Optional<GlobalPos> lastDeathLocation
      lastDeathLocation 记录组件的字段。
    • portalCooldown

      private final int portalCooldown
      portalCooldown 记录组件的字段。
    • BUILTIN_CONTEXT_OPS

      private static final RegistryOps<Tag> BUILTIN_CONTEXT_OPS
  • 构造器详细资料

    • ClientboundLoginPacket

      public ClientboundLoginPacket(FriendlyByteBuf pBuffer)
    • 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

      public void write(FriendlyByteBuf pBuffer)
      指定者:
      write 在接口中 Packet<ClientGamePacketListener>
    • handle

      public void handle(ClientGamePacketListener pHandler)
      指定者:
      handle 在接口中 Packet<ClientGamePacketListener>
    • toString

      public final String toString()
      返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用 Objects::equals(Object,Object) 对参考组件进行比较;使用 '==' 对基元组件进行比较
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • playerId

      public int playerId()
      返回 playerId 记录组件的值。
      返回:
      playerId 记录组件的值
    • hardcore

      public boolean hardcore()
      返回 hardcore 记录组件的值。
      返回:
      hardcore 记录组件的值
    • gameType

      public GameType gameType()
      返回 gameType 记录组件的值。
      返回:
      gameType 记录组件的值
    • previousGameType

      @Nullable public GameType previousGameType()
      返回 previousGameType 记录组件的值。
      返回:
      previousGameType 记录组件的值
    • levels

      public Set<ResourceKey<Level>> levels()
      返回 levels 记录组件的值。
      返回:
      levels 记录组件的值
    • registryHolder

      public RegistryAccess.Frozen registryHolder()
      返回 registryHolder 记录组件的值。
      返回:
      registryHolder 记录组件的值
    • dimensionType

      public ResourceKey<DimensionType> dimensionType()
      返回 dimensionType 记录组件的值。
      返回:
      dimensionType 记录组件的值
    • dimension

      public ResourceKey<Level> 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

      public Optional<GlobalPos> lastDeathLocation()
      返回 lastDeathLocation 记录组件的值。
      返回:
      lastDeathLocation 记录组件的值
    • portalCooldown

      public int portalCooldown()
      返回 portalCooldown 记录组件的值。
      返回:
      portalCooldown 记录组件的值