mojira.dev
MC-55775

Statistics screen sometimes doesn't show up to date information

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)

Exceptions

  • 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));
}

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media]
migrated

Duplicate of MC-30548

marcono1234

Reopen this please I am NOT TALKING ABOUT THE OBJECTIVE in the scoreboard!!!

This works fine! It always reloads when you land!

migrated

Isn't the statistic and the objective the same, as the objective's score is determined by the statistic, I could be wrong though.

marcono1234

Strangerwise not... there is already a report about this

Also the scoreboard objective seems to reload fine when you fall and land 🙂

migrated

The statistic "Distance fallen" is in km, you probably didn't fall far enough for the stat to detect it.

kumasasa

Cannot confirm. See screenshots.

kumasasa

The statistic "Distance fallen" is in km

No, it's always in the smallest possible unit (like the other stats too). If you didn't fall at all, it's 0.00 cm, if you fall several meters, it's 123.57 m and so on.

marcono1234

Please reopen!
Changed description!

kumasasa

Can still not confirm.

  • Created a new world, survival mode

  • Statistics Distance fallen is around zero

  • Build stairs

  • Fell down stairs (must be high enough to take damage)

  • Statistics Distance fallen is the amount of fallen distance

marcono1234

Dear Kumasasa please read my changed description, this bug seems not to appear after openening/reloading a world or/and when the statistic was 0 before

kumasasa

Can still not confirm with an old world, see screenshots.

marcono1234

Are you sure that this wasn't the fist fall after loading the world?
Because my statistic isn't updating

kumasasa

Finally confirmed.

migrated

Still happens on 14w32b and it also happens on mob killing statistics, not only fall damage (Maybe it happens for all the kind of statistics but I only tried mob killing...)

migrated

Still happens on 14w33b...
Can you update the bug to say it's happening to every kind of statistics (Not achievements) and when you're leaving the world and joining back it's fixing it and updating the statistics?

migrated

Also happens on 14w33c

migrated

Still happens on 14w34a and 14w34b

marcono1234

Can you please write which statistics it is also affecting, because for example the scoreboard statistic fallen did update every time

marcono1234

Searge please, there is no indication at all and it is just confusing

Avoma

Can confirm in 21w05b.

Brevort

Also in 21w06a.

Wither skeletons killed is one affected, by the way.

marcono1234

slicedlime

Confirmed

UI

distance-fallen, static, statistics

Minecraft 14w21b, Minecraft 14w28a, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, ..., Minecraft 1.8-pre2, 1.15.2, 20w12a, 21w05b, 21w06a

21w16a

Retrieved