Don't update physics when block place is cancelled. Fixes BUKKIT-3939

When a block placement happens we currently update physics on the
attempted placement and update again if the placement is cancelled.
To correct the first one we simply set the block without applying
physics. To correct the second we have to add a new method to
BlockState that lets us update without applying physics and use
this method method when putting the block back.
This commit is contained in:
Travis Watkins
2013-03-31 19:18:42 -05:00
parent d3dbb1bb50
commit 71a475f076
12 changed files with 29 additions and 25 deletions

View File

@@ -181,8 +181,8 @@ public class CraftSkull extends CraftBlockState implements Skull {
}
@Override
public boolean update(boolean force) {
boolean result = super.update(force);
public boolean update(boolean force, boolean applyPhysics) {
boolean result = super.update(force, applyPhysics);
if (result) {
skull.setSkullType(getSkullType(skullType), player);