Multiple Enhancements Brought Up To Me By Frasty

This commit is contained in:
Driftay
2019-08-26 07:31:02 -04:00
parent c93d2f235a
commit 38247b17c2
4 changed files with 15 additions and 4 deletions

View File

@@ -70,9 +70,14 @@ public class CmdStuck extends FCommand {
// spiral task to find nearest wilderness chunk
new SpiralTask(new FLocation(me), radius * 2) {
final int buffer = P.p.getConfig().getInt("world-border.buffer", 0);
@Override
public boolean work() {
FLocation chunk = currentFLocation();
if (chunk.isOutsideWorldBorder(buffer)) {
return true;
}
Faction faction = board.getFactionAt(chunk);
int buffer = P.p.getConfig().getInt("world-border.buffer", 0);
if (faction.isWilderness() && !chunk.isOutsideWorldBorder(buffer)) {