2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
|
|
Date: Tue, 17 Nov 2020 19:13:09 +0200
|
|
|
|
Subject: [PATCH] Expose world spawn angle
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
2022-03-01 04:25:13 +01:00
|
|
|
index 0b4d5ab836e861ea87bb72185a513bdf341d5921..30f0b20924d6b778e49761a72b50263c96311bee 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
2022-01-14 04:56:45 +01:00
|
|
|
@@ -878,7 +878,7 @@ public abstract class PlayerList {
|
2021-06-11 14:02:28 +02:00
|
|
|
if (location == null) {
|
|
|
|
worldserver1 = this.server.getLevel(Level.OVERWORLD);
|
|
|
|
blockposition = entityplayer1.getSpawnPoint(worldserver1);
|
|
|
|
- location = new Location(worldserver1.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F));
|
|
|
|
+ location = new Location(worldserver1.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F), worldserver1.levelData.getSpawnAngle(), 0.0F); // Paper - use world spawn angle
|
|
|
|
}
|
|
|
|
|
2021-06-20 21:25:59 +02:00
|
|
|
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
2021-06-11 14:02:28 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-03-30 22:28:38 +02:00
|
|
|
index d27a921672a12ad5506c5af080e52cfb2500f7e7..d26fd3ff134fcda2cae0e564443039d47cd50856 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-03-01 06:43:03 +01:00
|
|
|
@@ -247,7 +247,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
2021-06-11 14:02:28 +02:00
|
|
|
@Override
|
|
|
|
public Location getSpawnLocation() {
|
2021-06-14 18:58:00 +02:00
|
|
|
BlockPos spawn = this.world.getSharedSpawnPos();
|
2021-06-11 14:02:28 +02:00
|
|
|
- return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
|
|
|
|
+ return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ(), world.levelData.getSpawnAngle(), 0.0F); // Paper - expose world spawn angle
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|