mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 05:40:16 +00:00
put vector3 in class in API
This commit is contained in:
@@ -4,7 +4,6 @@ import com.dfsek.terra.api.entity.Player;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.bukkit.world.BukkitAdapter;
|
||||
import com.dfsek.terra.vector.Vector3Impl;
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class BukkitPlayer implements Player {
|
||||
@@ -22,7 +21,7 @@ public class BukkitPlayer implements Player {
|
||||
@Override
|
||||
public Vector3 position() {
|
||||
org.bukkit.Location bukkit = delegate.getLocation();
|
||||
return new Vector3Impl(bukkit.getX(), bukkit.getY(), bukkit.getZ());
|
||||
return new Vector3(bukkit.getX(), bukkit.getY(), bukkit.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.dfsek.terra.api.world.TerraWorld;
|
||||
import com.dfsek.terra.api.world.Tree;
|
||||
import com.dfsek.terra.api.world.World;
|
||||
import com.dfsek.terra.bukkit.world.BukkitAdapter;
|
||||
import com.dfsek.terra.vector.Vector3Impl;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeType;
|
||||
import org.bukkit.block.Block;
|
||||
@@ -54,7 +53,7 @@ public class CommonListener implements Listener {
|
||||
block.setType(Material.AIR);
|
||||
Tree tree = c.getRegistry(Tree.class).get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
|
||||
org.bukkit.Location location = e.getLocation();
|
||||
if(!tree.plant(new Vector3Impl(location.getX(), location.getY(), location.getZ()), BukkitAdapter.adapt(e.getWorld()), new FastRandom()))
|
||||
if(!tree.plant(new Vector3(location.getX(), location.getY(), location.getZ()), BukkitAdapter.adapt(e.getWorld()), new FastRandom()))
|
||||
block.setBlockData(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.dfsek.terra.bukkit.world.block.BukkitBlockTypeAndItem;
|
||||
import com.dfsek.terra.bukkit.world.block.data.BukkitBlockState;
|
||||
import com.dfsek.terra.bukkit.world.inventory.BukkitItemStack;
|
||||
import com.dfsek.terra.bukkit.world.inventory.meta.BukkitEnchantment;
|
||||
import com.dfsek.terra.vector.Vector3Impl;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TreeType;
|
||||
@@ -185,7 +184,7 @@ public final class BukkitAdapter {
|
||||
}
|
||||
|
||||
public static Vector3 adapt(Location location) {
|
||||
return new Vector3Impl(location.getX(), location.getY(), location.getZ());
|
||||
return new Vector3(location.getX(), location.getY(), location.getZ());
|
||||
}
|
||||
|
||||
public static Vector adapt(Vector3 vector3) {
|
||||
@@ -193,7 +192,7 @@ public final class BukkitAdapter {
|
||||
}
|
||||
|
||||
public static Vector3 adapt(Vector vector) {
|
||||
return new Vector3Impl(vector.getX(), vector.getY(), vector.getZ());
|
||||
return new Vector3(vector.getX(), vector.getY(), vector.getZ());
|
||||
}
|
||||
|
||||
public static CommandSender adapt(org.bukkit.command.CommandSender sender) {
|
||||
|
||||
Reference in New Issue
Block a user