Allow claiming town plots in the same chunk
Off by one error
This commit is contained in:
parent
ba0042311b
commit
648518d5b6
1 changed files with 2 additions and 2 deletions
|
@ -66,8 +66,8 @@ public class TownyFactionsComponent extends Component<ButtonPresents> implements
|
|||
public void onTownyClaim(TownPreClaimEvent event) {
|
||||
PS coord = PS.valueOf(getLocation(event.getTownBlock().getWorldCoord()));
|
||||
int distance = distance().get();
|
||||
for (int i = -distance; i <= distance; i++) {
|
||||
for (int j = -distance; j <= distance; j++) {
|
||||
for (int i = -distance + 1; i <= distance - 1; i++) {
|
||||
for (int j = -distance + 1; j <= distance - 1; j++) {
|
||||
if (i * i + j * j <= distance * distance) {
|
||||
PS chunk = PS.valueOf(coord.getChunkX(true) + i, coord.getChunkZ(true) + j)
|
||||
.withWorld(coord.getWorld());
|
||||
|
|
Loading…
Reference in a new issue