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:
@@ -21,8 +21,8 @@ public class CraftHopper extends CraftBlockState implements Hopper {
|
||||
}
|
||||
|
||||
@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) {
|
||||
hopper.update();
|
||||
|
||||
Reference in New Issue
Block a user