Ejemplo n.º 1
0
  /** Reads the raw packet data from the data stream. */
  public void readPacketData(PacketBuffer p_148837_1_) throws IOException {
    this.field_149206_a = p_148837_1_.readInt();
    short var2 = p_148837_1_.readUnsignedByte();
    this.field_149204_b = (var2 & 8) == 8;
    int var3 = var2 & -9;
    this.field_149205_c = WorldSettings.GameType.getByID(var3);
    this.field_149202_d = p_148837_1_.readByte();
    this.field_149203_e = EnumDifficulty.getDifficultyEnum(p_148837_1_.readUnsignedByte());
    this.field_149200_f = p_148837_1_.readUnsignedByte();
    this.field_149201_g = WorldType.parseWorldType(p_148837_1_.readStringFromBuffer(16));

    if (this.field_149201_g == null) {
      this.field_149201_g = WorldType.DEFAULT;
    }
  }
Ejemplo n.º 2
0
  /** Reads the raw packet data from the data stream. */
  public void readPacketData(PacketBuffer buf) throws IOException {
    this.playerId = buf.readInt();
    int i = buf.readUnsignedByte();
    this.hardcoreMode = (i & 8) == 8;
    i = i & -9;
    this.gameType = GameType.getByID(i);
    this.dimension = buf.readInt();
    this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
    this.maxPlayers = buf.readUnsignedByte();
    this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));

    if (this.worldType == null) {
      this.worldType = WorldType.DEFAULT;
    }

    this.reducedDebugInfo = buf.readBoolean();
  }