geforkt von Mirrors/Paper
f835a91d15
Upstream has added the equivalent of our SentientNPC API, with exception to the EnderDragon. We've added Mob to the EnderDragon, and our SentientNPC API should behave the same. Vex#getOwner has been deprecated and a replacement Vex#getSummoner has been added using Mob. However, since 1.13 is not production ready, SentientNPC API is subject for removal in 1.13.1 since 1.13 API is not compatible with 1.12. Please move to the Mob interface ASAP. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c5ab54d8 Expand GameRule API ab9a606c Improve entity hierarchy by adding Mob interface. CraftBukkit Changes:29e75648
Expand GameRule API50e6858b
Improve entity hierarchy by adding Mob interface.0e1d79b4
Correct error in previous patch
39 Zeilen
1.8 KiB
Diff
39 Zeilen
1.8 KiB
Diff
From 88eeebc428981910419ea1d2409c2b86f31aef4f Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 21 Apr 2018 11:21:48 -0400
|
|
Subject: [PATCH] Configurable Allowance of Permanent Chunk Loaders
|
|
|
|
This disables the behavior that allows players to keep chunks permanently loaded
|
|
by default and allows server operators to enable it if they wish.
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 37315233e1..044da2754d 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -473,4 +473,9 @@ public class PaperWorldConfig {
|
|
break;
|
|
}
|
|
}
|
|
+ public boolean allowPermaChunkLoaders = false;
|
|
+ private void allowPermaChunkLoaders() {
|
|
+ allowPermaChunkLoaders = getBoolean("game-mechanics.allow-permanent-chunk-loaders", allowPermaChunkLoaders);
|
|
+ log("Allow Perma Chunk Loaders: " + (allowPermaChunkLoaders ? "enabled" : "disabled"));
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
index 4973721243..0e0c7b1abe 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
@@ -111,7 +111,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
Long2ObjectMap long2objectmap = this.chunks;
|
|
|
|
synchronized (this.chunks) {
|
|
- Chunk chunk = this.getLoadedChunkAt(i, j);
|
|
+ Chunk chunk = world.paperConfig.allowPermaChunkLoaders ? getLoadedChunkAt(i, j) : getChunkIfLoaded(i, j); // Paper - Configurable perma chunk loaders
|
|
|
|
return chunk != null ? chunk : this.loadChunkAt(i, j);
|
|
}
|
|
--
|
|
2.18.0
|
|
|