Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-55775

Client does not indicate that receiving statistics failed due to cooldown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Works As Intended
    • Affects Version/s: Minecraft 14w21b, Minecraft 14w28a, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 14w32b, Minecraft 14w33b, Minecraft 14w33c, Minecraft 14w34b, Minecraft 1.8-pre2
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed

      Description

      Steps to reproduce:
      1. Load a world in survival mode
      2. Look at the statistic "Distance Fallen"
      3. Fall down some blocks
      4. Look at the statistic "Distance Fallen" again (Statistics will not update)
      5. Again fall down some blocks
      6. Look at the statistic "Distance Fallen" again (Statistics will update)

      Exeptions:
      -You have fallen down 4 times after last reset (This means after last correct and loaded value or reopening the world)
      -Your statistics are resetted

      The reason

      In 1.8 there is a cooldown for statistic requests in the statistics sending method of the server:

      StatisticsFile.java (1.8)
      public void func_150876_a(EntityPlayerMP p_150876_1_) {
      	int var2 = this.field_150890_c.getTickCounter();
      	HashMap var3 = Maps.newHashMap();
      
      	/*
      	 * If not at least 300 ticks have passed from when the last time
      	 * statistics were requested, it just sends an empty map, so no statistics get
      	 * updated
      	 */
      	if (this.field_150886_g || var2 - this.field_150885_f > 300) {
      		this.field_150885_f = var2;
      		Iterator var4 = this.func_150878_c().iterator();
      
      		while (var4.hasNext()) {
      			StatBase var5 = (StatBase)var4.next();
      			var3.put(var5, Integer.valueOf(this.writeStat(var5)));
      		}
      	}
      
      	p_150876_1_.playerNetServerHandler.sendPacket(new S37PacketStatistics(var3));
      }
      

        Attachments

        1. 2014-06-02_23.49.37.png
          2014-06-02_23.49.37.png
          375 kB
        2. 2014-06-02_23.49.48.png
          2014-06-02_23.49.48.png
          20 kB
        3. 2014-06-02_23.49.54.png
          2014-06-02_23.49.54.png
          225 kB
        4. 2014-06-02_23.49.57.png
          2014-06-02_23.49.57.png
          20 kB
        5. 2014-06-02_23.50.29.png
          2014-06-02_23.50.29.png
          108 kB
        6. 2014-06-02_23.50.36.png
          2014-06-02_23.50.36.png
          20 kB

          Issue Links

            Activity

              People

              • Assignee:
                searge [Mojang] Searge (Michael Stoyke)
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: