Attempt emergency fix for minecarts.

This commit is contained in:
asofold 2012-08-12 05:21:46 +02:00
parent f1f95d0a21
commit 32eece216e

View File

@ -487,13 +487,21 @@ public class MovingListener implements Listener {
final Player player = (Player) event.getVehicle().getPassenger(); final Player player = (Player) event.getVehicle().getPassenger();
Location newTo = null; Location newTo = null;
// Emergency fix:
final MovingData data = MovingData.getData(player);
data.noFallFallDistance = 0;
data.noFallVL = 0;
data.noFallOnGroundClient = data.noFallOnGroundServer = data.noFallWasOnGroundClient = data.noFallWasOnGroundServer = true;
if (morePacketsVehicle.isEnabled(player)) if (morePacketsVehicle.isEnabled(player))
// If the player is handled by the more packets vehicle check, execute it. // If the player is handled by the more packets vehicle check, execute it.
newTo = morePacketsVehicle.check(player, event.getFrom(), event.getTo()); newTo = morePacketsVehicle.check(player, event.getFrom(), event.getTo());
else else
// Otherwise we need to clear his dataFactory. // Otherwise we need to clear his dataFactory.
MovingData.getData(player).clearMorePacketsData(); data.clearMorePacketsData();
// Did one of the checks decide we need a new "to"-location? // Did one of the checks decide we need a new "to"-location?
if (newTo != null) if (newTo != null)