Skip to content

WorldBorder collision logic is off by one for positive directions #738

@TrollyLoki

Description

@TrollyLoki

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues causing negative effects for end users

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Ready for Work

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions