diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java index 6bb5bbeb..949d4db4 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java @@ -245,6 +245,14 @@ public class SurvivalFly extends Check { // || to.isHeadObstructed() // Best not have this one. ; //} + + // 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. diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java index 2ba66ac2..0e98b759 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.java @@ -587,6 +587,14 @@ public class BlockProperties { */ 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. // Special case activation flags. @@ -3274,6 +3282,10 @@ public class BlockProperties { 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()) { // TODO: Test // TODO: Other concepts ...