Fix beacons disconnecting players when the beam is obstructed - #6611
Merged
Novampr merged 2 commits intoSep 23, 2026
Merged
Conversation
Java stops updating the beacon's level while the beam is blocked, so Bedrock could ask for effects it rejects.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Bedrock players being disconnected when confirming beacon effects while the beacon beam is obstructed, by validating the Bedrock-selected effects against the beacon level that Java reports before forwarding the request downstream.
Changes:
- Track the Java-reported beacon
levelsvalue onBeaconContainer(container property key0). - Add effect/level validation in
BeaconInventoryTranslator#translateSpecialRequestto locally reject invalid selections instead of forwarding them and triggering a disconnect. - Introduce a mapping of beacon effects to required beacon levels to mirror Java’s validation rules.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java | Records Java beacon level and validates primary/secondary effect requests before sending ServerboundSetBeaconPacket. |
| core/src/main/java/org/geysermc/geyser/inventory/BeaconContainer.java | Adds a levels field to store the Java-reported beacon level. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Novampr
reviewed
Aug 11, 2026
| OptionalInt primary = toJava(beaconPayment.getPrimaryEffect()); | ||
| OptionalInt secondary = toJava(beaconPayment.getSecondaryEffect()); | ||
| if (!validEffects(primary, secondary, container.getLevels())) { | ||
| // Java stops updating the level while the beam is obstructed, so Bedrock can offer effects |
Contributor
There was a problem hiding this comment.
I wonder if this is something we could also patch in the integrated pack (Making the option impossible to pick), for now I agree this fix will work good enough
Novampr
approved these changes
Sep 23, 2026
vtremblay
pushed a commit
to vtremblay/Geyser
that referenced
this pull request
Sep 23, 2026
…MC#6611) Java stops updating the beacon's level while the beam is blocked, so Bedrock could ask for effects it rejects. Co-authored-by: Auri <auroranova8756@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6603 #6559
Symptom
Since Java 26.2, Bedrock players get kicked after pressing confirm while interacting with the beacon UI. The server only logs a single line:
Player <name> tried to set invalid beacon effects, with no stack trace. After relogging, the beacon's state is unchanged.Cause
The two sides disagree on what the "beacon level" is, and Geyser forwards the Bedrock client's selection as-is. The Bedrock client counts the pyramid itself to compute the level and lights up the effect buttons accordingly. Java's
BeaconBlockEntity#levels, however, is only recalculated while the beam reaches the sky — once the beam is obstructed,beamSectionsgets cleared andlevelsfreezes at its last value, so a beacon that has never had a clear beam stays at level 0 forever. Geyser does receive the level Java reports (container property key 0), but was previously discarding it outright. As a result, Bedrock shows level 2 and allows selecting the Jump Boost upgrade, while Java still thinks the level is 0, sovalidateEffectsflags it as invalid.Also see #6603
Fix
Added a
levelsfield toBeaconContainer; case 0 inupdatePropertynow records this value;translateSpecialRequestvalidates the request against the same rules asBeaconBlockEntity#validateEffectsbefore forwarding it, and callsrejectRequest(request, false)if validation fails.Fix Result
Paper 26.2-111, Geyser-Spigot + Floodgate only.
Before the fix, the crash still occurred whenever there was a block above the beacon beam. After the fix, the request is rejected locally without kicking the player, the beacon only becomes interactable again once the obstruction is removed.
This PR used Claude Code to locate the issue, identify the API changes introduced in the version update, implement the fix. I am a human and this PR tested by myself.