[SPIGOT-2936] WorldBorder.isInBounds bad logic Created: 19/Dec/16  Updated: 19/Dec/16  Resolved: 19/Dec/16

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Daniel Ennis Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: craftbukkit


 Description   

In WorldBorder.isInBounds(int x, int z), the last variable checked is currently 

(double) (x << 4) < this.e()

 When it should be

(double) (z << 4) < this.e()

As it is checking x 3 times and z once.

This allows monsters to spawn outside of the world border.



 Comments   
Comment by Daniel Ennis [ 19/Dec/16 ]

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/WorldBorder.patch#28

Generated at Tue Apr 22 06:49:49 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.