-
Bug
-
Resolution: Duplicate
-
None
-
Minecraft 1.5.1
-
Windos 7, Java 6
-
Unconfirmed
-
Survival
When the game goes to determine how slippery a block is in order to cause items to slide across the surface, it incorrectly grabs blocks for anything less than a full block, i.e. half slabs, cake, light sensors, and fractional blocks added by other mods (RedPower's fractional blocks is a notable example).
This is why half slabs (cake, etc.) on top of ice are slippery.
This line:
(Line 130 of EntityItem, 113 of EntityAIControledByPlayer, 1454 of EntityLiving)
int var9 = this.thisEntity.worldObj.getBlockId(MathHelper.floor_float((float)var4), MathHelper.floor_float((float)var5) - 1, MathHelper.floor_float((float)var6));
Should be:
int var9 = this.thisEntity.worldObj.getBlockId(MathHelper.floor_float((float)var4), MathHelper.floor_float((float)var5 - 0.0625), MathHelper.floor_float((float)var6));
var5 is the Y value of the Entity being moved. By flooring it first, we determine which block space the item (or mob) is in, but for half-slabs this is the same block as the block that should be looked at.
So we need to subtract a value from the float first (the thickness of the thinnest possible block--I have used 1/16th) prior to flooring.
In so doing, if the item is at 71.0000 (resting on top of a full block) we get 70 as the block to look at (correct). If the item is at 71.5000 (resting on top of a half-slab) then we get 71 (the half-slab).
- duplicates
-
MC-1127 Walking on blocks less than 1 block tall placed on ice, slime blocks or honey blocks acts like walking on ice, slime block or honey blocks directly
- Resolved