Bedrock block collisions (from #16), works behind our proxy #26

Open
qbasty wants to merge 24 commits from ncp16-bedrock-collisions into master
Owner

Carries forward Magnus's Bedrock collision work from #16, with the proxy-specific changes and review fixes below. Magnus's three commits and authorship are preserved.

Changes:

  • Add a pluggable Bedrock profile provider (BedrockProfileProvider) that returns edition plus client version. The default uses Floodgate and its client version when available; otherwise it uses our dotted-name / zero-high-bits UUID identity rule. Missing versions remain unknown and keep Java geometry.
  • Use the collision table only for Bedrock 26.50–26.52. The live Geyser 2.12.1 accepts 26.40–26.44, 26.45, 26.50–26.52, and 26.60; all clients outside the table range retain Java behavior.
  • Put the ender-chest bounds override behind the same verified version and feature gates.
  • Preload the collision table during plugin startup and log its version and state/material counts once. Use an EnumSet<Material> candidate check before chunk ownership checks.
  • Add the default-on config key compatibility.bedrock-collisions.active; disabling it restores Java collision behavior, including the Java ender-chest shape.
  • Preserve current shelf-mushroom handling while merging Magnus's Bedrock support and bounce fixes.
  • Include version-pinned comparison/generation tools. The NCP maintainer owns manual table refreshes when Geyser accepts a new Bedrock release; the update steps and 26.60 fallback are documented in tools/README.md.

Validation: Home build host, Maven 3.9.11 / Java 25, mvn -B clean package — BUILD SUCCESS. 939 tests across 120 suites; 0 failures, 0 errors, 5 skipped. Packaged YAML validation passed. The in-game comparison remains for flow step 4.

Config default: compatibility.bedrock-collisions.active: true.

Carries forward Magnus's Bedrock collision work from [#16](https://github.com/6b6t/NoCheatPlus/pull/16), with the proxy-specific changes and review fixes below. Magnus's three commits and authorship are preserved. Changes: - Add a pluggable Bedrock profile provider (`BedrockProfileProvider`) that returns edition plus client version. The default uses Floodgate and its client version when available; otherwise it uses our dotted-name / zero-high-bits UUID identity rule. Missing versions remain unknown and keep Java geometry. - Use the collision table only for Bedrock 26.50–26.52. The live Geyser 2.12.1 accepts 26.40–26.44, 26.45, 26.50–26.52, and 26.60; all clients outside the table range retain Java behavior. - Put the ender-chest bounds override behind the same verified version and feature gates. - Preload the collision table during plugin startup and log its version and state/material counts once. Use an `EnumSet<Material>` candidate check before chunk ownership checks. - Add the default-on config key `compatibility.bedrock-collisions.active`; disabling it restores Java collision behavior, including the Java ender-chest shape. - Preserve current shelf-mushroom handling while merging Magnus's Bedrock support and bounce fixes. - Include version-pinned comparison/generation tools. The NCP maintainer owns manual table refreshes when Geyser accepts a new Bedrock release; the update steps and 26.60 fallback are documented in `tools/README.md`. Validation: Home build host, Maven 3.9.11 / Java 25, `mvn -B clean package` — BUILD SUCCESS. 939 tests across 120 suites; 0 failures, 0 errors, 5 skipped. Packaged YAML validation passed. The in-game comparison remains for flow step 4. Config default: `compatibility.bedrock-collisions.active: true`.
coderabbitai[bot] commented 2026-11-18 17:20:08 +00:00 (Migrated from github.com)

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a333681f-a632-44b7-adb6-0b2216bd9172
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

<!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> Trigger review > > This repository does not receive automatic reviews because it has fewer than 10 stars. > > <details> > <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> > <dl> > <dd> > <br> > > - **Source mode**: Auto > - **Repository**: Unavailable > - **Branch**: Unavailable > - **File**: No configuration file from this repository applied > - **Commit**: Unavailable > - **Layers**: defaults > - **Review profile**: CHILL > - **Plan**: Advanced > - **Run ID**: `a333681f-a632-44b7-adb6-0b2216bd9172` > > </dd> > </dl> > </details> <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- autopilot:start --> - [ ] <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts <!-- autopilot:end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=6b6t/NoCheatPlus&utm_content=26)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> <br> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end -->
approval-bot left a comment

Automatic approval. Required checks still have to pass before merging.

Automatic approval. Required checks still have to pass before merging.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'ncp16-bedrock-collisions:ncp16-bedrock-collisions'
git switch 'ncp16-bedrock-collisions'
Sign in to join this conversation.
No description provided.