#890: Include yaw in player's spawn location

This commit is contained in:
Phoenix616 2021-07-15 20:29:38 +10:00 committed by md_5
parent aeb711dd3f
commit b7e3ce0233
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -775,7 +775,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Optional<Vec3D> spawnLoc = EntityHuman.getBed(world, bed, getHandle().getSpawnAngle(), getHandle().isSpawnForced(), true); Optional<Vec3D> spawnLoc = EntityHuman.getBed(world, bed, getHandle().getSpawnAngle(), getHandle().isSpawnForced(), true);
if (spawnLoc.isPresent()) { if (spawnLoc.isPresent()) {
Vec3D vec = spawnLoc.get(); Vec3D vec = spawnLoc.get();
return new Location(world.getWorld(), vec.x, vec.y, vec.z); return new Location(world.getWorld(), vec.x, vec.y, vec.z, getHandle().getSpawnAngle(), 0);
} }
} }
return null; return null;