-
Bug
-
Resolution: Fixed
-
Minecraft 1.8
-
None
-
Community Consensus
Note: This bug is NOT related to MC-119 or MC-10 as far as I can tell.
When the following conditions are given entities will fall though the floor:
- The entity needs to be able to walk up a slab
- It needs to stand on the ground (NBTTag OnGround:true)
- It needs to move upwards and to the side
- It needs to hit a block which it wouldn't hit if it was only moving up or only moving to the side
How to reproduce:
1. Put down a mob and a block on offset on top of it (Screenshot)
2. Punch the mob (easiest way to get a sideways upwards motion) against the block.
3. The mob will fall through the floor now.
The source of the bug is in the method which moves an entity in Entity.java.
In MCP: public void moveEntity(double x, double y, double z). Sure you will find it
This shows what needs to be changed to fix it (with some context): https://gist.github.com/Panda4994/9d83d261f5edffc3037e/revisions
I will also describe the problem and fix here:
https://www.youtube.com/watch?v=3aUqTmhn-50
And here:
So the problem is the part of the code which calculates the moving up slabs.
When a entity hits a block while moving sideways it will be called.
Then the game will make a list of all bounding boxes it could collide with when moving up by the step height of the entity (0.6 for normal mobs, 1.0 for enderman and horses) and the given amount in x and z direction.
This will not get the floor below the entity.
Now in this part of code a bounding box (BB from here on) will get moved to the position where it could go if no blocks were in the way.
Then the BB will get moved up till it hits something but at max the step height.
In the case described further up it will not move up the full step height.
Some other calculations follow.
Then the entity gets moved down till it hits a block but at max the step height.
It uses the list it created earlier for this check. So if the entity wasn't moved up by the step height it will get moved below the floor because the floor is not in the list.
An easy fix would be to just set the maximum it would get moved down to how far it got moved up.
- is duplicated by
-
MC-68081 irongolems- sinking threw blocks
- Resolved
-
MC-68231 Mob problem when you punch them
- Resolved
-
MC-68454 Mobs glitch through floor (upon being hit or chunk reload)
- Resolved
-
MC-69080 When Mobs are hit, they glitch halfway into the ground.
- Resolved
-
MC-69440 Mobs ocasionally drop 1 block after being hit.
- Resolved
-
MC-69518 Iron golems phaseing through blocks when hit
- Resolved
-
MC-70898 Mobs Sink Into Block Underneath Them When Hit
- Resolved
-
MC-71921 Mobs can fall through blocks when hit
- Resolved
-
MC-71989 New Doors mob 'sink' bug
- Resolved
-
MC-73449 armor stands "sinking" to lower levels of building
- Resolved
-
MC-74679 Mobs overpassing ground if hit in front of a specific wall shape
- Resolved
- relates to
-
MC-119 Mobs visually sinking through solid blocks
- Resolved
-
MC-18969 Breaking Minecart or boat while riding in it makes you fall through blocks
- Resolved