aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-12-05 11:18:29 +0100
committerNassim Jahnke <[email protected]>2024-12-05 12:20:56 +0100
commite4e24f3335609b38f460ced71d18babcf11bf9cb (patch)
tree51880d664b3444ce26d6f8cdeb3b8219e5616fca /patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch
parentc54c062e6ff742445bf7749c84106ca67090172d (diff)
downloadPaper-e4e24f3335609b38f460ced71d18babcf11bf9cb.tar.gz
Paper-e4e24f3335609b38f460ced71d18babcf11bf9cb.zip
Move around patches again
Diffstat (limited to 'patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch')
-rw-r--r--patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch b/patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch
new file mode 100644
index 0000000000..fbec856a9d
--- /dev/null
+++ b/patches/server/1027-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: MrPowerGamerBR <[email protected]>
+Date: Thu, 28 Nov 2024 15:20:25 -0300
+Subject: [PATCH] Only attempt to find spawn position if there isn't a fixed
+ spawn position set
+
+
+diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
+index c3d02e4712a1543fc59d88e5d20adcb6c806be0f..430ef84d5984819bbea0c406122d5c6cc04284d2 100644
+--- a/src/main/java/net/minecraft/server/MinecraftServer.java
++++ b/src/main/java/net/minecraft/server/MinecraftServer.java
+@@ -740,7 +740,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ worldProperties.setSpawn(BlockPos.ZERO.above(80), 0.0F);
+ } else {
+ ServerChunkCache chunkproviderserver = world.getChunkSource();
+- ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
++ // ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition()); // Paper - Move down, only attempt to find spawn position if there isn't a fixed spawn position set
+ // CraftBukkit start
+ if (world.generator != null) {
+ Random rand = new Random(world.getSeed());
+@@ -756,6 +756,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
+ // CraftBukkit end
++ ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition()); // Paper - Only attempt to find spawn position if there isn't a fixed spawn position set
+ int i = chunkproviderserver.getGenerator().getSpawnHeight(world);
+
+ if (i < world.getMinY()) {