mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Added a way to get the spawn position of a world
This commit is contained in:
committed by
IronApollo
parent
c935e381b7
commit
9c3964d330
@ -54,8 +54,8 @@ final class ForgeAdapter {
|
||||
return Vector3.at(vector.x, vector.y, vector.z);
|
||||
}
|
||||
|
||||
public static Vector3 adapt(BlockPos pos) {
|
||||
return Vector3.at(pos.getX(), pos.getY(), pos.getZ());
|
||||
public static BlockVector3 adapt(BlockPos pos) {
|
||||
return BlockVector3.at(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public static Vec3d toVec3(BlockVector3 vector) {
|
||||
|
@ -469,6 +469,11 @@ public class ForgeWorld extends AbstractWorld {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockVector3 getSpawnPosition() {
|
||||
return ForgeAdapter.adapt(getWorld().getSpawnPoint());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(BlockVector3 position) {
|
||||
World world = getWorld();
|
||||
|
Reference in New Issue
Block a user