SPIGOT-7019: Add yaw in World#getSpawnLocation

This commit is contained in:
Doc 2022-05-13 11:24:17 +10:00 committed by md_5
parent 2ac7fa7af6
commit f3c7a6ac7a
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -172,7 +172,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public Location getSpawnLocation() {
BlockPosition spawn = world.getSharedSpawnPos();
return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
float yaw = world.getSharedSpawnAngle();
return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ(), yaw, 0);
}
@Override