mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Refactor vector system to be cleaner
- Move Vector, etc. into `.math` package - Drop many methods that will be auto-promoted anyways, eg. with `divide(int)` and `divide(double)` the first is now gone. - Take Block vectors into their own class hierarchy - Make it clear throughout the API what takes blockvectors - many more improvements
This commit is contained in:
@ -20,11 +20,12 @@
|
||||
package com.sk89q.worldedit.sponge.adapter;
|
||||
|
||||
import com.flowpowered.math.vector.Vector3d;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseItemStack;
|
||||
import com.sk89q.worldedit.entity.BaseEntity;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.sponge.SpongeWorld;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
|
||||
import org.spongepowered.api.entity.Entity;
|
||||
import org.spongepowered.api.item.inventory.ItemStack;
|
||||
import org.spongepowered.api.world.World;
|
||||
@ -56,7 +57,7 @@ public interface SpongeImplAdapter {
|
||||
}
|
||||
|
||||
default Location adapt(org.spongepowered.api.world.Location<org.spongepowered.api.world.World> loc, Vector3d rot) {
|
||||
Vector position = new Vector(loc.getX(), loc.getY(), loc.getZ());
|
||||
Vector3 position = new Vector3(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
return new Location(getWorld(loc.getExtent()), position, (float) rot.getY(), (float) rot.getX());
|
||||
}
|
||||
|
Reference in New Issue
Block a user