* Do register 1.21 blocks - 1.21.5 blocks are still missing TBD;
* Sweep old/legacy isVelocityJumpPhase field - no longer needed with the upcoming velocity rework;
* Naming conventions, cleanup;
* Attempt to guess/brute-force when the 0.2 climbable speed should be applied when in powder snow.
* Remove redundant collision checking for bubble columns
* Clarify and clean-up javadocs; add comments.
* RichBoundsLocation:
- getTypeId/Above() -> getBlockType/Above().
- getAABBCopy() -> getBoundingBox().
- Align collision checkers to the other ones (do not check in a top-down way)
* Magic: move envelope methods to PhysicsEnvelope.
* PlayerEnvelopes -> PhysicsEnvelope.
* Remove unneeded method in TrigUtil.
* BlockProperties:
- getBlockFrictionFactor() -> getHorizontalFrictionFactor().
- Attempt to handle powder snow behaviour within the on ground judgement.
- Remove unused World argument in isOnGround().
* DataManager: add getPlayerDataForEntity().
* PlayerMoveData: differentiate jumping from just pressing the space bar.
* AxisAlignedBBUtils:
- Rename creation methods.
- When converting a BoundingBox object to a double array, check it is null and create an "empty" box of all 0.0 if so.
* SurvivalFly:
- Correct minor oversight with the gravity-reiteration fix.
* 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.
* 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
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).
* Suppress some warnings
* Changed my mind: keep everything in one class for legacy input calculations.
* Remove inLiquid condition for levitation in the MovingListener.
* Add inLiquid condition for the jumping envelope.
Prediction for both vertical and horizontal seems to be broken for versions below 1.12. Still investigating why… Too tired to continue right now.
Lots of issues still remain (this is mostly a starting point).
Namely:
1) I can't seem to find how the game handles gravity in liquid (descending; not pressing the space bar);
2) It still doesn't account for all version-dependent nuances (i.e.: 1.12 and below clients not being able to swim up to the surface), because it is a major pain in the ass to: 1. download all NMS sources 2. research and note down what changed across versions… So, what we(I?)'ll do is to just account for 1.8 clients, since that is the most used (and relevant) legacy version (at least for publishing a beta in master);
3) Vertical medium-checking order is (currently) wrong: Minecraft checks for water first, then for lava, then gliding, and finally, it falls back to air (Source: EntityLiving.java -> travel() method).
For vertical predictions, NCP check for climbing first (odd one out, because we still use a limit-based implementation for it), then gliding, and then it falls back to vdistrel, which unifies air and liquids.
I chose to trade NMS logic for code readability within NCP. Having two, almost-identical vdistrel methods (one for liquid, one for air) would be extremely ugly.
Still, it'd be best to (pedantically) follow what NMS does.
This could be solved by unifying vertical and horizontal predictions. But… Willpower, I guess? :)
The code is starting to get harder to read too, so perhaps it’s time to merge vertical and horizontal predictions to reduce redundancy anyway.
* 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…)
As a bonus: keep track of negligible horizontal collisions; check for Improbable on fake-bed leave packets and do check for enough impulse for sprinting (apparently the game does have such condition).
Last version of NCP 3? Too many bugs can't be handle on current codebase. Will now focus on rework.
Changes:
+ Fix fall damage bug with folia on change world
+ Compatible with wind charge