Add more fast methods to BetterBlockPos
This commit is contained in:
parent
529f8dae47
commit
ce39183482
@ -126,18 +126,38 @@ public final class BetterBlockPos extends BlockPos {
|
||||
return new BetterBlockPos(x, y, z - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos north(int amt) {
|
||||
return amt == 0 ? this : new BetterBlockPos(x, y, z - amt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos south() {
|
||||
return new BetterBlockPos(x, y, z + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos south(int amt) {
|
||||
return amt == 0 ? this : new BetterBlockPos(x, y, z + amt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos east() {
|
||||
return new BetterBlockPos(x + 1, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos east(int amt) {
|
||||
return amt == 0 ? this : new BetterBlockPos(x + amt, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos west() {
|
||||
return new BetterBlockPos(x - 1, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BetterBlockPos west(int amt) {
|
||||
return amt == 0 ? this : new BetterBlockPos(x - amt, y, z);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user