Block splipperiness is multiplied by 0.98 before effecting entity velocities, such as items.
This multiplication means that a slipperiness value of 1.0 is not, in fact, frictionless as one would expect it to be.
Perfect frictionless is actually ~1.02040816 (exactly 1 / 0.98).
The bug is in EntityItem line 134 inside the onUpdate function.
var2 = Block.blocksList[var3].slipperiness * 0.98F;
should be
var2 = Block.blocksList[var3].slipperiness;
Likewise EntityXPOrb line 161.
The difference would be about 2 blocks worth of slide. Ice slipperiness could be reduce to 0.96 to compensate.
EntityLiving and EntityAIControlledByPlayer bot use a multiplier of 0.91F instead, which I suspect is to give living entities greater control on slippery surfaces. These values could stay unchanged.
Comments 13
Tails, I will check this evening when I get home. If I don't update by Friday night, poke it again (I have a slippery memory, pun intended).
Downloaded the latest sourcecode via Forge and checked.
Line 143 is now the current line, and it still contains the premultiplication by 0.98
Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Unknown if it still effects 1.7.2 as Forge hasn't updated for it, so I can't tell how slipperiness values are used.
Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Alright, no worries. As I'm a bit involved in the modding scene, I know what's going on there at the moment.
Will keep this open.
I'm trying the latest Forge now, but the Gradle process is a little arcane. May be able to view enough, but not compile. At the moment it's unclear, just that Gradle had a problem attempting a recompile.
Edit: wasn't able to even get things to a point where the example mod wasn't throwing errors left and right. Something didn't setup properly.
Is this still a concern in the current Minecraft version 14w11b / Launcher version 1.3.11 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Gosh, if only I had deobfuscated source code for 14w11b to check.
Best I could get you is 1.7.2, and I haven't done any modding since 1.6.4
I sincerely doubt Notch had some sort of seizure while typing and didn't actually mean to put the "* 0.98f" there. It was very clearly intentional, and an inability for mods to implement "truly frictionless" blocks is not really our concern since this does not affect vanilla in any way. Bug is not valid.
There is a chance that this might be in place to mimic air resistance, but that should vary with the square of velocity.