Movecraft
Movecraft copied to clipboard
WorldBorder collision logic is off by one for positive directions
Describe the bug Crafts are allowed to move one block into the world border when moving in a positive direction (+X/+Z).
To Reproduce Steps to reproduce the behavior:
- Set the world border size to 1000 (leaving the center at 0,0).
- Pilot a craft near the east (+X) edge of the worldborder.
- Move the craft towards the world border one block east a time.
- Observe that the eastern most blocks of the craft are allowed to get to X=500 despite being outside the world border.
- Following the same steps a similar problem occurs at the southern (+Z) edge.
Expected behavior The craft should stop exactly at the world border, so that no blocks can be positioned outside it. This is the current behavior for the other two directions: west (-X) and north (-Z).
Screenshots
A craft moved as far northeast as currently possible:
Versions (please complete the following information):
- Movecraft: Latest dev build (9f54af9)
- Addons: None
- Java: Temurin 21.0.4
- Minecraft: 1.21.4