Fix mace smash, elytra PacketFly and boat phasing #11
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
6b6t/NoCheatPlus!11
Loading…
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Superseded by four focused pull requests, each based directly on current master:
ElytraPhase is excluded. The MaceSmash and Elytra PacketFly fixes remain in #13. The 26.3 collision follow-up keeps the registrations already merged in #12.
The split branches build independently and merge together without conflicts. The original branch and this discussion remain available as history.
Walkthrough
Movement checks now distinguish usable Elytras, track relight recovery, and identify invalid falls used by mace-attack checks. Boat movement uses passability checks and boat-specific setbacks. Folia vehicle corrections use asynchronous teleports that retain passengers. Block properties and movement checks add shelf-mushroom bounce support.
Changes: Elytra movement and mace checks
NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Bridge1_9.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/{ElytraResidual.java,MovingData.java,MovingListener.java,MovingUtil.java},NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraFlyTransition.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraResidualLifecycle.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/{fight/FightListener.java,moving/model/PlayerMoveData.java,moving/MovingListener.java,moving/util/MovingUtil.java},NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/fight/TestMaceSmash.javaBoat movement and vehicle corrections
NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/{VehicleChecks.java,VehicleEnvelope.java},NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/{TestBoatMoveAdmission.java,TestBoatPassable.java}NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/{VehicleChecks.java,VehicleSetBackTask.java},NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Folia.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestVehicleSetBackTask.javaShelf-mushroom movement support
NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC26.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.java,NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestVanillaShapes.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/magic/ShelfBounce.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestShelfBounce.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestLandingStepSequence.javaPriority:
Normal
Estimated code review effort: 4 (Complex) | ~55 minutes
Change: Bug fix
Sequence Diagram(s)
Suggested reviewers:
qbasty,alexprogrammerdeMerge Risk:
Low · previous review
8a097The movement and vehicle correction risks identified earlier are fixed. Restore the shared test API after the shape test to avoid order-dependent block tests; this is a bounded merge risk.
Pre-merge checks:
4 ·
1
Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai full review
✅ Action performed
Full review finished.
Actionable comments posted: 1
🤖 Prompt to fix review comments
ℹ️ Review info
⚙️ Run configuration
839af23d-ce5e-4565-9fd2-a3435cd84d73📥 Commits
Reviewing files that changed from the base of the PR and between
cb3e2e56a2and909df737da.📒 Files selected for processing: 10
NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/PlayerMoveData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/Passable.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/util/MovingUtil.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/collision/PassableAxisTracing.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraFlyTransition.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/fight/TestMaceSmash.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/TestElytraPhase.javaIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 5421
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 41901
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 31190
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 43708
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 32282
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 24756
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 15044
🏁 Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 34368
🌐 Web query:
official Minecraft ElytraItem isFlyEnabled getMaxDamage damage threshold source💡 Result:
Do not classify a server-ended glide as an airborne toggle.
isAirborneElytraToggleis not tied to anEntityToggleGlideEvent.Bridge1_9.isWearingElytra(player)checks only the item type, so a depleted Elytra can satisfy the predicate while the player remains airborne.The predicate returns from
workaroundFlyCheckTransitionbeforeguessVelocityAmount. SurvivalFly then lacks the transition velocity, retains horizontal excess as a violation, and can return a setback location.Guard this predicate with the same Elytra usability condition used by vanilla, such as
ElytraItem.isFlyEnabled. Do not useInventoryUtil.isItemBrokenunless its threshold also covers the point at which vanilla disables flight.🤖 Prompt for AI Agents
✅ Addressed in commits
9e4adb1to298584d@coderabbitai review
✅ Action performed
Review finished.
🧹 Nitpick comments: 1
🤖 Prompt to fix review comments
ℹ️ Review info
⚙️ Run configuration
40b763bb-97af-4f08-826d-bc361e4df1b9📥 Commits
Reviewing files that changed from the base of the PR and between
909df737daand298584d930.📒 Files selected for processing: 6
NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/ElytraResidual.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Bridge1_9.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraFlyTransition.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraResidualLifecycle.java🚧 Files skipped from review as they are similar to previous changes: 2
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
MaceSmash aka MaceKill should now be fixed, but I'm not sure it's 100% covered. Other bypasses could still exist.
@coderabbitai review
✅ Action performed
Review finished.
Actionable comments posted: 1
6d88dd81-c134-4d72-823c-d7a710fd36bcReviewing files that changed from the base of the PR and between
298584d930and9278a07944.NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/util/MovingUtil.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/VehicleChecks.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/VehicleEnvelope.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/VehicleSetBackTask.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Folia.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/fight/TestMaceSmash.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestBoatMoveAdmission.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestBoatPassable.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestVehicleSetBackTask.javaIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Release the pending state if the completion task cannot be scheduled.
Folia.runSyncTaskForEntitycatches reflection errors and returnsnull. It does not callretiredin that case. ThewhenCompletelambda ignores the return value. If scheduling fails,data.isVehicleSetBackstaystrueanddata.vehicleSetBackTaskIdstays set. The new early return incheckVehicleMovethen drops every later move for this boat. Check the return value and clear the state when it isnull.Proposed fix
Committable suggestion
✅ Addressed in commits
a23f28cto8f2c6b6@coderabbitai review
✅ Action performed
Review finished.
🧹 Nitpick comments: 2
fd9590f1-23aa-4026-8d51-07e3d607a9c9Reviewing files that changed from the base of the PR and between
9278a07944and8f2c6b6b41.NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/VehicleEnvelope.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/VehicleSetBackTask.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Folia.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraFlyTransition.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestBoatPassable.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/checks/moving/vehicle/TestVehicleSetBackTask.javaIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Porting to 26.3: pushing the missing block collision data for poplar, shelf mushrooms, straw beds and the new plants. Existing generic models cover the new wool/concrete stairs and slabs.
All 3,357 states of the 90 new block types passed the native Folia 26.3 collision/ground audit. The Java 25 build passed 871 test executions; final focused block tests and tests against the 26.3 API also passed.
Last coderabbit review to review the 26.3 collision aditions. @coderabbitai review
@Magnus-KrillI’ll trigger a review of the latest changes, with a focus on the 26.3 block collision additions.✅ Action performed
Review finished.
Actionable comments posted: 1
654c0505-317d-4b0f-9dd3-abc8dec28a7cReviewing files that changed from the base of the PR and between
8f2c6b6b41and8a0977372b.NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/MCAccessBukkitModern.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/magic/ShelfBounce.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/Folia.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/blocks/init/vanilla/BlocksMC26.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/MaterialUtil.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestElytraFlyTransition.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestLandingStepSequence.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestVanillaShapes.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestShelfBounce.javaIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Restore the API after this test.
PluginTests.setUnitTestNoCheatPlusAPI(true)replaces the shared API. Line 113 then registers this test’sMCAccessBukkitModern, but@Afterdoes not restore the previous API. If another block test runs afterward,BlockTests.initBlockProperties()uses this access instead of that test’s fixture. Save and restore the previous API during cleanup. (raw.githubusercontent.com)nvm found smth else so another one @coderabbitai review
@Magnus-KrillI’ll trigger another review of the latest changes.⚠️ Action not completed
Review rate limited.
Pull request closed