Add WorldBorder support
- Uses API in spigot to get world border - Blocks faction claims that are outside the world border Improved border detection This is the updated border detection, this method is extremely accurate and does not over partition claim space like before. Takes the border and divides by two, and then converts the block distance into a chunk distance. Ex. Border = 100, Chunks = 6 vertically, 6 horizontally. We get the absolute value difference between the center chunk and the claim chunk, for both X and Z. We add both diffs, and if they are greater than the limit, then we know the chunk is outside the border!
This commit is contained in:
@@ -45,6 +45,9 @@ public abstract class Board {
|
||||
// Is this coord connected to any coord claimed by the specified faction?
|
||||
public abstract boolean isConnectedLocation(FLocation flocation, Faction faction);
|
||||
|
||||
// Is this location outside the world border?
|
||||
public abstract boolean isOutsideWorldBorder(FLocation flocation);
|
||||
|
||||
public abstract boolean hasFactionWithin(FLocation flocation, Faction faction, int radius);
|
||||
|
||||
//----------------------------------------------//
|
||||
|
||||
Reference in New Issue
Block a user