Potentially fix glitch with falling entities.

When a block creates a falling entity the block is not immediately removed
from the world. Instead, the falling entity is responsible for removing it
but only if the block still exists. Due to certain piston mechanics it is
possible to move the block before this check happens and thus the block is
not removed. This should be fine as the entity will kill itself in this
situation. However, the code does not stop here and continues running the
rest of the entity logic which includes either placing a block in the world
or placing a block item in the world depending on the circumstances.
This commit is contained in:
Travis Watkins 2012-11-13 23:23:21 -06:00
parent db43197ecf
commit 2b22ae2d45

View file

@ -83,6 +83,7 @@ public class EntityFallingBlock extends Entity {
this.world.setTypeId(i, j, k, 0);
} else {
this.die();
return; // CraftBukkit
}
}