Fix collision for copper bars and turtle eggs - #6555
Conversation
| // 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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
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.