#1181: Consolidate Location conversion code

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot
2023-04-19 19:59:19 +10:00
parent 2ffb1d2479
commit b99d3df2d8
43 changed files with 424 additions and 316 deletions

View File

@@ -13,6 +13,7 @@ import net.minecraft.world.level.World;
import org.bukkit.Location;
import org.bukkit.Raid;
import org.bukkit.Raid.RaidStatus;
import org.bukkit.craftbukkit.util.CraftLocation;
import org.bukkit.entity.Raider;
public final class CraftRaid implements Raid {
@@ -49,7 +50,7 @@ public final class CraftRaid implements Raid {
public Location getLocation() {
BlockPosition pos = handle.getCenter();
World world = handle.getLevel();
return new Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ());
return CraftLocation.toBukkit(pos, world.getWorld());
}
@Override