You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix riptide-equipped trident release not being detected; fix elytra + riptide; attempt to fix illegalsprint false positives.
* Order of operations for gliding with an elytra while riptiding was wrong: when gliding, riptide motion is added before. Only question that remains is: before stuck speed or after?
* For the tridentRelease flag, the moving trace was resetting the flag too early: as a fix, simply reset the flag manually instead of in the resetBase.
* Some notes/comments
Copy file name to clipboardExpand all lines: NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@
23
23
importorg.bukkit.entity.Entity;
24
24
importorg.bukkit.entity.EntityType;
25
25
importorg.bukkit.entity.Player;
26
-
importorg.bukkit.event.player.PlayerInputEvent;
27
26
importorg.bukkit.event.player.PlayerMoveEvent;
28
27
29
28
importfr.neatmonster.nocheatplus.NCPAPIProvider;
@@ -176,7 +175,7 @@ public VehicleMoveData call() throws Exception {
176
175
}, 2);
177
176
/**
178
177
* Track the inputs of the player (WASD, space bar, sprinting and jumping). <br>
179
-
* The field is updated on {@link org.bukkit.event.player.PlayerMoveEvent} under split moves processor.<p>
178
+
* The field is updated on {@link org.bukkit.event.player.PlayerMoveEvent}s under split moves processor.<p>
180
179
* This field is the one you should use to read input information during a PlayerMoveEvent instead of {@link Player#getCurrentInput()} alone, as it is kept synchronized with the correct movement, in case Bukkit happens to skip PlayerMoveEvents,
181
180
* causing a de-synchronization between inputs and movements (see comment in {@link MovingListener#onPlayerMove(PlayerMoveEvent)} and {@link PlayerMoveData#multiMoveCount}).<p>
182
181
* This data is stored in MovingData instead of the Moving trace, as the latter may be invalidated, overridden or otherwise wiped out, while the input state is still valid and needed for the next move(s); it is not suitable for long-term storage.
Copy file name to clipboardExpand all lines: NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/PlayerMoveData.java
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ public class PlayerMoveData extends MoveData {
46
46
/** Represents how far the player is submerged in water. Set with {@link fr.neatmonster.nocheatplus.utilities.map.BlockProperties#getVerticalFrictionFactor(LivingEntity, Location, double, PlayerMoveData)} */
47
47
publicdoublesubmergedWaterHeight;
48
48
49
+
/** Sets whether the player has just released a trident with riptide. Set on {@link org.bukkit.event.player.PlayerRiptideEvent}. */
49
50
publicbooleantridentRelease;
50
51
51
52
/**
@@ -57,7 +58,8 @@ public class PlayerMoveData extends MoveData {
57
58
58
59
/**
59
60
* Indicates that this movement has/should have been slowed down due to the player hitting an entity (sprinting will be reset as well).<br>
60
-
* Mostly intended to be used for the h-speed prediction.
61
+
* Mostly intended to be used for the h-speed prediction.<br>
62
+
* Set in the {@link fr.neatmonster.nocheatplus.checks.fight.FightListener}
61
63
*/
62
64
publicbooleanhasAttackSlowDown;
63
65
@@ -70,7 +72,7 @@ public class PlayerMoveData extends MoveData {
70
72
publicdoublexAllowedDistance;
71
73
72
74
/**
73
-
* The collision oon the X axis that has been set in this movement by SurvivalFly.
75
+
* The collision on the X axis that has been set in this movement by SurvivalFly.
74
76
* Prior to version 1.21.2, this was set only if the theoretical speed prediction to set in this movement was found; or in other words, only if the player isn't cheating.
|| player.getFoodLevel() <= 5) // must be checked here as well (besides on toggle sprinting) because players will immediately lose the ability to sprint if food level drops below 5
0 commit comments