Movecraft icon indicating copy to clipboard operation
Movecraft copied to clipboard

WorldBorder collision logic is off by one for positive directions

Open TrollyLoki opened this issue 9 months ago • 0 comments

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:

  1. Set the world border size to 1000 (leaving the center at 0,0).
  2. Pilot a craft near the east (+X) edge of the worldborder.
  3. Move the craft towards the world border one block east a time.
  4. Observe that the eastern most blocks of the craft are allowed to get to X=500 despite being outside the world border.
  5. 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: Screenshot of a craft that moved outside the world border

Versions (please complete the following information):

  • Movecraft: Latest dev build (9f54af9)
  • Addons: None
  • Java: Temurin 21.0.4
  • Minecraft: 1.21.4

TrollyLoki avatar Mar 04 '25 21:03 TrollyLoki