mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-21 05:55:08 +01:00
28 lines
1.8 KiB
Diff
28 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrPowerGamerBR <git@mrpowergamerbr.com>
|
|
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 3ea668e3b33353d8a6353ebc4f18e7103b573353..ab4f1bd1ebf0af54f3fa88ee9e2007d20445e7e9 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -817,7 +817,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());
|
|
@@ -833,6 +833,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()) {
|