Fix Bedrock block collision contacts #16
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!16
Loading…
Reference in a new issue
No description provided.
Delete branch "Magnus-Krill/codex/bedrock-ender-chest-collisions"
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?
Bedrock collision shapes can differ from Java, so valid standing heights and movement through client-free parts of blocks can trigger ground or passability checks. Keep the ender chest fix and add exact static profiles for 191 block types / 13,357 states on authenticated Floodgate clients reporting Bedrock 26.50–26.52.
Preserve Java models, native collision queries and Geyser-corrected support faces. Apply client-free geometry only to passability, keeping Java ground checks intact. Match Bedrock's bed-bounce timing and recognize exact Java-to-client support-height corrections when stepping off a block, without counting them as low jumps. Other movement checks and Java bounce limits remain active.
Local Geyser custom-block overrides are excluded. Unsupported client versions or incompatible Geyser registries retain native behavior. Bamboo, pointed dripstone, sulfur spike, scaffolding, piston, sticky piston and piston head retain their existing handling because their geometry depends on position, entities or moving/paired state. The comparison and profile generator are included under tools, with pinned source data and checksums.
Validation: Java 25 package and full Maven suite pass. The isolated Folia 26.3 / Geyser audit passes all 13,357 states, 13,633 Bedrock support probes, 37,119 preserved Java support contacts and 1,669,625 passability probes. All 199 live custom mappings are excluded correctly. Recorded Bedrock bed-bounce and chest-edge regressions pass; the combined build also passes the exploit, boat and shelf regressions, including 16 tests with native 26.3 registries. The original ender chest fix was confirmed in Bedrock gameplay; the latest movement corrections still need a fresh Bedrock gameplay test.
Summary by CodeRabbit
Walkthrough
The plugin identifies Floodgate players and records their Bedrock client versions. Verified Bedrock collision profiles are applied to block passability and ground checks. Bedrock-specific movement handling and tools for generating and validating collision profiles are also added.
Changes: Bedrock Player and Collision Support
NCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMisc.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/players/*,NCPPlugin/src/main/resources/plugin.yml,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestFloodgateDetection.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestPackagedResources.javaBridgeMiscqueries Floodgate for player identity and client version.PlayerDataManagerrecords Bedrock status and the reported version. Player data clears the version when the player leaves. The plugin declares Floodgate and Geyser as soft dependencies.tools/*,NCPCompatBukkit/src/main/resources/bedrock/*,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestPackagedResources.javaNCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BedrockBlockShapes.java,NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/BlockCacheBukkitModern.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/{collision/BedrockCollision.java,map/BlockCache.java,map/BlockProperties.java},NCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/*Bedrock*.java,NCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/model/TestBedrockBlockShapes.java,NCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestBedrockCollision.javaBedrockBlockShapesloads verified collision data and checks Geyser registry overrides. The Bukkit cache returns Bedrock bounds only for verified profiles and valid chunks. Collision and ground checks use those bounds. Tests cover profile loading, cache conditions, passability, and support across world heights.NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/magic/BedBounce.java,NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestBedBounce.java,NCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestLandingStepSequence.javaBedBouncecalculates bounce rise using Bedrock-specific physics.SurvivalFlyhandles detected Bedrock support corrections and passes the player’s Bedrock status to bounce evaluation. Tests cover bounce values and landing sequences.Priority:
Normal
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Bug fix
Sequence Diagram(s)
Merge Risk:
Low · up to
1bb4dVerified Bedrock players may incur repeated profile lookups during movement. This is a bounded optimization opportunity, not a demonstrated blocker to merging.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 14.53% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 117 functions across 25 files. (6 skipped: 6 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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 review
✅ Action performed
Review finished.
Actionable comments posted: 1
a0b99eb9-2cdd-4b93-8558-a0029ef25091Reviewing files that changed from the base of the PR and between
c2109d0f33and9da21b38c0.NCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/BlockCacheBukkitModern.javaNCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestBedrockEnderChest.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMisc.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/players/PlayerData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/players/PlayerDataManager.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.javaNCPPlugin/src/main/resources/plugin.ymlNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestPackagedResources.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestFloodgateDetection.javaIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 11263
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 42236
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 41871
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 29686
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 22483
Script executed:
Repository: 6b6t/NoCheatPlus
Length of output: 13653
Add a production ground flag for Bedrock ender chests.
BlockProperties.isOnGround(...)returnsAlmostBoolean.MAYBEwhenENDER_CHESTlacksBlockFlags.F_GROUND. It returns before callingnode.getBounds(...), so the new Bedrock bounds cannot recognize the 0.95-high lid during the ordinary SurvivalFly ground check. The tests avoid this path by forcingBlockFlags.SOLID_GROUND.Set the production
ENDER_CHESTflags toBlockFlags.SOLID_GROUND. This enables the existing ground path without changing Java or native collision bounds.Suggested fix
✅ Addressed in commits
3fe39aeto1bb4d41@coderabbitai review
✅ Action performed
Review finished.
7d31f6b4-fda4-4f69-98d7-d74302afb51cReviewing files that changed from the base of the PR and between
9da21b38c0and1bb4d418f2.NCPCompatBukkit/src/main/resources/bedrock/collisions-26.50.tsv.gzis excluded by!**/*.gzNCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/BlockCacheBukkitModern.javaNCPCompatBukkit/src/main/java/fr/neatmonster/nocheatplus/compat/bukkit/model/BedrockBlockShapes.javaNCPCompatBukkit/src/main/resources/bedrock/LICENSE-Cloudburst.txtNCPCompatBukkit/src/main/resources/bedrock/README.mdNCPCompatBukkit/src/main/resources/bedrock/collisions-26.50.jsonNCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestBedrockGroundProfiles.javaNCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestBedrockProfileCache.javaNCPCompatBukkit/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/model/TestBedrockBlockShapes.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/magic/BedBounce.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/player/SurvivalFly.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/compat/BridgeMisc.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/players/IPlayerData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/players/PlayerData.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/players/PlayerDataManager.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/collision/BedrockCollision.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockCache.javaNCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/map/BlockProperties.javaNCPCore/src/test/java/fr/neatmonster/nocheatplus/test/TestBedrockCollision.javaNCPPlugin/src/main/resources/plugin.ymlNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/TestPackagedResources.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/compat/bukkit/TestLandingStepSequence.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestBedBounce.javaNCPPlugin/src/test/java/fr/neatmonster/nocheatplus/test/TestFloodgateDetection.javatools/.gitignoretools/DumpGeyserStates.javatools/README.mdtools/compare_collisions.pytools/generate_bedrock_shapes.pytools/test_compare_collisions.pytools/test_generate_bedrock_shapes.pyIncluded review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.