make Vector3 constructor private

This commit is contained in:
dfsek
2021-12-20 00:06:35 -07:00
parent 007c761537
commit fb6c86801e
7 changed files with 8 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ public class BukkitPlayer extends BukkitCommandSender implements Player {
@Override
public Vector3 position() {
org.bukkit.Location bukkit = delegate.getLocation();
return new Vector3(bukkit.getX(), bukkit.getY(), bukkit.getZ());
return Vector3.of(bukkit.getX(), bukkit.getY(), bukkit.getZ());
}
@Override

View File

@@ -152,7 +152,7 @@ public final class BukkitAdapter {
}
public static Vector3 adapt(Location location) {
return new Vector3(location.getX(), location.getY(), location.getZ());
return Vector3.of(location.getX(), location.getY(), location.getZ());
}
public static Vector adapt(Vector3 vector3) {
@@ -160,7 +160,7 @@ public final class BukkitAdapter {
}
public static Vector3 adapt(Vector vector) {
return new Vector3(vector.getX(), vector.getY(), vector.getZ());
return Vector3.of(vector.getX(), vector.getY(), vector.getZ());
}
public static CommandSender adapt(org.bukkit.command.CommandSender sender) {

View File

@@ -39,7 +39,7 @@ public final class FabricAdapter {
}
public static Vector3 adapt(BlockPos pos) {
return new Vector3(pos.getX(), pos.getY(), pos.getZ());
return Vector3.of(pos.getX(), pos.getY(), pos.getZ());
}
public static FabricBlockState adapt(BlockState state) {