aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMrPowerGamerBR <[email protected]>2024-12-01 12:44:03 -0300
committerGitHub <[email protected]>2024-12-01 16:44:03 +0100
commit1e035f374b43286670f23d10f71cebb81c58bc09 (patch)
treea8db64985c08b59be46743ea0496c6c07b477d21
parent27e4ddcd067d4825eb01cb05d6975c46252eeafa (diff)
downloadPaper-1e035f374b43286670f23d10f71cebb81c58bc09.tar.gz
Paper-1e035f374b43286670f23d10f71cebb81c58bc09.zip
Only attempt to find spawn position if there isn't a fixed spawn position set (#11682)
-rw-r--r--patches/server/1073-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/server/1073-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch b/patches/server/1073-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch
new file mode 100644
index 0000000000..ef9c2a3088
--- /dev/null
+++ b/patches/server/1073-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 c26e3a239441376f2694782d4f07943538677c71..4acdef7a20b0625fc348e5592edd64868b73dd82 100644
+--- a/src/main/java/net/minecraft/server/MinecraftServer.java
++++ b/src/main/java/net/minecraft/server/MinecraftServer.java
+@@ -816,7 +816,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());
+@@ -832,6 +832,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()) {