mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-06 02:42:34 +01:00
05691646ca
* add second origami fork * Add Origmai2 * Move configs, exclude purpur again * Add missing config entry * Update README.md * Create LICENSE * fix lithium license * fix fix lithium license Co-authored-by: tr7zw <tr7zw@live.de>
850 lines
49 KiB
Diff
850 lines
49 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Bud Gidiere <sgidiere@gmail.com>
|
|
Date: Fri, 31 Jul 2020 22:39:43 -0500
|
|
Subject: [PATCH] Yatopia Server Fixes
|
|
|
|
|
|
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
index 841a8d2b392acdcef90592b841cbbcb2237c6901..c9cd3f6e6bb779ecaf0412c21e0dc654321eb44f 100644
|
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
|
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
|
@@ -232,6 +232,8 @@ public class TimingsExport extends Thread {
|
|
pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report
|
|
pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report
|
|
, pair("akarin", mapAsJSON(Bukkit.spigot().getAkarinConfig(), null)) // Akarin - Server config
|
|
+ , pair("papercut", mapAsJSON(Bukkit.spigot().getPapercutConfig(), null)) // Papercut
|
|
+ , pair("origami", mapAsJSON(Bukkit.spigot().getOrigamiConfig(), null)) // Origami
|
|
));
|
|
|
|
new TimingsExport(listeners, parent, history).start();
|
|
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java.rej b/src/main/java/co/aikar/timings/TimingsExport.java.rej
|
|
deleted file mode 100644
|
|
index aad8019b2c23b72bfad58a507671cd750bdc1a20..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/co/aikar/timings/TimingsExport.java.rej
|
|
+++ /dev/null
|
|
@@ -1,9 +0,0 @@
|
|
-diff a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java (rejected hunks)
|
|
-@@ -231,6 +231,7 @@ public class TimingsExport extends Thread {
|
|
- pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
|
|
- pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report
|
|
- pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report
|
|
-+ , pair("papercut", mapAsJSON(Bukkit.spigot().getPapercutConfig(), null)) // Papercut
|
|
- ));
|
|
-
|
|
- new TimingsExport(listeners, parent, history).start();
|
|
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
index dee9655b89d061ec8218ea2c54660c6003e8548f..253b73cfc597d4c7106d969be7b18c68166128ae 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
|
@@ -295,7 +295,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
|
|
this.shortScheduledIndex = getNextIndex(this.shortScheduledIndex, SHORT_SCHEDULE_TICK_THRESHOLD);
|
|
|
|
this.timingCleanup.stopTiming();
|
|
- this.world.getMethodProfiler().exitEnter("ticking");
|
|
+ //this.world.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
|
|
this.timingTicking.startTiming();
|
|
|
|
for (final NextTickListEntry<T> toTick : this.toTickThisTick) {
|
|
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej
|
|
deleted file mode 100644
|
|
index c9fa39c5b4b013b56720e339463ffcb5fd3c13f9..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java.rej
|
|
+++ /dev/null
|
|
@@ -1,10 +0,0 @@
|
|
-diff a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java (rejected hunks)
|
|
-@@ -283,7 +283,7 @@ public final class PaperTickList<T> extends TickListServer<T> { // extend to avo
|
|
- this.nextTick = this.world.getTime() + 1;
|
|
-
|
|
- this.timingCleanup.stopTiming();
|
|
-- this.world.getMethodProfiler().exitEnter("ticking");
|
|
-+ //this.world.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller
|
|
- this.timingTicking.startTiming();
|
|
-
|
|
- for (final NextTickListEntry<T> toTick : this.toTickThisTick) {
|
|
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
|
index fe7330fabe386966c2d203a190a00a785ea21be0..3b3c7053c73ac31eb00585c4e1fc19933467205a 100644
|
|
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
|
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
|
@@ -112,6 +112,19 @@ public final class OrigamiConfig {
|
|
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
|
|
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
|
|
}
|
|
+
|
|
+ public boolean tickEmptyHoppers = false;
|
|
+ public int fullHopperCooldown = 128;
|
|
+ private void hopperOptimizations() {
|
|
+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
|
|
+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
|
|
+ }
|
|
+
|
|
+ public boolean fastFeatureSearchDontLoad = false;
|
|
+ private void fastFeatureSearchDontLoad() {
|
|
+ fastFeatureSearchDontLoad = getBoolean("fast-feature-search-dont-load", fastFeatureSearchDontLoad);
|
|
+ }
|
|
+
|
|
}
|
|
|
|
}
|
|
\ No newline at end of file
|
|
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java.rej b/src/main/java/de/minebench/origami/OrigamiConfig.java.rej
|
|
deleted file mode 100644
|
|
index 8428d4bd05075e86b281312fa38106882c54735b..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java.rej
|
|
+++ /dev/null
|
|
@@ -1,14 +0,0 @@
|
|
-diff a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java (rejected hunks)
|
|
-@@ -169,6 +169,12 @@ public final class OrigamiConfig {
|
|
- Bukkit.getLogger().info("Farm detection radius: " + pigmenFarmsRadius + ", count: " + pigmenFarmsCount);
|
|
- }
|
|
- }
|
|
-+ public boolean tickEmptyHoppers = false;
|
|
-+ public int fullHopperCooldown = 128;
|
|
-+ private void hopperOptimizations() {
|
|
-+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
|
|
-+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
|
|
-+ }
|
|
- }
|
|
-
|
|
- public static boolean teleportingOfVehiclesWithPassenger = true;
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
index ee10abb6bc4d957676e7eef377cdc68dc3f43370..c12f4326f68020fbb140e97f0ef43ddcf5a71072 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
@@ -974,11 +974,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
player.playerNaturallySpawnedEvent = event;
|
|
}
|
|
// Paper end - optimize isOutisdeRange
|
|
- this.world.getMethodProfiler().enter("pollingChunks");
|
|
+ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller
|
|
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
|
|
|
|
- this.world.getMethodProfiler().enter("naturalSpawnCount");
|
|
+ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller
|
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
int l = this.chunkMapDistance.b();
|
|
// Paper start - per player mob spawning
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej b/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej
|
|
deleted file mode 100644
|
|
index d1152585c5f482e554966f965561626c78ac4d3a..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java.rej
|
|
+++ /dev/null
|
|
@@ -1,15 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java (rejected hunks)
|
|
-@@ -971,11 +971,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
|
- player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange
|
|
- }
|
|
- // Paper end - optimize isOutisdeRange
|
|
-- this.world.getMethodProfiler().enter("pollingChunks");
|
|
-+ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller
|
|
- int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
|
- boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
|
|
-
|
|
-- this.world.getMethodProfiler().enter("naturalSpawnCount");
|
|
-+ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller
|
|
- this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
|
- int l = this.chunkMapDistance.b();
|
|
- // Paper start - per player mob spawning
|
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
|
index 77b6e4dd34893f0959574f95078bc3fa6896e69c..ad1af2905e4f3e3d05a0dc63859a6e2f3bc43327 100644
|
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
|
@@ -181,6 +181,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
|
// Paper end
|
|
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
|
app.akarin.server.Config.init((java.io.File) options.valueOf("akarin-settings")); // Akarin - Server Config
|
|
+ us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut
|
|
+ com.mrivanplays.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - server config
|
|
|
|
this.setPVP(dedicatedserverproperties.pvp);
|
|
this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java.rej b/src/main/java/net/minecraft/server/DedicatedServer.java.rej
|
|
deleted file mode 100644
|
|
index 6b1dd973eb1e44e530d525981fbe4c698088b9b8..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java.rej
|
|
+++ /dev/null
|
|
@@ -1,9 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java (rejected hunks)
|
|
-@@ -171,6 +171,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
|
- com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
|
- // Paper end
|
|
- com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
|
-+ us.minevict.papercut.PapercutConfig.init((java.io.File) options.valueOf("papercut-settings")); // Papercut
|
|
-
|
|
- this.setPVP(dedicatedserverproperties.pvp);
|
|
- this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 70ae2923e21d7a0312e629a903ca9e380d6c6114..d906c5e530c2e7f779df079223aee619a73b5d51 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -164,6 +164,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
protected void mobTick() { mobTick(false); }
|
|
protected void mobTick(boolean inactive) {
|
|
//this.world.getMethodProfiler().enter("villagerBrain"); // Akarin - remove caller
|
|
+ // Purpur start
|
|
+ boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
|
|
+ if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
|
|
+ // Purpur end
|
|
if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
|
|
if (this.bM) {
|
|
this.bM = false;
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java.rej b/src/main/java/net/minecraft/server/EntityVillager.java.rej
|
|
deleted file mode 100644
|
|
index 68f0fc0230a4148ab9fc4181736ce93297c7e1b9..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java.rej
|
|
+++ /dev/null
|
|
@@ -1,12 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java (rejected hunks)
|
|
-@@ -166,6 +168,10 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
|
- protected void mobTick() { mobTick(false); }
|
|
- protected void mobTick(boolean inactive) {
|
|
- this.world.getMethodProfiler().enter("villagerBrain");
|
|
-+ // Purpur start
|
|
-+ boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
|
|
-+ if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
|
|
-+ // Purpur end
|
|
- if (!inactive) this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error // Paper
|
|
- if (this.bM) {
|
|
- this.bM = false;
|
|
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
index 9d6d882ad1479771b2a9e7c3a14c71dd00b63172..cc22d89d540a4f86e11d7d09ad2be7fcf070f43d 100644
|
|
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
@@ -334,10 +334,14 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
|
private final java.util.List<Runnable> post = new java.util.ArrayList<>();
|
|
private void b() {
|
|
if (queue.poll(pre, post)) {
|
|
- pre.forEach(Runnable::run);
|
|
+ for (Runnable runnable1 : pre) {
|
|
+ runnable1.run();
|
|
+ }
|
|
pre.clear();
|
|
super.a(Integer.MAX_VALUE, true, true);
|
|
- post.forEach(Runnable::run);
|
|
+ for (Runnable runnable : post) {
|
|
+ runnable.run();
|
|
+ }
|
|
post.clear();
|
|
} else {
|
|
// might have level updates to go still
|
|
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java.rej b/src/main/java/net/minecraft/server/LightEngineThreaded.java.rej
|
|
deleted file mode 100644
|
|
index 74d10212e547adf96762155adb03c0158df00a16..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java.rej
|
|
+++ /dev/null
|
|
@@ -1,18 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java (rejected hunks)
|
|
-@@ -288,10 +288,14 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
|
- int i = Math.min(queue.size(), 4);
|
|
- boolean ran = false;
|
|
- while (i-- > 0 && queue.poll(pre, post)) {
|
|
-- pre.forEach(Runnable::run);
|
|
-+ for (Runnable runnable1 : pre) {
|
|
-+ runnable1.run();
|
|
-+ }
|
|
- pre.clear();
|
|
- super.a(Integer.MAX_VALUE, true, true);
|
|
-- post.forEach(Runnable::run);
|
|
-+ for (Runnable runnable : post) {
|
|
-+ runnable.run();
|
|
-+ }
|
|
- post.clear();
|
|
- ran = true;
|
|
- }
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index de1845b3585d7cf96bf26f5859e1cb4820ad2d56..e17119d37577de42f8d52afcfdfee64c33996941 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1001,7 +1001,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
this.a(this::canSleepForTick);
|
|
//this.methodProfiler.exitEnter("nextTickWait"); // Akarin - remove caller
|
|
this.X = true;
|
|
- this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
+ // Purpur start - tps catchup
|
|
+ if (net.pl3x.purpur.PurpurConfig.tpsCatchup) {
|
|
+ this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
+ } else {
|
|
+ this.W = this.nextTick = curTime / 1000000L + 50L;
|
|
+ }
|
|
+ // Purpur end - tps catchup
|
|
this.sleepForTick();
|
|
//this.methodProfiler.exit(); // Akarin - remove caller
|
|
//this.methodProfiler.b(); // Akarin - remove caller
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java.rej b/src/main/java/net/minecraft/server/MinecraftServer.java.rej
|
|
deleted file mode 100644
|
|
index b005dd817e9ecffcf2172b4a807b0ecc632570b0..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java.rej
|
|
+++ /dev/null
|
|
@@ -1,16 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java (rejected hunks)
|
|
-@@ -1003,7 +1003,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
- this.a(this::canSleepForTick);
|
|
- this.methodProfiler.exitEnter("nextTickWait");
|
|
- this.X = true;
|
|
-- this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
-+ // Purpur start - tps catchup
|
|
-+ if (net.pl3x.purpur.PurpurConfig.tpsCatchup) {
|
|
-+ this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
|
-+ } else {
|
|
-+ this.W = this.nextTick = curTime / 1000000L + 50L;
|
|
-+ }
|
|
-+ // Purpur end - tps catchup
|
|
- this.sleepForTick();
|
|
- this.methodProfiler.exit();
|
|
- this.methodProfiler.b();
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
index a91b540a9e35efc8746f74f039a8ab6cfbd37206..546f4c942b047a39e0aec10cc2009b90573484dd 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
@@ -1169,7 +1169,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
}
|
|
|
|
this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData);
|
|
- chunkHolder.tasks.forEach(Runnable::run);
|
|
+ for (Runnable task : chunkHolder.tasks) {
|
|
+ task.run();
|
|
+ }
|
|
// Paper end
|
|
|
|
if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej b/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej
|
|
deleted file mode 100644
|
|
index 06b502a43f0e89b1b2cef8c3adb0a4229511846f..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej
|
|
+++ /dev/null
|
|
@@ -1,12 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java (rejected hunks)
|
|
-@@ -1122,7 +1131,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
- if (ioThrowable != null) {
|
|
- com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable);
|
|
- }
|
|
-- chunkHolder.tasks.forEach(Runnable::run);
|
|
-+ for (Runnable task : chunkHolder.tasks) {
|
|
-+ task.run();
|
|
-+ }
|
|
- // Paper end
|
|
-
|
|
- if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async
|
|
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
|
index 6eb81504146af614a806add6e5effe0c2b111c8a..512afdfcbaab630a291d1aa120a90e554855d34f 100644
|
|
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
|
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
|
@@ -139,6 +139,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
|
|
int j2 = i1 + k * l1;
|
|
ChunkCoordIntPair chunkcoordintpair = this.a(structuresettingsfeature, j, seededrandom, i2, j2);
|
|
if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
|
|
+ // Origami start - seed based feature search doesn't load
|
|
+ if (iworldreader instanceof World && ((World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
|
|
+ return chunkcoordintpair.l();
|
|
+ }
|
|
+ // Origami end
|
|
IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS);
|
|
StructureStart<?> structurestart = structuremanager.a(SectionPosition.a(ichunkaccess.getPos(), 0), this, ichunkaccess);
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java.rej b/src/main/java/net/minecraft/server/StructureGenerator.java.rej
|
|
deleted file mode 100644
|
|
index 8b5d001fb8ecb4a5b96bda6532cf8d5900816290..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/StructureGenerator.java.rej
|
|
+++ /dev/null
|
|
@@ -1,13 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java (rejected hunks)
|
|
-@@ -139,6 +139,11 @@ public abstract class StructureGenerator<C extends WorldGenFeatureConfiguration>
|
|
- int j2 = i1 + k * l1;
|
|
- ChunkCoordIntPair chunkcoordintpair = this.a(structuresettingsfeature, j, seededrandom, i2, j2);
|
|
- if (!iworldreader.getWorldBorder().isChunkInBounds(chunkcoordintpair.x, chunkcoordintpair.z)) { continue; } // Paper
|
|
-+ // Origami start - seed based feature search doesn't load
|
|
-+ if (iworldreader instanceof World && ((World) iworldreader).origamiConfig.fastFeatureSearchDontLoad) {
|
|
-+ return chunkcoordintpair.l();
|
|
-+ }
|
|
-+ // Origami end
|
|
- // Origami start - option to only find generated features to not generate new chunks
|
|
- IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures);
|
|
- if (ichunkaccess == null) {
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
index 7e06324777617d38be18e80b8498a74b1b0eb97f..d87d3f274ba1525c13875a92eec9d4c1bd265fa5 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
@@ -514,6 +514,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
|
entityitem = (EntityItem) iterator.next();
|
|
} while (!a((IInventory) ihopper, entityitem));
|
|
|
|
+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers
|
|
return true;
|
|
}
|
|
return false; // EMC
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java.rej b/src/main/java/net/minecraft/server/TileEntityHopper.java.rej
|
|
deleted file mode 100644
|
|
index cc8866ec1ccbc131e8491c50eda4f85590bb667b..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java.rej
|
|
+++ /dev/null
|
|
@@ -1,9 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java (rejected hunks)
|
|
-@@ -466,6 +497,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
|
- entityitem = (EntityItem) iterator.next();
|
|
- } while (!a((IInventory) ihopper, entityitem));
|
|
-
|
|
-+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers
|
|
- return true;
|
|
- }
|
|
- }
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
|
|
index 7fe085e48b6ad625a510edf33b112bef24f7d7ad..9459efde54d507231b4aacb7cba14e9905ebb4d7 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
|
|
@@ -11,7 +11,18 @@ import org.bukkit.entity.HumanEntity;
|
|
|
|
public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable {
|
|
|
|
- private static final int[] a = IntStream.range(0, 27).toArray();
|
|
+ private static final int[] a;
|
|
+
|
|
+ static {
|
|
+ int[] arr = new int[10];
|
|
+ int count = 0;
|
|
+ for (int i1 = 0; i1 < 27; i1++) {
|
|
+ if (arr.length == count) arr = Arrays.copyOf(arr, count * 2);
|
|
+ arr[count++] = i1;
|
|
+ }
|
|
+ arr = Arrays.copyOfRange(arr, 0, count);
|
|
+ a = arr;
|
|
+ }
|
|
private NonNullList<ItemStack> contents;
|
|
public int c; // PAIL private -> public, rename viewerCount
|
|
private TileEntityShulkerBox.AnimationPhase i;
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej
|
|
deleted file mode 100644
|
|
index bada470cba41cce9beb9eb04227b42c1d489d731..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java.rej
|
|
+++ /dev/null
|
|
@@ -1,22 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java (rejected hunks)
|
|
-@@ -10,7 +11,19 @@ import org.bukkit.entity.HumanEntity;
|
|
-
|
|
- public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory, ITickable {
|
|
-
|
|
-- private static final int[] a = IntStream.range(0, 27).toArray();
|
|
-+ private static final int[] a;
|
|
-+
|
|
-+ static {
|
|
-+ int[] arr = new int[10];
|
|
-+ int count = 0;
|
|
-+ for (int i1 = 0; i1 < 27; i1++) {
|
|
-+ if (arr.length == count) arr = Arrays.copyOf(arr, count * 2);
|
|
-+ arr[count++] = i1;
|
|
-+ }
|
|
-+ arr = Arrays.copyOfRange(arr, 0, count);
|
|
-+ a = arr;
|
|
-+ }
|
|
-+
|
|
- private NonNullList<ItemStack> contents;
|
|
- private int c;
|
|
- private TileEntityShulkerBox.AnimationPhase i;
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index ce7a742f2a3b5c169b956c1a91819882b9b57955..542b7cb89ac6b216d02bac6563df60d53cc7e9f1 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -96,6 +96,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
|
|
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
|
|
public final app.akarin.server.Config.WorldConfig akarinConfig; // Akarin - Server Config
|
|
+ public final us.minevict.papercut.PapercutConfig.WorldConfig papercutConfig; // Papercut
|
|
+ public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
|
+ public final de.minebench.origami.OrigamiConfig.WorldConfig origamiConfig; // Origami - World Config
|
|
|
|
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
|
public static BlockPosition lastPhysicsProblem; // Spigot
|
|
@@ -126,6 +129,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
|
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
|
|
this.akarinConfig = new app.akarin.server.Config.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Akarin - Server Config
|
|
+ this.papercutConfig = new us.minevict.papercut.PapercutConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Papercut
|
|
+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur
|
|
+ this.origamiConfig = new de.minebench.origami.OrigamiConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Origami - World Config
|
|
+
|
|
this.generator = gen;
|
|
this.world = new CraftWorld((WorldServer) this, gen, env);
|
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
|
@@ -646,6 +653,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
this.a(blockposition.south(), block, blockposition);
|
|
}
|
|
|
|
+ public void neighborChanged(BlockPosition pos, Block block, BlockPosition parent) { a(pos, block, parent); } // Origami - OBFHELPER
|
|
public void a(BlockPosition blockposition, Block block, EnumDirection enumdirection) {
|
|
if (enumdirection != EnumDirection.WEST) {
|
|
this.a(blockposition.west(), block, blockposition);
|
|
diff --git a/src/main/java/net/minecraft/server/World.java.rej b/src/main/java/net/minecraft/server/World.java.rej
|
|
deleted file mode 100644
|
|
index 6f7cf093021998e6ae0178fa851e82437d4f7f86..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/World.java.rej
|
|
+++ /dev/null
|
|
@@ -1,17 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java (rejected hunks)
|
|
-@@ -95,6 +95,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
- public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
|
-
|
|
- public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
|
|
-+ public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
|
-
|
|
- public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
|
- public static BlockPosition lastPhysicsProblem; // Spigot
|
|
-@@ -124,6 +125,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
|
- this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper
|
|
- this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
|
- this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
|
|
-+ this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((WorldDataServer)worlddatamutable).getName())); // Purpur
|
|
- this.generator = gen;
|
|
- this.world = new CraftWorld((WorldServer) this, gen, env);
|
|
- this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index 64f7fc40a6847ebc6c84b3c179614e186f861e1f..3782d329dc62a9e834f16a9009f4102b5b4aad6f 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -943,7 +943,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
}
|
|
// CraftBukkit end */
|
|
|
|
- gameprofilerfiller.enter("checkDespawn");
|
|
+ //gameprofilerfiller.enter("checkDespawn"); // Akarin - remove caller
|
|
if (!entity.dead) {
|
|
entity.checkDespawn();
|
|
// Tuinity start - optimise notify()
|
|
@@ -955,7 +955,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
// Tuinity end - optimise notify()
|
|
}
|
|
|
|
- gameprofilerfiller.exit();
|
|
+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
if (entity1 != null) {
|
|
if (!entity1.dead && entity1.w(entity)) {
|
|
continue;
|
|
@@ -964,13 +964,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
entity.stopRiding();
|
|
}
|
|
|
|
- gameprofilerfiller.enter("tick");
|
|
+ //gameprofilerfiller.enter("tick"); // Akarin - remove caller
|
|
if (!entity.dead && !(entity instanceof EntityComplexPart)) {
|
|
this.a(this::entityJoinedWorld, entity);
|
|
}
|
|
|
|
- gameprofilerfiller.exit();
|
|
- gameprofilerfiller.enter("remove");
|
|
+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
+ //gameprofilerfiller.enter("remove"); // Akarin - remove caller
|
|
if (entity.dead) {
|
|
this.removeEntityFromChunk(entity);
|
|
this.entitiesById.remove(entity.getId()); // Tuinity
|
|
@@ -982,7 +982,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
}
|
|
// Tuinity end - optimise notify()
|
|
|
|
- gameprofilerfiller.exit();
|
|
+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
}
|
|
timings.entityTick.stopTiming(); // Spigot
|
|
|
|
@@ -1414,7 +1414,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
// Tuinity end
|
|
}
|
|
|
|
- this.getMethodProfiler().exit();
|
|
+ // this.getMethodProfiler().exit(); // Akarin - remove caller
|
|
}
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java.rej b/src/main/java/net/minecraft/server/WorldServer.java.rej
|
|
deleted file mode 100644
|
|
index 87367c60dd036f8623d6593e73dd2412a477f6a4..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java.rej
|
|
+++ /dev/null
|
|
@@ -1,50 +0,0 @@
|
|
-diff a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java (rejected hunks)
|
|
-@@ -943,12 +943,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
- }
|
|
- // CraftBukkit end */
|
|
-
|
|
-- gameprofilerfiller.enter("checkDespawn");
|
|
-+ //gameprofilerfiller.enter("checkDespawn"); // Akarin - remove caller
|
|
- if (!entity.dead) {
|
|
- entity.checkDespawn();
|
|
- }
|
|
-
|
|
-- gameprofilerfiller.exit();
|
|
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
- if (entity1 != null) {
|
|
- if (!entity1.dead && entity1.w(entity)) {
|
|
- continue;
|
|
-@@ -957,20 +957,20 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
- entity.stopRiding();
|
|
- }
|
|
-
|
|
-- gameprofilerfiller.enter("tick");
|
|
-+ //gameprofilerfiller.enter("tick"); // Akarin - remove caller
|
|
- if (!entity.dead && !(entity instanceof EntityComplexPart)) {
|
|
- this.a(this::entityJoinedWorld, entity);
|
|
- }
|
|
-
|
|
-- gameprofilerfiller.exit();
|
|
-- gameprofilerfiller.enter("remove");
|
|
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
-+ //gameprofilerfiller.enter("remove"); // Akarin - remove caller
|
|
- if (entity.dead) {
|
|
- this.removeEntityFromChunk(entity);
|
|
- this.entitiesById.remove(entity.getId()); // Tuinity
|
|
- this.unregisterEntity(entity);
|
|
- }
|
|
-
|
|
-- gameprofilerfiller.exit();
|
|
-+ //gameprofilerfiller.exit(); // Akarin - remove caller
|
|
- }
|
|
- timings.entityTick.stopTiming(); // Spigot
|
|
-
|
|
-@@ -1377,7 +1377,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
- }
|
|
- }
|
|
-
|
|
-- this.getMethodProfiler().exit();
|
|
-+ //this.getMethodProfiler().exit(); // Akarin - remove caller
|
|
- }
|
|
- }
|
|
-
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 1d00832bffc2b6bcc6153b9065a92035ba974138..b3d6e713c2bfa1a0432b4afc3e8c31d4d7ca5844 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -127,4 +127,23 @@ public class PurpurConfig {
|
|
config.addDefault(path, def);
|
|
return config.getString(path, config.getString(path));
|
|
}
|
|
+
|
|
+ public static double laggingThreshold = 19.0D;
|
|
+ private static void tickLoopSettings() {
|
|
+ laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
|
+ }
|
|
+
|
|
+ public static boolean useAlternateKeepAlive = false;
|
|
+ private static void useAlternateKeepAlive() {
|
|
+ useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
|
+ }
|
|
+ public static boolean dontSendUselessEntityPackets = false;
|
|
+ private static void dontSendUselessEntityPackets() {
|
|
+ dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets);
|
|
+ }
|
|
+
|
|
+ public static boolean tpsCatchup = true;
|
|
+ private static void tpsCatchup() {
|
|
+ tpsCatchup = getBoolean("settings.tps-catchup", tpsCatchup);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej
|
|
deleted file mode 100644
|
|
index ff05ff6aef1e0f61eb4437253020632745ee2bd2..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java.rej
|
|
+++ /dev/null
|
|
@@ -1,11 +0,0 @@
|
|
-diff a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java (rejected hunks)
|
|
-@@ -194,4 +194,9 @@ public class PurpurConfig {
|
|
- loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError);
|
|
- loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings);
|
|
- }
|
|
-+
|
|
-+ public static boolean tpsCatchup = true;
|
|
-+ private static void tpsCatchup() {
|
|
-+ tpsCatchup = getBoolean("settings.tps-catchup", tpsCatchup);
|
|
-+ }
|
|
- }
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 361f7857e461578e90cb71e15027dadaf794cb69..7cde55ae407012b3445f11b07a0ebc9d00e031e3 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -56,4 +56,16 @@ public class PurpurWorldConfig {
|
|
PurpurConfig.config.addDefault("world-settings.default." + path, def);
|
|
return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path));
|
|
}
|
|
+
|
|
+ public int villagerBrainTicks = 1;
|
|
+ public boolean villagerUseBrainTicksOnlyWhenLagging = true;
|
|
+ private void villagerSettings() {
|
|
+ villagerBrainTicks = getInt("mobs.villager.brain-ticks", villagerBrainTicks);
|
|
+ villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
|
|
+ }
|
|
+
|
|
+ public boolean saveProjectilesToDisk = true;
|
|
+ private void miscGameplayMechanicsSettings() {
|
|
+ saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
|
deleted file mode 100644
|
|
index 120d0df27e76c9beef9f09e6cdc0972454fdd4ca..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej
|
|
+++ /dev/null
|
|
@@ -1,15 +0,0 @@
|
|
-diff a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java (rejected hunks)
|
|
-@@ -113,11 +113,13 @@ public class PurpurWorldConfig {
|
|
- public boolean disableDropsOnCrammingDeath = false;
|
|
- public boolean entitiesPickUpLootBypassMobGriefing = false;
|
|
- public boolean milkCuresBadOmen = true;
|
|
-+ public boolean saveProjectilesToDisk = true;
|
|
- public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
- private void miscGameplayMechanicsSettings() {
|
|
- disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
- entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing);
|
|
- milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
-+ saveProjectilesToDisk = getBoolean("gameplay-mechanics.save-projectiles-to-disk", saveProjectilesToDisk);
|
|
- tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
- }
|
|
-
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index afaa6ab4744190b134aeb616a1355cefd1333e37..b06f72228df2bd047e378ba750936a1138e72ade 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -836,6 +836,10 @@ public final class CraftServer implements Server {
|
|
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
|
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
|
app.akarin.server.Config.init((File) console.options.valueOf("akarin-settings")); // Akarin - Server Config
|
|
+ us.minevict.papercut.PapercutConfig.init((File) console.options.valueOf("papercut-settings")); // Papercut
|
|
+ net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
|
+ com.mrivanplays.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami
|
|
+ de.minebench.origami.OrigamiConfig.init((File) console.options.valueOf("origami-settings")); // Origami - Server Config
|
|
for (WorldServer world : console.getWorlds()) {
|
|
world.worldDataServer.setDifficulty(config.difficulty);
|
|
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
|
@@ -872,6 +876,9 @@ public final class CraftServer implements Server {
|
|
world.paperConfig.init(); // Paper
|
|
world.tuinityConfig.init(); // Tuinity - Server Config
|
|
world.akarinConfig.init(); // Akarin - Server Config
|
|
+ world.papercutConfig.init(); // Papercut
|
|
+ world.purpurConfig.init(); // Purpur
|
|
+ world.origamiConfig.init(); // Origami - World Config
|
|
}
|
|
|
|
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
|
@@ -2249,6 +2256,25 @@ public final class CraftServer implements Server {
|
|
}
|
|
// Akarin End - Server Config
|
|
|
|
+ // Papercut start - add config to timings report
|
|
+ @Override
|
|
+ public YamlConfiguration getPapercutConfig() { return us.minevict.papercut.PapercutConfig.config; }
|
|
+ // Papercut end - add config to timings report
|
|
+
|
|
+ // Purpur start
|
|
+ @Override
|
|
+ public YamlConfiguration getPurpurConfig() {
|
|
+ return net.pl3x.purpur.PurpurConfig.config;
|
|
+ }
|
|
+ /*@Override
|
|
+ public java.util.Properties getServerProperties() {
|
|
+ return getProperties().properties;
|
|
+ }*/
|
|
+ // Purpur end
|
|
+
|
|
+ @Override
|
|
+ public YamlConfiguration getOrigamiConfig() { return com.mrivanplays.origami.OrigamiConfig.config; } // Origami - add config to timings report
|
|
+
|
|
@Override
|
|
public void restart() {
|
|
org.spigotmc.RestartCommand.restart();
|
|
@@ -2388,4 +2414,11 @@ public final class CraftServer implements Server {
|
|
return mobGoals;
|
|
}
|
|
// Paper end
|
|
+
|
|
+ // Purpur start
|
|
+ @Override
|
|
+ public boolean isLagging() {
|
|
+ return getServer().lagging;
|
|
+ }
|
|
+ // Purpur end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej b/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej
|
|
deleted file mode 100644
|
|
index b9d3fb83434a48b328cf0a0ae1ec29d93e87aa3e..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java.rej
|
|
+++ /dev/null
|
|
@@ -1,12 +0,0 @@
|
|
-diff a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (rejected hunks)
|
|
-@@ -2409,5 +2409,10 @@ public final class CraftServer implements Server {
|
|
- public String getServerName() {
|
|
- return getProperties().serverName;
|
|
- }
|
|
-+
|
|
-+ @Override
|
|
-+ public boolean isLagging() {
|
|
-+ return getServer().lagging;
|
|
-+ }
|
|
- // Purpur end
|
|
- }
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
index 5d9197e6b27c5fcb5ef5244a82b45052a5dd5b40..2c3f96e9d5e7c2cfd4a3d1aeba27f25c6e8b891b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
@@ -138,6 +138,7 @@ public class Main {
|
|
.defaultsTo(new File("paper.yml"))
|
|
.describedAs("Yml file");
|
|
// Paper end
|
|
+
|
|
// Tuinity Start - Server Config
|
|
acceptsAll(asList("tuinity", "tuinity-settings"), "File for tuinity settings")
|
|
.withRequiredArg()
|
|
@@ -154,6 +155,22 @@ public class Main {
|
|
.describedAs("Yml file");
|
|
// Akarin End - Server Config
|
|
|
|
+ // Papercut start
|
|
+ acceptsAll(asList("papercut", "papercut-settings"), "File for papercut settings")
|
|
+ .withRequiredArg()
|
|
+ .ofType(File.class)
|
|
+ .defaultsTo(new File("papercut.yml"))
|
|
+ .describedAs("Yml file");
|
|
+ // Papercut end
|
|
+
|
|
+ // Purpur Start
|
|
+ acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings")
|
|
+ .withRequiredArg()
|
|
+ .ofType(File.class)
|
|
+ .defaultsTo(new File("purpur.yml"))
|
|
+ .describedAs("Yml file");
|
|
+ // Purpur end
|
|
+
|
|
// Paper start
|
|
acceptsAll(asList("server-name"), "Name of the server")
|
|
.withRequiredArg()
|
|
@@ -168,6 +185,13 @@ public class Main {
|
|
.defaultsTo(new File("origami.yml"))
|
|
.describedAs("Yml file");
|
|
// Origami end
|
|
+ // Origami Start - Server Config
|
|
+ acceptsAll(asList("origami", "origami-settings"), "File for origami settings")
|
|
+ .withRequiredArg()
|
|
+ .ofType(File.class)
|
|
+ .defaultsTo(new File("origami.yml"))
|
|
+ .describedAs("Yml file");
|
|
+ // Origami end - Server Config
|
|
}
|
|
};
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java.rej b/src/main/java/org/bukkit/craftbukkit/Main.java.rej
|
|
deleted file mode 100644
|
|
index 5d35899d1bedbb8643a601a2e1731a9bc66c7b61..0000000000000000000000000000000000000000
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java.rej
|
|
+++ /dev/null
|
|
@@ -1,16 +0,0 @@
|
|
-diff a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java (rejected hunks)
|
|
-@@ -146,6 +146,14 @@ public class Main {
|
|
- .describedAs("Yml file");
|
|
- /* Conctete End - Server Config */
|
|
-
|
|
-+ // Purpur Start
|
|
-+ acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings")
|
|
-+ .withRequiredArg()
|
|
-+ .ofType(File.class)
|
|
-+ .defaultsTo(new File("purpur.yml"))
|
|
-+ .describedAs("Yml file");
|
|
-+ // Purpur end
|
|
-+
|
|
- // Paper start
|
|
- acceptsAll(asList("server-name"), "Name of the server")
|
|
- .withRequiredArg()
|