203 Commits
Author SHA1 Message Date
Lysandr0 059727e2bd [Incomplete][Broken] Some refactoring.
* Split tracing stuff into more sub-packages (distinguish ray-tracing from axis-tracing);
* Move InventoryUtil to entity package.
* Begin sketching the supporting block mechanic introduced in 1.20 (correctly, this time); incomplete. Haven't implemented it yet into the prediction system.
* Correct an oversight in PlayerEnvelopes (jumpPhase for jump motion checking).
* One more tweak for powder snow collision (use BlockProperties.collidesBlock() directly, instead of collides()).
* Naming convention: Velocity -> VelocityAdapter.
2025-02-05 20:53:39 +01:00
Lysandr0 6089ec3f7b More tweaks on powder snow collision.
* Powder snow doesn't exist on 1.16 and below, so make sure the isInsideBlock check returns false in that case (ViaVersion maps it to regular snow which has a solid collision box, which will be a problem with wall collision: NCP will see the abrupt deceleration without knowing that it was caused by the client seeing powder snow as a solid block.)

* Attempt to adjust the collision checking:  ensure that we only check the exact block the player is currently inside.

* Check for shift key toggles within the block-shape definition.

Bonus:
* Align naming convention for velocity flags.
* More comments
2025-01-30 09:55:22 +01:00
Lysandr0 3b60ae8aa9 Bump to 1.21.4, slight revision on powder snow collision (rich bounds), fix/adjust javadocs.
Side note: need to study how bundles work exactly, and evaluate cheating potential for this gameplay mechanic (namely, fast-clicking and inventory manipulation. FastClick may need to be updated).
2025-01-27 23:01:06 +01:00
Xaw3ep 1e75c342c7 Partly velocity processor rework 2025-01-27 05:45:10 +07:00
Lysandr0 26a053d6cf Make use of player#getCurrentInput(), fix a bunch of errors encountered on 1.8. 2024-11-07 21:52:21 +01:00
Xaw3ep f5ed107e2b Somewhat runnable 2024-11-07 14:56:28 +07:00
Lysandr0 2e73401803 Move some classes around
Use the compat.bukkit pacakge for Bridge classes that have the specific purpose of solving API breakages between versions.
2024-10-30 08:09:45 +01:00
Lysandr0 0a56ded6d3 Adapt to 1.21.3 changes. 2024-10-29 13:33:39 +01:00
Lysandr0 c0a66a56ee Touch-ups here and there. 2024-10-27 19:17:55 +01:00
Lysandr0 e0fa64c213 Finish implementing modern attributes (+ more cleanup). 2024-10-04 13:59:09 +02:00
Lysandr0 a310b9ebef Implement (most of the) 1.20.5/1.21 attributes, continue working on the vertical liquid speed prediction, better documentation for some methods.
Attribute implementation is still missing for legacy modules… TBD at a later time.
2024-09-22 14:35:21 +02:00
Lysandr0 89643cc734 Streamline code, much better documentation for several parts of code, refactor ray-tracing/axis-tracing code to an extra package.
* Rename methods in ClientVersion for less verbosity.
* Add convenience methods to ClientVersion.
* Add method to get either the player's or the entity's version in GenericVersion (and make use of it in RichEntityLocation).
* New Class: AxisAlignedBBUtils. To contain all utility methods related to bounding boxes.
* Remove unused code in MathUtils and MovingUtil.
* Move some methods around classes (Visible, CollisionUtil, MathUtils…).
* Do cross-version checking for bouncy blocks in RichEntityLocation.
* More conditions for checking the legitimacy of toggle sprint.
* Check for client version in the maybeElytraBoost method.
* Attempt to fix bunnyhopping in low-ceiling areas (isVerticallyConstricted…)
2024-08-06 13:40:39 +02:00
Lysandr0 2e3c7244f7 One more iteration for crouching VS shift key press. 2024-07-11 21:25:21 +02:00
Lysandr0 07f7eba2f4 Further clarify crouching VS sneaking.
Fix some typos
2024-07-09 16:25:39 +02:00
Lysandr0 0cddcd1ff1 Merge branch 'hspeed' of https://github.com/Updated-NoCheatPlus/NoCheatPlus into hspeed 2024-07-07 09:21:12 +02:00
Lysandr0 7cbd79789e Demote ImpossibleHit to boolean config options, cleanup VIII, fix some issues with Folia and teleportation. 2024-07-07 09:17:32 +02:00
Xaw3ep ea24fa1c57 Fix most horizontal movement calculation errors 2024-07-07 05:39:07 +07:00
Lysandr0 6f25a0f0f8 Sketch "isSolidFace()" NMS method, change for some method signatures, Cleanup VII
Speed factor methods will now use LivingEntity instead of Player signatures, because they'll be used in the future for vehicles as well.

isSolidFace is untested.
2024-05-17 20:52:12 +02:00
Lysandr0 14a19a9512 Cleanup IV 2024-02-15 21:57:43 +01:00
Lysandr0 bd56b867af Handle lost-ground uncertainty in a cleaner way, move some of the vertical uncertanity in its own method.
Instead of proactively calculating speed with thisMove#touchedGroundWorkaround, let lost-ground be treated as an "after failure" check: if the player fails the horizontal prediction and a lost-ground case happened, force-set the ground flag and re-calculate (effect on performance needs be evaluated).
Same thing applies for vertical motion with the PlayerEnvelopes#isTouchDownMove thing.

More:
* At last, get rid of bunnyfly: with a stricter vertical monitoring this should not be needed anymore.

* On respawning: let the player decide if sneaking/sprinting should be reset.

* Clarify some stuff here and there.

* Unbind lost-ground from toIsValid check in AirWorkarounds (move validity is already checked in lost-ground)

* Do still register item-use events/adapters from 1.12 up to 1.17
2023-12-20 21:39:38 +01:00
Lysandr0 1da6229bef Resolve most issues related to sneaking.
Properly set the sneaking status with player-poses, instead of shift key presses (see comment in CombinedListener. Could be worthy of a ticket to Spigot).
1.14 sneaking mechanics have been refined, for the most part. There's still one nasty issue that I couldn't manage to fix: trying to jump in 1.5 blocks-high areas… Jump is seemingly undetectable, so we may have to brute-force speed there….

More:
*AirWorkarounds: tighten up touch-down workaround; test for the most frequent workarounds earlier.

* Adjust things (and jump definition) to take crawling into account.

* Just to be sure: seek for literal "releaseUsingItem" name as well when reflectively calling the method.
2023-11-12 21:51:33 +01:00
Lysandr0 1e8ad02740 Cleanup all imports. 2023-11-12 21:51:10 +01:00
Lysandr0 8d7f6573cf Ops. 2023-11-09 15:01:57 +01:00
Lysandr0 dd4492dca2 Revise item-use handling to use Bukkit's HumanEntity#getItemInUse()
After… 12 or so years, Bukkit finally has a method to know if the player is using an item (not just blocking(!)), thus, the adapter is not needed anymore.
(How have we not noticed it this whole time!?)

Also move the resetActiveItem stuff as a service in PlayerData.
2023-11-09 14:48:06 +01:00
Lysandr0 fdb2c7b42a First iteration for Mojang's block collision bug-fix.
+ some formatting and better compatibility with cross-version checking in RichEntityLocation
2023-11-09 14:41:57 +01:00
Lysandr0 50b9eae3fd More progress (implement maybeBackOffFromEdge method).
Works somewhat okay but it still throws false positives, will need more iterations.

More:
* "Properly" handle wall collision. Implementation is not necessarily the most elegant, but it is the most robust and exploit-free, judging from some testings (couldn't reproduce any more false positive with it).

* Adjust jump definition in PlayerEnvelopes.

* Formatting and adjustements for AirWorkarounds (add rule for wrong split move etc...).

* Confine stepdown-from to not having slowfall.

* Get rid of legacy riptide implementation with CreativeFly.

* Check for client-version in the getLookingDirection method (apparently 1.12 and below have a slightly different equation).

* Add a temporary non-vanilla friction library for vDistLiquid only in BlockProperties, which still uses the old style implementation.

* Comments, clarify docs, clarify debug format and style for movement (should be a bit more readable).

* Get rid of Critical's config. options.

* Move elytra gliding consistency checks in the CombinedListener.

* Throw in legacy liquid collision methods (especially for lava's, which is quite inconsistent throughout recent versions).

* Zero drip leaf's AABB if unstable (workaround, needs to be tested)

* Use Spigot's new PlayerSignOpenEvent to handle AutoSign with 1.20 signs.

* Prepare / sketch a first SurvivalFly-based prediction with the elytra.

* Properly return -1 if could not get the firework boost power (BridgeMisc).

* Update ClientVersion up to 1.20.2.

* Bridge 1.13: test if a server may have a built-in raytracing implementation (Bukkit did introduce it in 1.13.2)

* Get rid of jump-phase check.

* Open: use SurvivalFly's prediction to know if the inventory needs to be closed

* Target Spigot's 1.20.2 from now on (poms)
2023-11-03 15:13:34 +01:00
Lysandr0 a3acd8d522 Sketch a first SurvivalFly-compatible riptide prediction, fix a logic issue with the fastclick.chest subcheck. 2023-09-23 13:15:27 +02:00
Lysandr0 a394b9e29a A whole lot of changes.
* Adjust stepping, jumping and bunnyhopping definitions to lost ground.
* Simplify AirWorkarounds (get rid of most of them, favouring a more coherent class).
* Re-add some lost ground cases; distinguish lost ground for vertical VS for horizontal motion (some cases won't apply to vertical but for horizontal and viceversa, see the "missedGroundCollision" comment) and format for much easier debugging (or at least look).
* Get rid of minJumpHeight method in LiftOffEnv.
* Move hasAttackSlowDown flag to the CombinedListener.
* Get rid of -now- unused sfZerovdistrepeat flag.
* Set sneaking, sprinting and use item status in PlayerData. See comments in the CombinedListener class as for why.

* CollisionUtil:
 - Some methods to get entities around players.

* RichEntityLocation:
 - As a bonus: selectively add cross-version compatibility with multi-protocol plugins in several places (honey blocks, berry bushes, levitation [...]).
 - Properly handle on-ground judgement with powder snow.
 - Implement a proper isSlidingDown method.

* RichBoundsLocation:
 - Format, order, remove redundant contraction of the bounding box with liquid checking (+ 0.001), fix bubble column collision and lastly, revert a change brought by @xaw3ep with the bounding box setting: using fullWidth / 2f is imprecise and will lead the isHeadObstructed method to return true when moving alongside walls, for now, the fix has been reverted to the  old resolution of Math.round((fullWidth * 500.0) / 1000).

* MovingListener:
 - Check for sneaking directly in the envelope method for bouncing and get rid of old stairs workaround.

* InventoryUtil:
 - Move the hasArrow method to the InventoryUtil class (+ some formatting).

* SurvivalFly:
 - Get rid of the now useless LIMIT_NEAR_GROUND envelope.
 - Adjust use of head obstruction checking.
 - Rough handling of slimce bounce mechanic; will need some adjustments down the road...
 - Somehow handle powder snow climbing.
 - Attempt to handle "unknown" horizontal movements: if we can't find a match (= a predicted speed having an offset smaller than 0.0001), set in this move the closest predicted speed to the actual one and adjust it through some kind of workaround.

Overall, we're reaching (and probably already stretching) NCP's infrastructure limitations.
This is especially noticeable with the on-ground judgment and collisions in general, which are the two main things that are preventing us from merging the branch in master (at least as a beta version).
Usually, NCP’s on-ground system is enough to get by even with more complex scenarios (i.e.: stepping), however the amount of edge cases to manage is (starting to be-) overwhelming: with predictions, we not only have to deal with lost ground -which already is a huge pain in the ass per se- but we also have to deal with the same issue on the opposite spectrum, or in other words, with “excessive ground” cases.
Just take a look at the LostGround class, PlayerEnvelopes.isJump()/Step() and all comments in AirWorkarounds.



Missing: 

Vertical:
 - In water/lava -> in air transitions
 - Jumping in waterlogged blocks
 - Implement the correct collision logic for 1.20 players (richentitylocation).
 - Fix insidePowderSnow checking (see notes in RichBoundsLoc).
 - Fix split move messing up when jumping in honey blocks.
 - Jumping on the very edge of chest lost ground case (completely misses the ground collision, player is seen as having 0.42 motion in air... Is it a shape issue rather?).
 - Wobbling up on slime blocks/beds (still need some adaptations to it. Getting sporadic false positives).

Horizontal:
 - Still false positives when moving against walls…
 - Lost ground still messing with prediction in general…
 - Still false positives when getting pushed…
 - Still missing that maybeBackOffFromEdge method…

IMPORTANT:
- We need to port / code / workaround Mojang’s new logic for moving along the edges of blocks with nothing else underneath (block properties are now properly applied even on the very edge)
2023-09-20 13:52:42 +02:00
Lysandr0 1defbc3305 Fix client-version setting fallback.
+ Re-order some stuff with vdistrel.
2023-06-13 22:15:40 +02:00
Lysandr0 4817eed02e Minor refactor for moving checks, rename Folia class, integrate Gutenberg as an ordinary check.
Move hard-coded magic into its own package (envelope); move checks.moving.magic class to the moving utilities package; split envelopes methods into its own class (PlayerEnvelopes); BounceUtil -> BounceHandler and to the envelope class; BounceType -> to the checks.moving.model package.

* Renamed Folia class to "SchedulerHelper" (name is up to debate, feel free to add)

* Gutenberg won't check for availability anymore. The event was introduced in 1.5 and NCP doesn't support versions lower than that anymore.

* Move "honeyBlockSidewayCollision" method to PlayerEnvelopes.

* Fix compilation errors in RichBoundsLocation and get rid of unused method.

* Get rid of the "split move" flag: too internal of an option and should never be disabled anyway.

* Clarify docs

* LiftOffEnvelope:
-Get rid of min/max jump distinction.
-Decrease normal jump height down to 1.26.

* SurvivalFly: various adjustments... Key change are:
 -The riddance of vAcc. Useless with the upcoming vDistRel rework;
-Unbind to the horizontal-push-speed mechanic from hard-coded magic. (Please Asofold for the love God why did you not document this kind of stuff... Why was it needed);
-Merge vDistWeb, vDistLevitation, vDistBush into vDistRel, climbables and powder snow are still handled in their respective methods because we are restricted by NCP's current  infrastructure and we cannot predict those two (powder snow in particular)
-Move honeyBlock collision to richboundslocation.

* RichEntityLocation:
-Force legacy players to have vines attached to a solid block to climb up.
-Check for client version for fullHeight setting as well.
-Move liquid pushing stuff to RuchEntityLocation
2023-06-10 22:11:23 +02:00
Lysandr0 aaeeec8bf6 Attempt to simplify SurvivalFly (vertical)
Workarounds are just too stratified and convoluted to keep up with them.
Just to debug one of them might take a week or more; so, except for oddSlope, oddGravity and vEnvHacks, all the other ones have been removed.

Changes:
* Get rid of the now unused isDownStream() and isInOrAboveSouldSand() methods.
* Move InputDirection class to the model package.
* Lift off envelope: web jump speed is 0.021
* Check for client version in NoFall, as well as reset data upon sliding on a honey block inside the checking method (not in the collision method in movingutil).
* Prepare a velocity flags to distinguish real velocity from fake entries.
* Implement legacy liquid pushing (not tested).
* Friction/speed factors getting is ignored if flying or gliding (vanilla)
* Integrate FastConsume as an ordinary check (1.5 and above servers have the consume event, no need to test for availability anymore)
* If protocol-hack plugins are not present but protocol lib is, do still set the client version.
* Attempt to catch ominisprint if speed is (apparently) legit.
* Display at least 6 digits when debugging speed h/v (with the speed prediction, this is much needed)
* Revert accidental formatting change to GodMode
*The band-aid "lowjump post" subcheck has been removed as well, because the vDistRel rework will (soon) catch those as well. But first, we need to patch the first-move-after-landing false positive.
* Also get rid of bunnyslope, once and for all.

Missing:
vDistRel: handling of: leaving liquids, noob-towering up, landing-back-on-ground, medium transitions...
vDistPowderSnow: incomplete, due to not knowing how the game handles ascending motion here.
vDistLevitation: works fine with lower levels, but breaks with higher ones (above 20 or so) for whatever reason.

(Was meant to be split into different commits, but I fucked up a bunch of things. Oh well)
2023-05-09 14:13:20 +02:00
Lysandr0 53f1642bff Merge master (1) 2023-04-13 17:59:54 +02:00
Lysandr0 10c50653e8 Cleanup for the chat listener, comments. 2023-04-04 08:18:03 +02:00
Lysandr0 96ac4df374 Update NCP to 1.19.4 and fix Against false positive with frogspawn. 2023-04-04 08:17:43 +02:00
Lysandr0 7b56ee4c40 Fix NPE. 2023-03-10 16:37:06 +01:00
Lysandr0 1c609e7e4a More changes (+)
* Further clarify docs and comments, cleanup.

* Reoder some event-listeners (especially in the movinglistener).

* Net checks: also request a setback on flyingfrequency violations (should prevent server-sided freeze [...]).

* Do still interpret packets for outgoing positions if flyingfrequency is disabled.

* Fix false positives with ImpossibleHit.

* Remove legacy boolean flag for 1.5 inventory tweaks (fastclick).

* Don't allow players to stand on tilted drip leaves (onGround judgement).

* SurvivalFly: reset bunnyhop delay on slopes and stairs, tweak slowfalling handling (only apply slowfall gravity if the player is actually falling [not coming from ground etc...]).

* Remove experimental Improbable feeding with VL frequency hook.

* Rework inventorymove:
Instead of checking during InventoryClickEvent(s), we check players on PlayerMoveEvents and if the inventory is open when it shouldn't be possible, it will be forcibly (and silently) closed, without generating any violation or alert .
This makes the check functionally identical to Open, so it has been merged in it.
Not 100% done. Still needs the speed prediction to function, in order to determine friction speeds.

* Set all config values to build 154 from now on.
2023-03-09 14:28:28 +01:00
Lysandr0 5429c8481e Merge branch 'master' into hspeed 2023-01-20 08:56:07 +01:00
Lysandr0 2f267b5650 Confine lost-ground cases, fix errors, fixes for SurvivalFly
* LostGround:
 - Swap edgedesc with pyramid and put edgedesc as a special case in vAcc;
 - Confine all Edgeasc cases by having a minimum speed of 0.0001;
 - Confine noobtower by jumPhase between 1 and 7 inclusive;
 - Confine couldstep by speed <= estimatedSpeed * 1.1;
 - Edgeasc2 won't be applied on split move (following asofold's note here);
- All edgeasc cases won't be applied if a lost ground case was applied with the move before;
 - Update Improbable if a lost ground case is applied;
These have not been tested.
They are rather the most plausible confining conditions that I can think of currently; aim is to prevent to easy abuse with NoFall disabled to accumulate fall distance.

* SurvivalFly:
 - Sharpen bunnyhop conditions;
 - Remove omnisprint for the moment;
 - Increase the inaccuracy margin with levitation;
 - Possibly fix bunnyhopping on soul sand and blocking speed in 1.8;
 - Reduce the complexity of split moves workarounds with stuck-speed, courtesy of @xaw3ep 's rework on the mechanic;
 - Lower head obstruction margin for low-jumping;
 - Sharpen levitation handling;
 - Roughly make vAcc work with slowfall.

* Fix NSM errors with some packet listeners;

* Comments, formatting, clarify comments

* Improbable:
 - Increase thresholds for firing violations, since it gets fed by a lot more inputs now;

(Probably forgot some other stuff... Oh well. Happy new year)
2023-01-05 21:10:19 +01:00
Lysandr0 6f670ce7c8 [Bleeding] Let Slowfall and Levitation be handled by SurvivalFly.
* Move Bridge1_17 stuff into BridgeMisc;
* Add a "hasGravity" method;
* Patch potential 1-block step bypass with lowvdistsb;
* Fix (for the most part) closing a shulker box while standing on top of it;
* Fix up a bit bubble columns handling;
* Fix false positives when exiting a bush or web from below;
* Cleanup and reduce signature for AirWorkarounds;
* Catch another trapfence lost ground case;
* Remove reminders of the old bunnyfly mechanic: all early-bunnyfly-reset cases can be omitted because those rely on the old condition "if (bunnyfly > 0 && hDistance > hAllowedDistanceBase)".
However with the current implementation, air / bunnyfly distance is already estimated and included;
* Use getLastJoinTime for Net_Moving and Net_KeepAliveFrequency, getting rid of the old listener workaround;
* Keep confining workarounds:
  -W_M_SF_ODDGRAVITY_3: one time use
  -W_M_SF_ODDLIQUID_13: one time use
  -W_M_SF_ODDLIQUID_7: one time use
  -W_M_SF_ODDLIQUID_5: 4 times use max
  -W_M_SF_ODDLIQUID_6: water-bound
  -W_M_SF_ODDLIQUID_12: one time use.
* Don’t ignore PVP and block-move velocity when in bushes and powder snow;
* Distinguish vertical friction factor by media (air, water, lava) and block (stuck-in-block);
* Slowfall:
  - Add workarounds for vDistRel where needed.
 - Adapt checking methods to it (modelling might be a little rough still).
  - Handle honey slide + slowfall.
  - Skip NoFall and fall damage with slowfall.
  - Handle with the BCT breaking blocks below with slowfall (false positives).
  - Skip vAcc: temporary. Needs a proper adaptation.
* Levitation:
  - Add checking method;
  - Add velocity when the effect wears off;
  - Skip NoFall;


Missing:
* InstantBow apparently always triggers with the first crossbow shot (why is it even enabled at all?);
* Major: players can stand on top of tilted drip leaves (!)(to avoid latency-based false positive, we might use the block change tracker system here)
* False positives when falling and breaking a block below with Efficiency enchant: issue with the server not keeping up with the client, might mitigate with the BCT [Does not seem to fix the issue, will need a ghost-block system fix];
* Bubble streams adjacent to each other drag/push: push prevails even if the box is in the column by pixels. Problem: we don’t get told if the column can also push the player;
* vAcc velocity downwards (old TODO);
* vAcc with snowfall (don’t skip, adapt rather);
* Still low-jump false positives when closing a shulker, with slowfall in particular;
* Low-jump false positive after jumping out of water and onto a water lily;
* Liquid modeling with slowfall is still quite rough;
* Levitation will need a refine later;
* Bubble columns ascend -> refine;
2022-08-13 14:46:17 +02:00
Lysandr0 1b795bb9ea Adjustments to hSpeed. 2022-07-23 20:25:30 +02:00
Lysandr0 c37908eec6 Move use-item data to CombinedData, debug hSpeed to begin testing, adjustments. 2022-07-17 17:54:32 +02:00
Lysandr0 d5d16d3db5 Yet another heterogeneous commit.
Lots of changes:
* [Bleeding] Add Net_toggleFrequency on packet level (needs to be tsted and adjusted, currently does not discern action types);
* [Bleeding] Add a quick check for no gravity when in webs;
* Formatting;
* Fix vDistBush + stepping;
* Fix Net_keepAliveFrequency/AttackFrequency/Moving not checking for the respective bypass permission;
* Fix Net_Moving always checking players, even if disabled;
* Fix Extreme_Move only running with CreativeFly;
* Fix low-jump detection not accounting for velocity;
* Fix a disabled Net_FlyingFrequency from crippling all other flying-packet checks;
* Remove redundant WrongTurn adapter;
* Remove legacy Fight_Speed check and keep AttackFrequency only (This means that servers older than 1.6.4 won't have attacking speed protection anymore. We need to put a halt on legacy-versions support at some point 😛);
* Remove legacy and unneeded mechanics: lost-sprint, assume sprint, slowness sprint hack, ground hop;
* Remove bubble-stream-horizontal-velocity workaround;
* Remove unimplemented FlyingFrequencyRedundant config;
* Rename compatibility dev module to -> NCPCompatSpigotCB1_12, since 1.12 is the last version to have a native module on its own;
* Rename NoSlow adapter to UseItemAdapter;
* Adjustments to vDistWeb and vDistBush;
2022-06-25 19:14:48 +02:00
Lysandr0 78e6c4cede Misc changes (mostly lost-ground cases removal)
Very heterogeneous commit.
Key changes:
* Comment out LostGround_Step: not too sure about this one however why is it even considered a lost-ground case if the player did touch the ground (to.isOnGround())?
* Remove LostGround_EdgeAsc7: duplicate code;
* Remove LostrGround_Pyramid: doesn't seem to cause any issue with vertical motion and with the new hSpeed rework, momentum ticks don't exist anymore.
* Remove LostGround_MiniStep: not needed. Jumping around flower pots is fine even without the workaround.
* Remove LostGround_vCollide: again, doesn't seem to be needed anymore.
* Confine LostGround_Micro by head obstruction due to a lantern or currently respawning;
* Better on-ground support for bunnyfly: account for block-change activity where possible;
* Skip block-speed check if the player is in water or in bubble-stream (NMS);
* Implement getMovementSpeed;
* Get rid of hAllowedDistanceBase (not needed anymore) [Might return for later uses i.e.: getting the allowed speed before applying friction];
* Rename methods and get rid of VanillaMath (changed my mind, keep everything in TrigUtil and MathUtil :p)
* Correct a typo in Inventoryutil.
* Fix a rather embarrassing typo (Ground-seeking distance for getBlockFrictionFactor is 0.5000001, not 5000001 :) )
* Support bukkit's /walkspeed command;
* Random clean-up for old checks.

- Note: The 0.1 magic value can be found in Abilities.java (walkingspeed)
2022-05-13 17:53:20 +02:00
Lysandr0 abbd90e943 [Incomplete][Not compiling][Bleeding] First step into the hspeed rework.
Moving some stuff in remote.
* Rework horizontal friction system;
* Cleanup code: remove unused and/or unneeded variables, remove old bunnyhop mechanic;
* Throw in a sketch of the predictive horizontal speed handling [broken, will not compile due to some stuff still missing]

Missing:
* 3d Movement direction handling
* Test everything I guess
* getMovementSpeed stripped only of sprinting speed
* Correct stuff that is going to be inevitably wrong :)
2022-04-26 16:07:24 +02:00
Lysandr0 cbdc63e746 Move class around.
Let math-related utilities have their own package
2022-04-13 15:28:36 +02:00
Xaw3ep 2cff2963c9 Restore lost commits (part 1)
Fix #150
Fix #155
And some other forgotten bugs
2022-03-05 18:40:08 +07:00
Lysandr0 bee2c1e349 First steps into 1.18
(No new blocks with this update. Thank god)
+ Re-arrange lost ground fencestep
2021-12-18 10:37:42 +01:00
Lysandr0 5b4dc5afe9 See details.
* InAirRules: confine specific workaround to Normal env;
* Readability: iusingitem -> isUsingItem(...) | F_COBWEB2 -> F_BERRY_BUSH | typo | Order in MCAccessBukkitModern;
* Do prevent players from faking critical hits in media where they can be faked;
* Open check: test on player sleep and death;
* Sharpen stepAcc;
* Slopes: skip on jump potions, let lowjump catch the reset;
* Bunny: on slope-jumping, demand distance higher than the y on ground, at least;
* Remove legacy bullshit (awkward snowfix);
* Demand yDistance greater than minimum gravity for maxphase.
* Remove left-overs from previous bunnyhop-related commits (simply increasing speed on slope-jumping should suffice).
* Fix 1.8 chests with ice underneath.
2021-12-16 09:32:28 +01:00
Lysandr0 b9f78ab326 More bunnies (+)
Changes:
* Fix a minor derp in FightListener: Improbable was being fed even with fight.speed disabled;
* isOnBouncyBlock environmental property, accounting for beds too;
* SurvivalFly:
   - Increase hAcc limit for headobstr
      with ice;
   - Move honey block collision to
      MovingUtil;
   - Fix head obstructed + bunny with
      lower block;
   - Reset hAcc in ediblebunny as well
      if head is obstructed;
* Add wasOnIceRecently method. Uses past move tracking;
* Move Extreme_move subcheck for flying packets into its own check. Also (potentially) fix some false positives;
* Remove WrongPacket. Useless;
* Only feed Improbable in Impossiblehit (no check);
* Tweaks for default config.
2021-10-19 10:28:32 +02:00
Lysandr0 8af2853bdd Forgot about this one. 2021-09-07 22:50:46 +02:00