mirror of https://github.com/Minestom/Minestom.git
49 lines
750 B
Java
49 lines
750 B
Java
package fr.themode.minestom.utils;
|
|
|
|
public class BlockPosition {
|
|
|
|
private int x, y, z;
|
|
|
|
public BlockPosition(int x, int y, int z) {
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
}
|
|
|
|
public void add(int x, int y, int z) {
|
|
this.x += x;
|
|
this.y += y;
|
|
this.z += z;
|
|
}
|
|
|
|
public int getX() {
|
|
return x;
|
|
}
|
|
|
|
public void setX(int x) {
|
|
this.x = x;
|
|
}
|
|
|
|
public int getY() {
|
|
return y;
|
|
}
|
|
|
|
public void setY(int y) {
|
|
this.y = y;
|
|
}
|
|
|
|
public int getZ() {
|
|
return z;
|
|
}
|
|
|
|
public void setZ(int z) {
|
|
this.z = z;
|
|
}
|
|
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Position[" + x + ":" + y + ":" + z + "]";
|
|
}
|
|
}
|