net.minecraft.network.packet

## Class Packet1Login

- java.lang.Object
- - net.minecraft.network.packet.Packet
  - - net.minecraft.network.packet.Packet1Login

-     public class Packet1Login
      extends Packet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `clientEntityId` The player's entity ID
    `byte` | `difficultySetting` The difficulty setting byte.
    `int` | `dimension` -1: The Nether, 0: The Overworld, 1: The End
    `EnumGameType` | `gameType`
    `boolean` | `hardcoreMode`
    `byte` | `maxPlayers` The maximum players.
    `WorldType` | `terrainType`
    `byte` | `worldHeight` Defaults to 128

    - ### Fields inherited from class net.minecraft.network.packet.Packet

      `creationTimeMillis, isChunkDataPacket, packetIdToClassMap, receivedID, receivedSize, sentID, sentSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Packet1Login()`
    `Packet1Login(int par1, WorldType par2WorldType, EnumGameType par3EnumGameType, boolean par4, int par5, int par6, int par7, int par8)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPacketSize()` Abstract.
    `void` | `processPacket(NetHandler par1NetHandler)` Passes this Packet on to the NetHandler for processing.
    `void` | `readPacketData(DataInput par1DataInput)` Abstract.
    `void` | `writePacketData(DataOutput par1DataOutput)` Abstract.

    - ### Methods inherited from class net.minecraft.network.packet.Packet

      `addIdClassMapping, canProcessAsync, containsSameEntityIDAs, getNewPacket, getPacketId, isRealPacket, readBytesFromStream, readItemStack, readNBTTagCompound, readPacket, readString, toString, writeByteArray, writeItemStack, writePacket, writeString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### clientEntityId

          public int clientEntityId

      The player's entity ID

    - #### terrainType

          public WorldType terrainType

    - #### hardcoreMode

          public boolean hardcoreMode

    - #### gameType

          public EnumGameType gameType

    - #### dimension

          public int dimension

      -1: The Nether, 0: The Overworld, 1: The End

    - #### difficultySetting

          public byte difficultySetting

      The difficulty setting byte.

    - #### worldHeight

          public byte worldHeight

      Defaults to 128

    - #### maxPlayers

          public byte maxPlayers

      The maximum players.

  - ### Constructor Detail

    - #### Packet1Login

          public Packet1Login()

    - #### Packet1Login

          public Packet1Login(int par1,
                      WorldType par2WorldType,
                      EnumGameType par3EnumGameType,
                      boolean par4,
                      int par5,
                      int par6,
                      int par7,
                      int par8)

  - ### Method Detail

    - #### readPacketData

          public void readPacketData(DataInput par1DataInput)
                              throws IOException

      Abstract. Reads the raw packet data from the data stream.
      Specified by:
        `readPacketData` in class `Packet`
      Throws:
        `IOException`

    - #### writePacketData

          public void writePacketData(DataOutput par1DataOutput)
                               throws IOException

      Abstract. Writes the raw packet data to the data stream.
      Specified by:
        `writePacketData` in class `Packet`
      Throws:
        `IOException`

    - #### processPacket

          public void processPacket(NetHandler par1NetHandler)

      Passes this Packet on to the NetHandler for processing.
      Specified by:
        `processPacket` in class `Packet`

    - #### getPacketSize

          public int getPacketSize()

      Abstract. Return the size of the packet (not counting the header).
      Specified by:
        `getPacketSize` in class `Packet`