Skip to content

Fix collision for copper bars and turtle eggs - #6555

Open
kforbro wants to merge 1 commit into
GeyserMC:masterfrom
kforbro:fix/bedrock-collision-fixes
Open

Fix collision for copper bars and turtle eggs#6555
kforbro wants to merge 1 commit into
GeyserMC:masterfrom
kforbro:fix/bedrock-collision-fixes

Conversation

@kforbro

@kforbro kforbro commented Jul 17, 2026

Copy link
Copy Markdown

Copper bars have the same collision as Iron bars.
Turtle eggs have the same collision 0.2..0.8 with different numbers of eggs. In Java, the collision differs if there are several of them.

I used the Claude Code to add the egg fix. Tested in the game.

Comment on lines +45 to +49
// Bedrock's box is narrower than Java's with multiple eggs, so push the player out by the 0.1375 difference.
blockCollision.pushOutOfBoundingBox(playerCollision, Direction.NORTH, 0.1375 + ulpZ);
blockCollision.pushOutOfBoundingBox(playerCollision, Direction.SOUTH, 0.1375 + ulpZ);
blockCollision.pushOutOfBoundingBox(playerCollision, Direction.EAST, 0.1375 + ulpX);
blockCollision.pushOutOfBoundingBox(playerCollision, Direction.WEST, 0.1375 + ulpX);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question - is this box always the same regardless of egg count; or are only specific counts affected? We have the block state (and therefore, block properties) available here to do a check properly

@kforbro kforbro Jul 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question - is this box always the same regardless of egg count; or are only specific counts affected? We have the block state (and therefore, block properties) available here to do a check properly

Always the same according to my BDS dump


@Override
protected void correctPosition(GeyserSession session, int x, int y, int z, BoundingBox blockCollision, BoundingBox playerCollision, double ulpX, double ulpZ) {
// Bedrock's box is narrower than Java's with multiple eggs, so push the player out by the 0.1375 difference.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this only applies to multiple eggs? can we only apply the pushing when it's multiple eggs (using state, you can check other collision class for example)

also what about Y collision, or that's not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants