Mojira Archive
MC-48760

Redundant code

I have looked in the Minecraft Source Code and found a Error/Problem in the Speed Calculation.

This stand in the obfuscated Code from the Minecraft Client (1.7.4):

float f1 = this.bm.a(paramahz);
if (f1 > 1.0F) { //Higher than 1.0F
	int j = aem.c(this);
	abu localabu = this.bm.h();

	if ((j > 0) && (localabu != null)) {
		float f2 = j * j + 1;
		
		if ((localabu.b(paramahz)) || (f1 > 1.0F)) { //<--- Here is the Error
			f1 += f2;
		else
			f1 += f2 * 0.08F;
		}
	}
}

The float f1 is always higher then 1.0F.

Here is the problem too: https://github.com/Bukkit/mc-dev/blob/master/net/minecraft/server/EntityHuman.java#L511
And here: https://github.com/Bukkit/CraftBukkit/blob/master/src/main/java/net/minecraft/server/EntityHuman.java#L593

Fixed

Franz Reiter

[Mojang] Nathan Adams

2014-02-16, 12:43 AM

2014-08-15, 07:22 AM

2014-08-05, 01:39 PM

0

8

Confirmed

Minecraft 1.7.4

Minecraft 14w32a