Format code

This commit is contained in:
2026-05-16 23:08:09 +02:00
parent 81dd8045f2
commit d110df924e
562 changed files with 11025 additions and 10059 deletions
@@ -34,49 +34,49 @@ import org.bukkit.entity.Player;
@AllArgsConstructor
public class Point {
public static final Point ZERO = new Point(0, 0, 0);
public static final Point ZERO = new Point(0, 0, 0);
private final int x;
private final int y;
private final int z;
private final int x;
private final int y;
private final int z;
public static Point fromLocation(final Location location) {
return new Point(location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
public static Point fromLocation(final Location location) {
return new Point(location.getBlockX(), location.getBlockY(), location.getBlockZ());
}
public static Point fromBlockVector3(final BlockVector3 blockVector3) {
return new Point(blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ());
}
public static Point fromBlockVector3(final BlockVector3 blockVector3) {
return new Point(blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ());
}
public Point add(int x, int y, int z) {
return new Point(this.x + x, this.y + y, this.z + z);
}
public Point add(int x, int y, int z) {
return new Point(this.x + x, this.y + y, this.z + z);
}
public Point subtract(int x, int y, int z) {
return new Point(this.x - x, this.y - y, this.z - z);
}
public Point subtract(int x, int y, int z) {
return new Point(this.x - x, this.y - y, this.z - z);
}
public Point divide(int factor) {
return new Point(x / factor, y / factor, z / factor);
}
public Point divide(int factor) {
return new Point(x / factor, y / factor, z / factor);
}
public Location toLocation(World world) {
return new Location(world, x, y, z);
}
public Location toLocation(World world) {
return new Location(world, x, y, z);
}
public Location toLocation(World world, double dx, double dy, double dz) {
return new Location(world, x + dx, y + dy, z + dz);
}
public Location toLocation(World world, double dx, double dy, double dz) {
return new Location(world, x + dx, y + dy, z + dz);
}
public Location toLocation(Player player) {
return new Location(player.getWorld(), x, y, z, player.getLocation().getYaw(), player.getLocation().getPitch());
}
public Location toLocation(Player player) {
return new Location(player.getWorld(), x, y, z, player.getLocation().getYaw(), player.getLocation().getPitch());
}
public Location toLocation(Player player, double dx, double dy, double dz) {
return new Location(player.getWorld(), x + dx, y + dy, z + dz, player.getLocation().getYaw(), player.getLocation().getPitch());
}
public Location toLocation(Player player, double dx, double dy, double dz) {
return new Location(player.getWorld(), x + dx, y + dy, z + dz, player.getLocation().getYaw(), player.getLocation().getPitch());
}
public BlockVector3 toBlockVector3() {
return BlockVector3.at(this.x, this.y, this.z);
}
public BlockVector3 toBlockVector3() {
return BlockVector3.at(this.x, this.y, this.z);
}
}