Skip to content

Commit

Permalink
Set a lower Y_ON_GROUND_DEFAULT.
Browse files Browse the repository at this point in the history
Used to be 0.0625 for a while, but intentions are to cover ground-loss
as lostground workarounds. Later switch to calculate the distance to
ground (with a given max-distance).
  • Loading branch information
asofold committed Oct 2, 2015
1 parent ee2df3f commit 289d727
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -78,6 +78,11 @@ public static MovingConfig getConfig(final String worldName) {
return ccNew;
}

public static final double Y_ON_GROUND_MIN = 0.00001;
public static final double Y_ON_GROUND_MAX = 0.0626;
// TODO: Model workarounds as lost ground ?
public static final double Y_ON_GROUND_DEFAULT = 0.016; // TODO: Jumping upwards while placing blocks (otherwise use MIN).


public final boolean ignoreCreative;
public final boolean ignoreAllowFlight;
Expand Down Expand Up @@ -260,8 +265,8 @@ public MovingConfig(final ConfigFile config) {
velocityActivationCounter = config.getInt(ConfPaths.MOVING_VELOCITY_ACTIVATIONCOUNTER);
velocityActivationTicks = config.getInt(ConfPaths.MOVING_VELOCITY_ACTIVATIONTICKS);
velocityStrictInvalidation = config.getBoolean(ConfPaths.MOVING_VELOCITY_STRICTINVALIDATION);
yOnGround = config.getDouble(ConfPaths.MOVING_YONGROUND, 0.001, 2.0, 0.0626); // sqrt(1/256), see: NetServerHandler.
noFallyOnGround = config.getDouble(ConfPaths.MOVING_NOFALL_YONGROUND, 0.001, 2.0, yOnGround);
yOnGround = config.getDouble(ConfPaths.MOVING_YONGROUND, Y_ON_GROUND_MIN, Y_ON_GROUND_MAX, Y_ON_GROUND_DEFAULT); // sqrt(1/256), see: NetServerHandler.
noFallyOnGround = config.getDouble(ConfPaths.MOVING_NOFALL_YONGROUND, Y_ON_GROUND_MIN, Y_ON_GROUND_MAX, yOnGround);

// TODO: Ignore the stance, once it is known that the server catches such.
ignoreStance = config.getAlmostBoolean(ConfPaths.MOVING_IGNORESTANCE, AlmostBoolean.NO).decide();
Expand Down

0 comments on commit 289d727

Please sign in to comment.