Fix physics freeze

This commit is contained in:
Jesse Boyd 2018-10-03 14:58:19 +10:00
parent cfbf7dbec0
commit dce39e5c69
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -189,6 +189,10 @@ public abstract class ChunkListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPhysics(BlockPhysicsEvent event) {
if (physicsFreeze) {
event.setCancelled(true);
return;
}
if (physCancel) {
Block block = event.getBlock();
long pair = MathMan.pairInt(block.getX() >> 4, block.getZ() >> 4);
@ -212,10 +216,6 @@ public abstract class ChunkListener implements Listener {
return;
}
}
if (physicsFreeze) {
event.setCancelled(true);
return;
}
switch (event.getChangedType()) {
case AIR:
case CAVE_AIR: