Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
41647af74c
We cannot put blocking network I/O onto the worldgen threads, this will crash the server if it stalls
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sat, 9 Jan 2021 14:17:07 +0100
|
|
Subject: [PATCH] Remove stale POIs
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index 2ac0db36942ecb6dd073bc08f42fb3d1a6c12f6d..853929fb1ae428baf9f7cd3f49fdadd52e0c3401 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -1915,6 +1915,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
});
|
|
optional1.ifPresent((holder) -> {
|
|
this.getServer().execute(() -> {
|
|
+ // Paper start
|
|
+ if (optional.isEmpty() && this.getPoiManager().exists(blockposition1, poiType -> true)) {
|
|
+ this.getPoiManager().remove(blockposition1);
|
|
+ }
|
|
+ // Paper end
|
|
this.getPoiManager().add(blockposition1, holder);
|
|
DebugPackets.sendPoiAddedPacket(this, blockposition1);
|
|
});
|