More block flags: HEIGHT8_1 and ALLOW_LOWJUMP (see description below).

Attempt to enable workarounds for lily pads with servers that support
multiple client versions. Add to the configuration at
compatibility.blocks.overrideflags:
WATER_LILY: default+ign_passable+ground_height+height8_1

HEIGHT8_1 just means 1/8 height (0.125).

The ALLOW_LOWJUMP flag was intended to be used in case of
ground_height+height100 or the like leading to issues with
sprint-jumping due to the low jump detection, however other special
casing checks for bunny hopping let this still fail (less than before,
but still), thus this flag might get removed. Keeping it for now, to
provide some kind of toolkit.
This commit is contained in:
asofold 2016-11-01 13:40:12 +01:00
parent 3d141f3125
commit 518f2f08da
2 changed files with 20 additions and 0 deletions

View File

@ -246,6 +246,14 @@ public class SurvivalFly extends Check {
; ;
//} //}
// HACK: Force sfNoLowJump by a flag.
// TODO: Might remove that flag, as the issue for trying this has been resolved differently (F_HEIGHT8_1).
// TODO: Consider setting on ground_height always?
if ((from.getBlockFlags() & BlockProperties.F_ALLOW_LOWJUMP) != 0) {
// TODO: Specialize - test for foot region?
data.sfNoLowJump = true;
}
////////////////////// //////////////////////
// Horizontal move. // Horizontal move.
////////////////////// //////////////////////

View File

@ -587,6 +587,14 @@ public class BlockProperties {
*/ */
public static final long F_ATTACHED_LOW2_SNEW = 0x2000000; public static final long F_ATTACHED_LOW2_SNEW = 0x2000000;
/**
* The hacky way to force sfNoLowJump when the block at from has this flag.
*/
public static final long F_ALLOW_LOWJUMP = 0x4000000;
/** One eighth block height (0.125). */
public static final long F_HEIGHT8_1 = 0x8000000;
// TODO: When flags are out, switch to per-block classes :p. // TODO: When flags are out, switch to per-block classes :p.
// Special case activation flags. // Special case activation flags.
@ -3274,6 +3282,10 @@ public class BlockProperties {
bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : LIQUID_HEIGHT_LOWERED; bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : LIQUID_HEIGHT_LOWERED;
} }
} }
else if ((flags & F_HEIGHT8_1) != 0) {
bminY = 0.0;
bmaxY = 0.125;
}
else if (id == Material.ENDER_PORTAL_FRAME.getId()) { else if (id == Material.ENDER_PORTAL_FRAME.getId()) {
// TODO: Test // TODO: Test
// TODO: Other concepts ... // TODO: Other concepts ...