Mojira Archive
MC-87652

Falling block entities' hitbox extends past its block

The bug

Falling block entities have server-side the default hitbox size (0.6 * 1.8) instead of 0.98 * 0.98 if the constructor with only a world parameter is called. This is the case in the following situations:

  • it is summoned (/summon)
  • it changes the dimension
  • it is loaded by a structure block
  • it is loaded from a save file
  • it is loaded as the vehicle of a player (RootVehicle)
  • it is spawned by a mob spawner

This can cause desync problems because the client uses the correct size.

How to reproduce

Collision with blocks

This can be reproduced when you try to move an affected falling block entity through gaps which are less than 1.8 block high.

/summon falling_block ~ ~1 ~ {Time:-2147483648,Motion:[1.0,0.2,0.0]}

In the attachment Bug 1.gif, the redstone block gate only allows the falling_block through if the entity enters at the bottom part of it (having 2 blocks of vertical empty airspace) but not at the upper half where it only has one block of empty airspace.

Passenger offset

Passengers are offset based on the height of the ridden entity, therefor this bug causes a position desync for riding entities.

  1. Summon a shulker riding a falling block entity
    /summon falling_block ~ ~ ~ {NoGravity:1b,Time:-2147483648,Passengers:[{id:"shulker",NoAI:1b,NoGravity:1b}]}
    
  2. Stand on the shulker box
    → You will see that you are constantly moving up and down because server-side the shulker is higher and therefor the server thinks the client is moving invalid

Code analysis

Code analysis by Marcono1234 can be found in this comment.