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, boolean enforcesSecureChat) extends Record implements Packet<ClientGamePacketListener>
  • Field Details

    • playerId

      private final int playerId
      The field for the playerId record component.
    • hardcore

      private final boolean hardcore
      The field for the hardcore record component.
    • levels

      private final Set<ResourceKey<Level>> levels
      The field for the levels record component.
    • maxPlayers

      private final int maxPlayers
      The field for the maxPlayers record component.
    • chunkRadius

      private final int chunkRadius
      The field for the chunkRadius record component.
    • simulationDistance

      private final int simulationDistance
      The field for the simulationDistance record component.
    • reducedDebugInfo

      private final boolean reducedDebugInfo
      The field for the reducedDebugInfo record component.
    • showDeathScreen

      private final boolean showDeathScreen
      The field for the showDeathScreen record component.
    • doLimitedCrafting

      private final boolean doLimitedCrafting
      The field for the doLimitedCrafting record component.
    • commonPlayerSpawnInfo

      private final CommonPlayerSpawnInfo commonPlayerSpawnInfo
      The field for the commonPlayerSpawnInfo record component.
    • enforcesSecureChat

      private final boolean enforcesSecureChat
      The field for the enforcesSecureChat record component.
    • STREAM_CODEC

      public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundLoginPacket> STREAM_CODEC
  • Constructor Details

    • ClientboundLoginPacket

      private ClientboundLoginPacket(RegistryFriendlyByteBuf p_321545_)
    • ClientboundLoginPacket

      public ClientboundLoginPacket(int playerId, boolean hardcore, Set<ResourceKey<Level>> levels, int maxPlayers, int chunkRadius, int simulationDistance, boolean reducedDebugInfo, boolean showDeathScreen, boolean doLimitedCrafting, CommonPlayerSpawnInfo commonPlayerSpawnInfo, boolean enforcesSecureChat)
      Creates an instance of a ClientboundLoginPacket record class.
      Parameters:
      playerId - the value for the playerId record component
      hardcore - the value for the hardcore record component
      levels - the value for the levels record component
      maxPlayers - the value for the maxPlayers record component
      chunkRadius - the value for the chunkRadius record component
      simulationDistance - the value for the simulationDistance record component
      reducedDebugInfo - the value for the reducedDebugInfo record component
      showDeathScreen - the value for the showDeathScreen record component
      doLimitedCrafting - the value for the doLimitedCrafting record component
      commonPlayerSpawnInfo - the value for the commonPlayerSpawnInfo record component
      enforcesSecureChat - the value for the enforcesSecureChat record component
  • Method Details

    • write

      private void write(RegistryFriendlyByteBuf p_321845_)
    • type

      Specified by:
      type in interface Packet<ClientGamePacketListener>
    • handle

      public void handle(ClientGamePacketListener p_132397_)
      Specified by:
      handle in interface Packet<ClientGamePacketListener>
    • toString

      public final String toString()
      Returns 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates 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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • playerId

      public int playerId()
      Returns the value of the playerId record component.
      Returns:
      the value of the playerId record component
    • hardcore

      public boolean hardcore()
      Returns the value of the hardcore record component.
      Returns:
      the value of the hardcore record component
    • levels

      public Set<ResourceKey<Level>> levels()
      Returns the value of the levels record component.
      Returns:
      the value of the levels record component
    • maxPlayers

      public int maxPlayers()
      Returns the value of the maxPlayers record component.
      Returns:
      the value of the maxPlayers record component
    • chunkRadius

      public int chunkRadius()
      Returns the value of the chunkRadius record component.
      Returns:
      the value of the chunkRadius record component
    • simulationDistance

      public int simulationDistance()
      Returns the value of the simulationDistance record component.
      Returns:
      the value of the simulationDistance record component
    • reducedDebugInfo

      public boolean reducedDebugInfo()
      Returns the value of the reducedDebugInfo record component.
      Returns:
      the value of the reducedDebugInfo record component
    • showDeathScreen

      public boolean showDeathScreen()
      Returns the value of the showDeathScreen record component.
      Returns:
      the value of the showDeathScreen record component
    • doLimitedCrafting

      public boolean doLimitedCrafting()
      Returns the value of the doLimitedCrafting record component.
      Returns:
      the value of the doLimitedCrafting record component
    • commonPlayerSpawnInfo

      public CommonPlayerSpawnInfo commonPlayerSpawnInfo()
      Returns the value of the commonPlayerSpawnInfo record component.
      Returns:
      the value of the commonPlayerSpawnInfo record component
    • enforcesSecureChat

      public boolean enforcesSecureChat()
      Returns the value of the enforcesSecureChat record component.
      Returns:
      the value of the enforcesSecureChat record component