mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-25 12:05:14 +01:00
fix tuinity upstream
This commit is contained in:
parent
8d157f9be6
commit
15bf90300d
@ -40,10 +40,10 @@ index a0f53c9eff04a40780b3ba568dbfc5bbe9bd8504..3bc5cd1e53dd7c94b948e7f57f0dc8e0
|
||||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 61712ae515b329a6b85dbe2e5960e4e864dc7731..5acae1e8e0324723e567674f6df3d0ac1d0ca68c 100644
|
||||
index 0db00322ebf600245bf9311e547c8c743a60a173..e3253796c70b990e000ed1073f4070fe07a3f845 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1579,7 +1579,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1569,7 +1569,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
@ -2034,7 +2034,7 @@ index 1d72af9cace7aa8f1d20c7c1c5be621f533e2dad..006e7076932f6be576a64da09c4d84ca
|
||||
public static <T> void mergeSortedSets(final java.util.function.Consumer<T> consumer, final java.util.Comparator<? super T> comparator, final java.util.SortedSet<T>...sets) {
|
||||
final ObjectRBTreeSet<T> all = new ObjectRBTreeSet<>(comparator);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5acae1e8e0324723e567674f6df3d0ac1d0ca68c..cc06164291f454e074c3955f63df758990b6075e 100644
|
||||
index e3253796c70b990e000ed1073f4070fe07a3f845..dda93749eef9cd63e47ffe269b839512fe4db695 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -267,6 +267,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@ -2045,7 +2045,7 @@ index 5acae1e8e0324723e567674f6df3d0ac1d0ca68c..cc06164291f454e074c3955f63df7589
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public boolean serverAutoSave = false; // Paper
|
||||
@@ -1098,6 +1099,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1088,6 +1089,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.lastOverloadTime = this.nextTick;
|
||||
}
|
||||
|
||||
@ -2053,7 +2053,7 @@ index 5acae1e8e0324723e567674f6df3d0ac1d0ca68c..cc06164291f454e074c3955f63df7589
|
||||
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
final long diff = curTime - tickSection;
|
||||
@@ -1484,6 +1486,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1474,6 +1476,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
midTickLoadChunks(); // Paper
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.doTick(booleansupplier);
|
||||
@ -2422,7 +2422,7 @@ index 300884804bf9ac3fba7c30a04d8adf52e3dd2e3e..f3d6811156e68040106f1d027a10ea33
|
||||
|
||||
// Paper start - async io
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 47fbb8df04b2b77e10314666e87eaef621cffb3b..6055bcc3b593cbcb5863e337ba650f125b89be29 100644
|
||||
index ef9b08df58d9d28df6b8ade076d95bf7e5cb1b18..f88b80e4772ade4199564cf96ef94ce45e493311 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -168,6 +168,7 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From 01714d58684fb0fdc502c6ca310a633759625e66 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sun, 3 Mar 2019 18:25:06 -0800
|
||||
Subject: [PATCH] Tuinity Server Config
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index e33e889c291d37a821a4fbd40d9aac7bb079de0d..5dfa0658838c4801cdf260eae8b98163f729e5af 100644
|
||||
index e33e889c2..5dfa06588 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -229,7 +229,8 @@ public class TimingsExport extends Thread {
|
||||
@ -20,7 +20,7 @@ index e33e889c291d37a821a4fbd40d9aac7bb079de0d..5dfa0658838c4801cdf260eae8b98163
|
||||
new TimingsExport(listeners, parent, history).start();
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0f66484a80d3cc7caaf8a111bd50229e673bd8e0
|
||||
index 000000000..0f66484a8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -0,0 +1,236 @@
|
||||
@ -262,7 +262,7 @@ index 0000000000000000000000000000000000000000..0f66484a80d3cc7caaf8a111bd50229e
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index cc06164291f454e074c3955f63df758990b6075e..61830a9c953e35b5c429be18da4331806294ffa5 100644
|
||||
index cc0616429..61830a9c9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1082,6 +1082,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@ -274,7 +274,7 @@ index cc06164291f454e074c3955f63df758990b6075e..61830a9c953e35b5c429be18da433180
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index df8270c40ed7ce6f628686ff6f4fa4cf96af6738..327b5ee357a24ad5d47b5a06458e6fb517fea625 100644
|
||||
index df8270c40..327b5ee35 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -215,6 +215,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -286,7 +286,7 @@ index df8270c40ed7ce6f628686ff6f4fa4cf96af6738..327b5ee357a24ad5d47b5a06458e6fb5
|
||||
this.setPVP(dedicatedserverproperties.pvp);
|
||||
this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index 6581fe0d93a5c2e7b444a44c01726e02d4a28e63..32b6de119c1ee27be0be42c0a0cdb4dd741a4c36 100644
|
||||
index 6581fe0d9..32b6de119 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||
@@ -154,6 +154,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -307,7 +307,7 @@ index 6581fe0d93a5c2e7b444a44c01726e02d4a28e63..32b6de119c1ee27be0be42c0a0cdb4dd
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d3c235693094170767cbd12d0e009ce1c6c4b125..08783d678bd9729c144a6de2718253bd20ff398c 100644
|
||||
index d3c235693..08783d678 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -864,6 +864,7 @@ public final class CraftServer implements Server {
|
||||
@ -342,7 +342,7 @@ index d3c235693094170767cbd12d0e009ce1c6c4b125..08783d678bd9729c144a6de2718253bd
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index ad9dd0f4518b1b6b1d84f5deaf1029de103100da..145748b5ca095cd555fd1f085a596bf0f58fea13 100644
|
||||
index ad9dd0f45..145748b5c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -140,6 +140,13 @@ public class Main {
|
||||
@ -359,3 +359,6 @@ index ad9dd0f4518b1b6b1d84f5deaf1029de103100da..145748b5ca095cd555fd1f085a596bf0
|
||||
|
||||
// Paper start
|
||||
acceptsAll(asList("server-name"), "Name of the server")
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
@ -120,7 +120,7 @@ index 033548a58d27f64d3954206d267783c0437d4019..08ed243259f052165c6f75aed1d1d65a
|
||||
|
||||
public TickThread(final Runnable run, final String name, final int id) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index 3644e8b24b082e17752ef52934625416130aaa08..4dfc1101d5fc78630ef8b816e8f84f5541683f0b 100644
|
||||
index 2f8bca35508640f6b8c312fff17d55f129431599..aac3f74af760e8d7dbb1e9d4031ce1aabe45ca21 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -74,6 +74,7 @@ public abstract class ChunkMapDistance {
|
||||
@ -256,7 +256,7 @@ index f3d6811156e68040106f1d027a10ea33b5646b05..e7cd6392d722d0e13b86b57d70946b18
|
||||
|
||||
this.noTickViewDistance = viewDistance;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 6055bcc3b593cbcb5863e337ba650f125b89be29..3e30663eecc8af3df835cd1864b2d6c5f5262fb4 100644
|
||||
index f88b80e4772ade4199564cf96ef94ce45e493311..c485837c751fb8bf7c30dbca955321f586940a8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1775,6 +1775,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -19,7 +19,7 @@ affects player loaded chunks, when we want to target all
|
||||
loads.
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index f10fa659680f8a574f77d260bbc52be349c244e8..182f419fde8eb3646a79cc0ba689ee486cb53338 100644
|
||||
index f10fa659680f8a574f77d260bbc52be349c244e8..dea6aabc0c145b0723badf7024a9f8a0b241f24c 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -30,10 +30,11 @@ index f10fa659680f8a574f77d260bbc52be349c244e8..182f419fde8eb3646a79cc0ba689ee48
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@@ -123,6 +124,15 @@ public final class TuinityConfig {
|
||||
@@ -122,6 +123,15 @@ public final class TuinityConfig {
|
||||
tickWorldsInParallel = TuinityConfig.getBoolean("tick-worlds-in-parallel", false);
|
||||
tickThreads = TuinityConfig.getInt("server-tick-threads", 1); // will be 4 in the future
|
||||
}*/
|
||||
|
||||
+
|
||||
+ public static int delayChunkUnloadsBy;
|
||||
+
|
||||
+ private static void delayChunkUnloadsBy() {
|
||||
@ -42,12 +43,11 @@ index f10fa659680f8a574f77d260bbc52be349c244e8..182f419fde8eb3646a79cc0ba689ee48
|
||||
+ TicketType.DELAYED_UNLOAD.loadPeriod = delayChunkUnloadsBy;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
public static final class WorldConfig {
|
||||
|
||||
public final String worldName;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index 4dfc1101d5fc78630ef8b816e8f84f5541683f0b..c474ee61d98772a2852c44dec1c4a1037472ed2c 100644
|
||||
index aac3f74af760e8d7dbb1e9d4031ce1aabe45ca21..8d4944fa1c761bb3ab299ec639663e7f52b512a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -40,7 +40,7 @@ public abstract class ChunkMapDistance {
|
||||
@ -247,7 +247,7 @@ index 3c804c7b20a14ea6e510810e2be10c1cc89ff5c1..47da7efffde2e6d63c1a064b950abf81
|
||||
return new TicketType<>(s, comparator, 0L);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3b3eda95c0ff8b129adedbae6561bba2d01c2f3a..03f74fb19e93620e057e71ac0c6c368e81aa532e 100644
|
||||
index 62513d3acb930c4c9fa3d875a1fc94bb4d948951..69b776b0a7e254a84fcf50784cde30629488a2d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -505,6 +505,7 @@ public class CraftWorld implements World {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Lag compensate block breaking
|
||||
Use time instead of ticks if ticks fall behind
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index 182f419fde8eb3646a79cc0ba689ee486cb53338..5aa558bd05c4ab735730263f220478c36a4ba0fd 100644
|
||||
index dea6aabc0c145b0723badf7024a9f8a0b241f24c..6edc8765df8644426613c40557d890620060fab1 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -133,6 +133,12 @@ public final class TuinityConfig {
|
||||
@ -23,10 +23,10 @@ index 182f419fde8eb3646a79cc0ba689ee486cb53338..5aa558bd05c4ab735730263f220478c3
|
||||
|
||||
public final String worldName;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8129d2630 100644
|
||||
index 1511cf54fea53577a2808b5d84417eee834db984..e47a743fd3adc62aa47beec722f49eeaded246bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerInteractManager.java
|
||||
@@ -56,14 +56,29 @@ public class PlayerInteractManager {
|
||||
@@ -55,14 +55,29 @@ public class PlayerInteractManager {
|
||||
private EnumGamemode gamemode;
|
||||
private EnumGamemode e;
|
||||
private boolean f;
|
||||
@ -59,7 +59,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
public PlayerInteractManager(WorldServer worldserver) {
|
||||
this.gamemode = EnumGamemode.NOT_SET;
|
||||
this.e = EnumGamemode.NOT_SET;
|
||||
@@ -119,7 +134,7 @@ public class PlayerInteractManager {
|
||||
@@ -118,7 +133,7 @@ public class PlayerInteractManager {
|
||||
if (iblockdata == null || iblockdata.isAir()) { // Paper
|
||||
this.j = false;
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
|
||||
if (f >= 1.0F) {
|
||||
this.j = false;
|
||||
@@ -139,7 +154,7 @@ public class PlayerInteractManager {
|
||||
@@ -138,7 +153,7 @@ public class PlayerInteractManager {
|
||||
this.m = -1;
|
||||
this.f = false;
|
||||
} else {
|
||||
@ -77,7 +77,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +162,12 @@ public class PlayerInteractManager {
|
||||
@@ -146,6 +161,12 @@ public class PlayerInteractManager {
|
||||
|
||||
private float a(IBlockData iblockdata, BlockPosition blockposition, int i) {
|
||||
int j = this.currentTick - i;
|
||||
@ -90,7 +90,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
float f = iblockdata.getDamage(this.player, this.player.world, blockposition) * (float) (j + 1);
|
||||
int k = (int) (f * 10.0F);
|
||||
|
||||
@@ -214,7 +235,7 @@ public class PlayerInteractManager {
|
||||
@@ -213,7 +234,7 @@ public class PlayerInteractManager {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
float f = 1.0F;
|
||||
|
||||
iblockdata = this.world.getType(blockposition);
|
||||
@@ -267,12 +288,12 @@ public class PlayerInteractManager {
|
||||
@@ -266,12 +287,12 @@ public class PlayerInteractManager {
|
||||
int j = (int) (f * 10.0F);
|
||||
|
||||
this.world.a(this.player.getId(), blockposition, j);
|
||||
@ -114,7 +114,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
|
||||
iblockdata = this.world.getType(blockposition);
|
||||
if (!iblockdata.isAir()) {
|
||||
@@ -289,12 +310,18 @@ public class PlayerInteractManager {
|
||||
@@ -288,12 +309,18 @@ public class PlayerInteractManager {
|
||||
this.f = false;
|
||||
this.j = true;
|
||||
this.k = blockposition;
|
||||
@ -134,7 +134,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
} else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) {
|
||||
this.f = false;
|
||||
if (!Objects.equals(this.h, blockposition) && !BlockPosition.ZERO.equals(this.h)) {
|
||||
@@ -306,7 +333,7 @@ public class PlayerInteractManager {
|
||||
@@ -305,7 +332,7 @@ public class PlayerInteractManager {
|
||||
}
|
||||
|
||||
this.world.a(this.player.getId(), blockposition, -1);
|
||||
@ -143,7 +143,7 @@ index 87722285690d9d3370610e2a2eb809e0d1f497c9..1746a8c1750b494c47f9f46e83b248d8
|
||||
}
|
||||
|
||||
}
|
||||
@@ -316,7 +343,13 @@ public class PlayerInteractManager {
|
||||
@@ -315,7 +342,13 @@ public class PlayerInteractManager {
|
||||
|
||||
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) {
|
||||
if (this.breakBlock(blockposition)) {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Per World Spawn Limits
|
||||
This patch is licensed under the MIT license. See /licenses/MIT.md.
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index 5aa558bd05c4ab735730263f220478c36a4ba0fd..6473b951788a3ecbeee4811ea0288ff47b48355f 100644
|
||||
index 6edc8765df8644426613c40557d890620060fab1..fdc56a5080ab2f7331431ee1f5976ba669b725ac 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -269,6 +269,23 @@ public final class TuinityConfig {
|
||||
@ -35,7 +35,7 @@ index 5aa558bd05c4ab735730263f220478c36a4ba0fd..6473b951788a3ecbeee4811ea0288ff4
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 03f74fb19e93620e057e71ac0c6c368e81aa532e..c89b4788cec45354e03efc3f9b05dd3891101349 100644
|
||||
index 69b776b0a7e254a84fcf50784cde30629488a2d9..4356d30353cc856c53731e9f10885d74a62027d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -342,6 +342,14 @@ public class CraftWorld implements World {
|
||||
|
@ -74,7 +74,7 @@ index 67d8fe8ad036a9252c774bb6a914c8ec79981876..71a000edfab27c9965d1929af7858282
|
||||
});
|
||||
throw CancelledPacketHandleException.INSTANCE;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 3e30663eecc8af3df835cd1864b2d6c5f5262fb4..979f2ddf4fb1b0b0a740a02a4084292a37b76c68 100644
|
||||
index c485837c751fb8bf7c30dbca955321f586940a8b..25073eb392bb00daf7e0b68be4767cea416c1816 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1015,7 +1015,26 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -18,10 +18,10 @@ index 4666d6582535d6e49c5bd40d4fcdcdfe07590aa9..b870cca05f0ba354e6976a7051123563
|
||||
// re-schedule eventually
|
||||
toTick.tickState = STATE_SCHEDULED;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbfa451682f 100644
|
||||
index f6d443d0193ceea1b3248b66cb198be04822e9e7..5c909b776e111d6bd9e2429f25fed121bb391219 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1115,7 +1115,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1105,7 +1105,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
tickSection = curTime;
|
||||
}
|
||||
@ -30,7 +30,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
// Spigot end
|
||||
|
||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||
@@ -1208,6 +1208,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1198,6 +1198,76 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -107,7 +107,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
private void executeModerately() {
|
||||
this.executeAll();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1221,22 +1291,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1211,22 +1281,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
});
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
|
||||
@Override
|
||||
public TickTask postToMainThread(Runnable runnable) {
|
||||
@@ -1263,6 +1318,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1253,6 +1308,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
private boolean bb() {
|
||||
if (super.executeNext()) {
|
||||
@ -139,7 +139,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
return true;
|
||||
} else {
|
||||
if (this.canSleepForTick()) {
|
||||
@@ -1330,7 +1386,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1320,7 +1376,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper start - move oversleep into full server tick
|
||||
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
||||
this.awaitTasks(() -> {
|
||||
@ -148,7 +148,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
return !this.canOversleep();
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
@@ -1421,16 +1477,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1411,16 +1467,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
protected void b(BooleanSupplier booleansupplier) {
|
||||
@ -168,7 +168,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
this.methodProfiler.exitEnter("levels");
|
||||
Iterator iterator = this.getWorlds().iterator();
|
||||
|
||||
@@ -1441,7 +1497,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1431,7 +1487,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
processQueue.remove().run();
|
||||
}
|
||||
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
||||
@ -177,7 +177,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - optimize time updates
|
||||
@@ -1484,7 +1540,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1474,7 +1530,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.methodProfiler.enter("tick");
|
||||
|
||||
try {
|
||||
@ -186,7 +186,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.doTick(booleansupplier);
|
||||
// Tuinity start
|
||||
@@ -1493,7 +1549,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1483,7 +1539,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Tuinity end
|
||||
worldserver.timings.doTick.stopTiming(); // Spigot
|
||||
@ -279,7 +279,7 @@ index c5038aa66703484a9243579ba4a6c92d138fc388..e38e507ccc26058b4f4d2e8fe0611885
|
||||
@Override
|
||||
protected boolean executeNext() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 979f2ddf4fb1b0b0a740a02a4084292a37b76c68..9f9bd5ea486eb037cb95254a2b505218a4a5e8b3 100644
|
||||
index 25073eb392bb00daf7e0b68be4767cea416c1816..1658c03b70b5984c87d069276efcc7b8c8878431 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -410,6 +410,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -248,10 +248,10 @@ index 006e7076932f6be576a64da09c4d84ca4a15f5dd..e832ea0497b2d6af7556bda7f6728e72
|
||||
0, 2, 60L, TimeUnit.SECONDS,
|
||||
new LinkedBlockingQueue<Runnable>(),
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 588325277546c9582d4990b18fe7acbfa451682f..078b8444d6f7c79d504805bce011b26a951b5fa3 100644
|
||||
index 5c909b776e111d6bd9e2429f25fed121bb391219..d7e1c830764973c31dff8311a79e617d8f283a53 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1451,6 +1451,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1441,6 +1441,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -261,7 +261,7 @@ index 588325277546c9582d4990b18fe7acbfa451682f..078b8444d6f7c79d504805bce011b26a
|
||||
long endTime = System.nanoTime();
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index 1161605d9f4f9727282ac3677a916a9ebdb1263b..74f12e93d7fd05ad20e43d0875c2f6fec8f798f5 100644
|
||||
index 37c9b5fd712e30a9a0faccc840f738f4b2cfc723..f7e9a151ffbbb64cb8f8bc1d37516d7979277b17 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -370,7 +370,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -283,7 +283,7 @@ index 1161605d9f4f9727282ac3677a916a9ebdb1263b..74f12e93d7fd05ad20e43d0875c2f6fe
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 9f9bd5ea486eb037cb95254a2b505218a4a5e8b3..217dfb529b6c09ceda0d84ea32637ffda8333022 100644
|
||||
index 1658c03b70b5984c87d069276efcc7b8c8878431..86d1ce955c88530c043128a043fe75534077c665 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -474,6 +474,251 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -539,10 +539,10 @@ index 9f9bd5ea486eb037cb95254a2b505218a4a5e8b3..217dfb529b6c09ceda0d84ea32637ffd
|
||||
@Override
|
||||
public TileEntity getTileEntity(BlockPosition pos, boolean validate) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 6bfa8020c19721dd63e038e4b866a7d3a24e66ac..1a7bcca69ef4996cd751b9bbae46043727cb8faf 100644
|
||||
index 2df8e914f66176e22aeddf8b94a83af5ea921d88..306d5ab69f8c4ca1c69f081e17cf9a4a2bee0446 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -945,7 +945,7 @@ public abstract class PlayerList {
|
||||
@@ -943,7 +943,7 @@ public abstract class PlayerList {
|
||||
|
||||
worldserver1.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper
|
||||
entityplayer1.forceCheckHighPriority(); // Player
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Reduce allocation rate from crammed entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 2537c9fcf155253da53ada3829c3caca765f35f4..96cc46a26eef701b0579f3407e67af9176e1743b 100644
|
||||
index 21341eeb8148be119fbc1dd370c1beaf70a319e0..d933323d57a2a7ff283408f12d4650699f8177e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2973,7 +2973,11 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Improve paper prevent moving into unloaded chunk check
|
||||
Check the AABB of the move
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index 9455cb9bc849a330e57fdc466fb51902631e22d8..be52d15ee6828398bb85c05ce0eaad93fb696a62 100644
|
||||
index e6ea84ba098b4d77bc68e99862992a10ef4585b5..0b2a94d44a7321369dcb0a96529ff35366d98e09 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -570,7 +570,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -568,7 +568,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@ -20,7 +20,7 @@ index 9455cb9bc849a330e57fdc466fb51902631e22d8..be52d15ee6828398bb85c05ce0eaad93
|
||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||
return;
|
||||
}
|
||||
@@ -1289,7 +1291,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1287,7 +1289,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed = player.abilities.walkSpeed * 10f;
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Revert getChunkAt(Async) retaining chunks for long periods of
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c89b4788cec45354e03efc3f9b05dd3891101349..6e9cc608fd5038b9729eeb56f6014de3ce19809d 100644
|
||||
index 4356d30353cc856c53731e9f10885d74a62027d2..01821015a0737dd770524bf77c8cb46d0ff6562e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -423,14 +423,7 @@ public class CraftWorld implements World {
|
||||
@ -25,7 +25,7 @@ index c89b4788cec45354e03efc3f9b05dd3891101349..6e9cc608fd5038b9729eeb56f6014de3
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -2659,7 +2652,7 @@ public class CraftWorld implements World {
|
||||
@@ -2596,7 +2589,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
|
||||
net.minecraft.world.level.chunk.Chunk chunk = (net.minecraft.world.level.chunk.Chunk) either.left().orElse(null);
|
||||
|
@ -9,7 +9,7 @@ issues where teleporting players across worlds while ticking.
|
||||
Also allows us to run mid tick while ticking entities.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 217dfb529b6c09ceda0d84ea32637ffda8333022..5b3d4c03cf0b504ad9334e4810b8fa5fd35b3db7 100644
|
||||
index 86d1ce955c88530c043128a043fe75534077c665..fe32a457754d1dfcc37f7bf7ee6dd200ba7e323c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -174,7 +174,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
|
||||
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd232478981577 100644
|
||||
index 0b2a94d44a7321369dcb0a96529ff35366d98e09..40a7f69e5e14078977ef615abf3a0f1f61d76f9f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -585,12 +585,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -583,12 +583,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
double d11 = d7;
|
||||
|
||||
d6 = d3 - entity.locX();
|
||||
@@ -604,16 +606,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -602,16 +604,25 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
boolean flag1 = false;
|
||||
|
||||
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
@ -55,7 +55,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
entity.setLocation(d0, d1, d2, f, f1);
|
||||
player.setLocation(d0, d1, d2, this.player.yaw, this.player.pitch); // CraftBukkit
|
||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||
@@ -699,7 +710,32 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -697,7 +708,32 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
private boolean a(Entity entity) {
|
||||
@ -89,7 +89,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1221,7 +1257,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1219,7 +1255,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (this.teleportPos != null) {
|
||||
@ -98,7 +98,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
this.A = this.e;
|
||||
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
|
||||
}
|
||||
@@ -1308,7 +1344,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1306,7 +1342,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
|
||||
d7 = d4 - this.o;
|
||||
d8 = d5 - this.p;
|
||||
@@ -1347,6 +1383,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1345,6 +1381,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
|
||||
@ -115,7 +115,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
this.player.setOnGround(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move
|
||||
// Paper start - prevent position desync
|
||||
if (this.teleportPos != null) {
|
||||
@@ -1366,12 +1403,23 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1364,12 +1401,23 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
boolean flag1 = false;
|
||||
|
||||
if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
|
||||
@ -141,7 +141,7 @@ index be52d15ee6828398bb85c05ce0eaad93fb696a62..c4ab9593d0f781b5d3c546b79cdd2324
|
||||
this.a(d0, d1, d2, f, f1);
|
||||
} else {
|
||||
// CraftBukkit start - fire PlayerMoveEvent
|
||||
@@ -1458,6 +1506,26 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1456,6 +1504,26 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ and an action can be defined: DROP or KICK
|
||||
If interval or rate are less-than 0, the limit is ignored
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index 6473b951788a3ecbeee4811ea0288ff47b48355f..373b36fa36f98f64bb9ffa0dfaecefa3626729f4 100644
|
||||
index fdc56a5080ab2f7331431ee1f5976ba669b725ac..29b89c244bb8a20bed1789bb7c5001739d3b6c3a 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -1,6 +1,7 @@
|
||||
|
@ -97,7 +97,7 @@ index 3b727fcb05074dea7cc1689e8589d4f93d5ccceb..7897fe870234ddef12926d855a3f060f
|
||||
// Paper start - Chunk Prioritization
|
||||
public void queueHolderUpdate(PlayerChunk playerchunk) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 5b3d4c03cf0b504ad9334e4810b8fa5fd35b3db7..b8e27958dffa84df24f33bfcbaf452b178f24445 100644
|
||||
index fe32a457754d1dfcc37f7bf7ee6dd200ba7e323c..31276fe09f0dc0bf59b97d45b2404e39478663bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -414,6 +414,107 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -291,10 +291,10 @@ index 5759f91d5e9dc52b16c8955b8d318da2b53c7af4..0960f415fd3c6c764cf3dd273bb9e9c5
|
||||
}
|
||||
+// Tuinity end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
index c67b94840e4c967baebf6eb351df15f0e4ead4be..ed836462123efc6903e406fa926e55e1cedddb95 100644
|
||||
index 185667110cd6f566b23546728d20fc79223f3c92..dc98ef48a664d9ee2a302fff8c611fd16dc704b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||
@@ -256,7 +256,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||
@@ -255,7 +255,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||
|
||||
s = (new BigInteger(MinecraftEncryption.a("", this.server.getKeyPair().getPublic(), this.loginKey))).toString(16);
|
||||
this.g = LoginListener.EnumProtocolState.AUTHENTICATING;
|
||||
@ -304,7 +304,7 @@ index c67b94840e4c967baebf6eb351df15f0e4ead4be..ed836462123efc6903e406fa926e55e1
|
||||
throw new IllegalStateException("Protocol error", cryptographyexception);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnection.java b/src/main/java/net/minecraft/server/network/ServerConnection.java
|
||||
index 69fc2789df88344587b6052f93661ed38f24a503..92836f1200461ba7fff2f8bcb5e1755ec9a0c9ce 100644
|
||||
index dc362724ea0cc1b2f9d9ceffff483217b4356c40..70fde7bad2e0a6d7432d8509fdb7c46d9f020d4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnection.java
|
||||
@@ -87,6 +87,11 @@ public class ServerConnection {
|
||||
|
@ -22,7 +22,7 @@ index e50731723d266ba65b2163df2e935afb8b013a93..a6736d15282715d920bab85eb92074cd
|
||||
}
|
||||
value.append("},");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6e9cc608fd5038b9729eeb56f6014de3ce19809d..7a94e9efddbffca4627a0685e2baee8e7d6a3176 100644
|
||||
index 01821015a0737dd770524bf77c8cb46d0ff6562e..b0801ca77620753ab61dba62429ce76e95aaba8f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -720,6 +720,30 @@ public class CraftWorld implements World {
|
||||
|
@ -11,10 +11,10 @@ gui. It looks like during sigint shutdown there can be some
|
||||
deadlock between the server thread and awt shutdown thread here.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 078b8444d6f7c79d504805bce011b26a951b5fa3..2767a9369ddc922f1d9c7cb6c7acc8270545535a 100644
|
||||
index d7e1c830764973c31dff8311a79e617d8f283a53..02d8a8f13d81c47316f704fb700afd0214a5f546 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -878,10 +878,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -868,10 +868,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isMainThread()) {
|
||||
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER)");
|
||||
@ -28,10 +28,10 @@ index 078b8444d6f7c79d504805bce011b26a951b5fa3..2767a9369ddc922f1d9c7cb6c7acc827
|
||||
}
|
||||
// We've just obliterated the main thread, this will prevent stop from dying when removing players
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 327b5ee357a24ad5d47b5a06458e6fb517fea625..fa7a78549a9bb92b93c305dc16f43a9ace7f6f43 100644
|
||||
index d0cfc0053c9f49406a31de983e4980da8f8643d6..d902efdb8f2d42ea4c3933f7fa76ebe135ee09db 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -400,7 +400,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -399,7 +399,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
if (this.q != null) {
|
||||
|
@ -21,7 +21,7 @@ index 2f8b3587f527620152609d5be342b328a7621e0f..01679d76405625223869f3fdcb29ffba
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
index c4248531d4a6a11259d9d78ce1d7683a86840d40..f3077c22445949c484a73ee56eab593f527795a6 100644
|
||||
index b9680f6f2e30ec9397d6a9c83e79563d9253aff6..546de0ec2b624a781480ac95f65b2cbfbb5dcf2e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
@@ -83,7 +83,9 @@ public abstract class EntityFireball extends IProjectile {
|
||||
|
@ -3718,7 +3718,7 @@ index 0000000000000000000000000000000000000000..0e4442a94559346b19a536d35ce5def6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index 373b36fa36f98f64bb9ffa0dfaecefa3626729f4..1fb7a0e44cdbf563a7858003806a57a5cbda445b 100644
|
||||
index 29b89c244bb8a20bed1789bb7c5001739d3b6c3a..85f6fba0ada92d5176a720761a7d4931c1259526 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -232,6 +232,12 @@ public final class TuinityConfig {
|
||||
@ -4269,7 +4269,7 @@ index 9050ff7180f63c1f5756570446c4d0a8cc767779..9dd0f34aaede93ce4fdff9b41f76166e
|
||||
this.d &= ~(1 << k);
|
||||
if (nibblearray != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index 74f12e93d7fd05ad20e43d0875c2f6fec8f798f5..f7eb6e920c9c1f26845bec58d5b9e3641303b677 100644
|
||||
index f7e9a151ffbbb64cb8f8bc1d37516d7979277b17..980063ada85d7e9660a625d67b2f6a82f80bf535 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -661,6 +661,185 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -4908,7 +4908,7 @@ index 1122df50a7f9cbc489e8da7a91e9af73476eb148..3738c51b5e673c439d88a7ef7f4614f3
|
||||
// Tuinity end - delay chunk unloads
|
||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index b8e27958dffa84df24f33bfcbaf452b178f24445..d45edcb5c9be095f2c6b70f64758ec288a797aa9 100644
|
||||
index 31276fe09f0dc0bf59b97d45b2404e39478663bb..e67924369f778b16a2ee8d29c571756c1be1ebf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -515,6 +515,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -111,7 +111,7 @@ index e30995df572df6135e159d34cd7646fd08db4a5a..b48d419f82f0d9df1f8848d95066bad7
|
||||
}
|
||||
// Tuiniy end
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index d45edcb5c9be095f2c6b70f64758ec288a797aa9..8fe878150e5657a8f22ea4d812faf7fd472f8d10 100644
|
||||
index e67924369f778b16a2ee8d29c571756c1be1ebf9..a278a5ba17a510f784c798ad7f7f47bf7ccc301e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1085,6 +1085,15 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -9,7 +9,7 @@ Configurable under
|
||||
`send-full-pos-for-hard-colliding-entities`
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index 1fb7a0e44cdbf563a7858003806a57a5cbda445b..edb9b246bf327f67a8500f77f81b46eb9e04c9b0 100644
|
||||
index 85f6fba0ada92d5176a720761a7d4931c1259526..299b31ed429c922fcb6122e3c511bd16735e3c71 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -238,6 +238,12 @@ public final class TuinityConfig {
|
||||
|
@ -9,7 +9,7 @@ paper placed their logic. So it wont correctly set in this case.
|
||||
Fix by moving it to a different place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1a7bcca69ef4996cd751b9bbae46043727cb8faf..a1eea57a876e3ba0d39c4d4881d6558a9829874e 100644
|
||||
index 306d5ab69f8c4ca1c69f081e17cf9a4a2bee0446..e9ff47b239372bd628097e6e7f43fa9bd5f4d73d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -179,6 +179,7 @@ public abstract class PlayerList {
|
||||
|
@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/
|
||||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index f7eb6e920c9c1f26845bec58d5b9e3641303b677..b7eb11ee5a5922612fd051e7397327111a8e3125 100644
|
||||
index 980063ada85d7e9660a625d67b2f6a82f80bf535..bffc0824151a6597d91cd854b343b2586f6b9322 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -1718,6 +1718,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -31,7 +31,7 @@ index f7eb6e920c9c1f26845bec58d5b9e3641303b677..b7eb11ee5a5922612fd051e739732711
|
||||
public void broadcastCarriedItem() {
|
||||
if (!this.e) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index 8fe878150e5657a8f22ea4d812faf7fd472f8d10..a65a79abf8b6a5ddb128ebec066dbb46050053d8 100644
|
||||
index a278a5ba17a510f784c798ad7f7f47bf7ccc301e..2d207dbad7752526c9a0b212979043c009e66386 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1908,10 +1908,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -51,10 +51,10 @@ index 8fe878150e5657a8f22ea4d812faf7fd472f8d10..a65a79abf8b6a5ddb128ebec066dbb46
|
||||
// Spigot End
|
||||
this.tileEntityListUnload.addAll(chunk.getTileEntities().values());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index c39c50e53549e9cb9d3520bc7e8b7e89cfa20163..5bce47fa8f191bc1d33c04c9865cb0efd492a9a2 100644
|
||||
index ec0956a98c133bcd3d4f92f696c667eab6ff98f1..44038dd278b988508047023107683e5370af54ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -458,6 +458,12 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -453,6 +453,12 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
// Paper end
|
||||
|
@ -11,7 +11,7 @@ the biome methods, removing the need to invoke a chunk
|
||||
lookup.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index a65a79abf8b6a5ddb128ebec066dbb46050053d8..aaf6ada41ba00f891027ca46883a23c06c295c2b 100644
|
||||
index 2d207dbad7752526c9a0b212979043c009e66386..84b4b7524064a4f0c175f34778e4e0d8004888ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1198,6 +1198,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From 43e57e915fd414ab40058d23ac0c8ef6e43d3e77 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <spottedleaf@spottedleaf.dev>
|
||||
Date: Sun, 24 Jan 2021 20:27:32 -0800
|
||||
Subject: [PATCH] Replace player chunk loader system
|
||||
@ -49,7 +49,7 @@ values help the responsitivity to player movement and
|
||||
higher values help loading when the server is at a low TPS.
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 5dfa0658838c4801cdf260eae8b98163f729e5af..35810f42d7a0cd50a4cbe90e8d698fe57914c889 100644
|
||||
index 5dfa06588..35810f42d 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -154,7 +154,7 @@ public class TimingsExport extends Thread {
|
||||
@ -63,7 +63,7 @@ index 5dfa0658838c4801cdf260eae8b98163f729e5af..35810f42d7a0cd50a4cbe90e8d698fe5
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/chunk/PlayerChunkLoader.java b/src/main/java/com/tuinity/tuinity/chunk/PlayerChunkLoader.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0d577aa1c7868ce89c3902535adcb554b1f47551
|
||||
index 000000000..0d577aa1c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/tuinity/tuinity/chunk/PlayerChunkLoader.java
|
||||
@@ -0,0 +1,964 @@
|
||||
@ -1032,7 +1032,7 @@ index 0000000000000000000000000000000000000000..0d577aa1c7868ce89c3902535adcb554
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..e1dc7c1025e19f7393a45719af8fe7aae016184d 100644
|
||||
index edb9b246b..e1dc7c102 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/config/TuinityConfig.java
|
||||
@@ -244,6 +244,25 @@ public final class TuinityConfig {
|
||||
@ -1062,7 +1062,7 @@ index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..e1dc7c1025e19f7393a45719af8fe7aa
|
||||
|
||||
public final String worldName;
|
||||
diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
index 02ad0611836160a1d0ba6b26476e6bd336d55681..0f8cbe1f656b46f71c6494bd2e0057be63017272 100644
|
||||
index 02ad06118..0f8cbe1f6 100644
|
||||
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||
@@ -123,6 +123,28 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -1116,7 +1116,7 @@ index 02ad0611836160a1d0ba6b26476e6bd336d55681..0f8cbe1f656b46f71c6494bd2e0057be
|
||||
// Paper end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index e832ea0497b2d6af7556bda7f6728e72c48d80a8..b7399d17dd64ca8b1f1fab405cb0ac914dc53b98 100644
|
||||
index e832ea049..b7399d17d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -697,7 +697,7 @@ public final class MCUtil {
|
||||
@ -1129,7 +1129,7 @@ index e832ea0497b2d6af7556bda7f6728e72c48d80a8..b7399d17dd64ca8b1f1fab405cb0ac91
|
||||
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange);
|
||||
worldData.addProperty("visible-chunk-count", visibleChunks.size());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index c474ee61d98772a2852c44dec1c4a1037472ed2c..ad90735b5daa658cdd5467eadcb29183d018b1fd 100644
|
||||
index c474ee61d..ad90735b5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -42,7 +42,7 @@ public abstract class ChunkMapDistance {
|
||||
@ -1203,7 +1203,7 @@ index c474ee61d98772a2852c44dec1c4a1037472ed2c..ad90735b5daa658cdd5467eadcb29183
|
||||
class b extends ChunkMap {
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
index 9e96376a1d710c0ba7a763868b23fc586253e1a8..fe040615ff03478a20cdf8376f89a6b7d100ba61 100644
|
||||
index 9e96376a1..fe040615f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||
@@ -946,6 +946,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@ -1223,7 +1223,7 @@ index 9e96376a1d710c0ba7a763868b23fc586253e1a8..fe040615ff03478a20cdf8376f89a6b7
|
||||
try {
|
||||
boolean execChunkTask = com.destroystokyo.paper.io.chunk.ChunkTaskManager.pollChunkWaitQueue() || ChunkProviderServer.this.world.asyncChunkTaskManager.pollNextChunkTask(); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
index b7eb11ee5a5922612fd051e7397327111a8e3125..fb61b6ac167b34486282a24e598020fb96081f28 100644
|
||||
index b7eb11ee5..fb61b6ac1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||
@@ -261,7 +261,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -1236,7 +1236,7 @@ index b7eb11ee5a5922612fd051e7397327111a8e3125..fb61b6ac167b34486282a24e598020fb
|
||||
|
||||
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunk.java b/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
index a8edac296cbdb053bca4b56a890c3e9e5544d3a6..d9b134302f739efd93f50e93c8730b474f9a8ccf 100644
|
||||
index a8edac296..d9b134302 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunk.java
|
||||
@@ -501,7 +501,7 @@ public class PlayerChunk {
|
||||
@ -1265,7 +1265,7 @@ index a8edac296cbdb053bca4b56a890c3e9e5544d3a6..d9b134302f739efd93f50e93c8730b47
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c87db53bb4 100644
|
||||
index 1e627159c..d7eede51f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||
@@ -236,20 +236,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@ -1554,7 +1554,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a1eea57a876e3ba0d39c4d4881d6558a9829874e..b5043eabe63fe703a321cff6c0f6449cf729cd0e 100644
|
||||
index a1eea57a8..b5043eabe 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -270,7 +270,7 @@ public abstract class PlayerList {
|
||||
@ -1585,7 +1585,7 @@ index a1eea57a876e3ba0d39c4d4881d6558a9829874e..b5043eabe63fe703a321cff6c0f6449c
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLightning.java b/src/main/java/net/minecraft/world/entity/EntityLightning.java
|
||||
index 85f571a791bce63989890f277857bc7bdeec0cb5..9e4137768c7d8966759324a4b368330c35faa8a5 100644
|
||||
index 85f571a79..9e4137768 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLightning.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLightning.java
|
||||
@@ -81,8 +81,9 @@ public class EntityLightning extends Entity {
|
||||
@ -1600,7 +1600,7 @@ index 85f571a791bce63989890f277857bc7bdeec0cb5..9e4137768c7d8966759324a4b368330c
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
index c296fcf80c2f3f210fa020416973ec8d5db541ba..07160de8725787551df327c0790b2d6e0876524f 100644
|
||||
index c296fcf80..07160de87 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
@@ -625,9 +625,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
@ -1616,7 +1616,7 @@ index c296fcf80c2f3f210fa020416973ec8d5db541ba..07160de8725787551df327c0790b2d6e
|
||||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
index 229eabe0510e6c3660236ed0fb3e80d41074642c..930fc752ec0a988b17bc556cd428161638a14f27 100644
|
||||
index 229eabe05..930fc752e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
@@ -264,9 +264,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@ -1632,7 +1632,7 @@ index 229eabe0510e6c3660236ed0fb3e80d41074642c..930fc752ec0a988b17bc556cd4281616
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemEnderEye.java b/src/main/java/net/minecraft/world/item/ItemEnderEye.java
|
||||
index f74685a7cdb905af8e9712ca8597e7ed3dc8b120..feedbd8c97c1b1c56eaff359e6a940696d416906 100644
|
||||
index f74685a7c..feedbd8c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemEnderEye.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemEnderEye.java
|
||||
@@ -60,9 +60,10 @@ public class ItemEnderEye extends Item {
|
||||
@ -1648,7 +1648,7 @@ index f74685a7cdb905af8e9712ca8597e7ed3dc8b120..feedbd8c97c1b1c56eaff359e6a94069
|
||||
double deltaZ = soundPos.getZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
|
||||
index a802c45538943b570ca0daa3a40607dc80e696eb..af01f5d635eada7175b9d7fdb47a65530686a539 100644
|
||||
index a802c4553..af01f5d63 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||
@@ -606,7 +606,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
@ -1661,7 +1661,7 @@ index a802c45538943b570ca0daa3a40607dc80e696eb..af01f5d635eada7175b9d7fdb47a6553
|
||||
// Paper end - per player view distance
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/Chunk.java b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
index d6b34c6abebeac8445da3e76f341066952182e2b..fc07e2014e961da5d97095c4ee6f972e2ece3ec3 100644
|
||||
index d6b34c6ab..fc07e2014 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/Chunk.java
|
||||
@@ -406,12 +406,12 @@ public class Chunk implements IChunkAccess {
|
||||
@ -1733,7 +1733,7 @@ index d6b34c6abebeac8445da3e76f341066952182e2b..fc07e2014e961da5d97095c4ee6f972e
|
||||
/*
|
||||
* If it's a new world, the first few chunks are generated inside
|
||||
diff --git a/src/main/java/net/minecraft/world/phys/Vec3D.java b/src/main/java/net/minecraft/world/phys/Vec3D.java
|
||||
index 3fe1508b091e1fd0325eae50138d02fa6445c9ff..a19a26a88f247d359354902efeece9923f3e0e0b 100644
|
||||
index 3fe1508b0..a19a26a88 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/Vec3D.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/Vec3D.java
|
||||
@@ -14,6 +14,12 @@ public class Vec3D implements IPosition {
|
||||
@ -1750,7 +1750,7 @@ index 3fe1508b091e1fd0325eae50138d02fa6445c9ff..a19a26a88f247d359354902efeece992
|
||||
return new Vec3D((double) baseblockposition.getX() + 0.5D, (double) baseblockposition.getY() + 0.5D, (double) baseblockposition.getZ() + 0.5D);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 7a94e9efddbffca4627a0685e2baee8e7d6a3176..41ee7b1f2fe9a220abe1d96749887ad9babe9f95 100644
|
||||
index 7a94e9efd..41ee7b1f2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2701,14 +2701,14 @@ public class CraftWorld implements World {
|
||||
@ -1795,7 +1795,7 @@ index 7a94e9efddbffca4627a0685e2baee8e7d6a3176..41ee7b1f2fe9a220abe1d96749887ad9
|
||||
// Spigot start
|
||||
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e5549439b3d4d608cf37dd33b6c8c9e10dfe9328..45e786565ac988abadffda2e7ba3ff1e2880b786 100644
|
||||
index e5549439b..45e786565 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2257,15 +2257,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -1871,3 +1871,6 @@ index e5549439b3d4d608cf37dd33b6c8c9e10dfe9328..45e786565ac988abadffda2e7ba3ff1e
|
||||
|
||||
@Override
|
||||
public <T> T getClientOption(ClientOption<T> type) {
|
||||
--
|
||||
2.31.1
|
||||
|
||||
|
@ -8,7 +8,7 @@ that occured from the getChunkAt call, we would either
|
||||
add to the wrong chunk or add to both chunks! not good.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
index aaf6ada41ba00f891027ca46883a23c06c295c2b..a42d3c6c227a74d691278a65a9c516f6507b6865 100644
|
||||
index 84b4b7524064a4f0c175f34778e4e0d8004888ea..fcf9af44702f34d75185eee0b3259fe0e57001b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||
@@ -1572,7 +1572,35 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Stop large move vectors in player packet handling from
|
||||
Looks like we need to check three vectors, not two. fun.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
index c4ab9593d0f781b5d3c546b79cdd232478981577..53320d1d134305c0b37442dfca9931629a6d196d 100644
|
||||
index 40a7f69e5e14078977ef615abf3a0f1f61d76f9f..83ad913e46f44aabb41b7e441cba2ef2f7bcbc46 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||
@@ -542,6 +542,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -540,6 +540,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
double currDeltaZ = toZ - fromZ;
|
||||
double d10 = Math.max(d6 * d6 + d7 * d7 + d8 * d8, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
|
||||
// Paper end - fix large move vectors killing the server
|
||||
@ -23,7 +23,7 @@ index c4ab9593d0f781b5d3c546b79cdd232478981577..53320d1d134305c0b37442dfca993162
|
||||
|
||||
|
||||
// CraftBukkit start - handle custom speeds and skipped ticks
|
||||
@@ -588,9 +594,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -586,9 +592,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
//boolean flag = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D)); // Tuinity - replace with different checks
|
||||
AxisAlignedBB oldBox = entity.getBoundingBox(); // Tuinity - copy from player movement packet
|
||||
|
||||
@ -36,7 +36,7 @@ index c4ab9593d0f781b5d3c546b79cdd232478981577..53320d1d134305c0b37442dfca993162
|
||||
entity.move(EnumMoveType.PLAYER, new Vec3D(d6, d7, d8));
|
||||
boolean didCollide = toX != entity.locX() || toY != entity.locY() || toZ != entity.locZ(); // Tuinity - needed here as the difference in Y can be reset - also note: this is only a guess at whether collisions took place, floating point errors can make this true when it shouldn't be...
|
||||
double d11 = d7;
|
||||
@@ -1295,6 +1301,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1293,6 +1299,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
double currDeltaZ = toZ - prevZ;
|
||||
double d11 = Math.max(d7 * d7 + d8 * d8 + d9 * d9, (currDeltaX * currDeltaX + currDeltaY * currDeltaY + currDeltaZ * currDeltaZ) - 1);
|
||||
// Paper end - fix large move vectors killing the server
|
||||
@ -49,7 +49,7 @@ index c4ab9593d0f781b5d3c546b79cdd232478981577..53320d1d134305c0b37442dfca993162
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d11 > 1.0D) {
|
||||
@@ -1346,9 +1358,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1344,9 +1356,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
AxisAlignedBB axisalignedbb = this.player.getBoundingBox(); // Tuinity - diff on change, should be old AABB
|
||||
|
||||
|
@ -166,7 +166,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..b28995ecfd7f45e6b6197be96c418aa0
|
||||
|
||||
protected PlayerChunkMap.a e() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 41ee7b1f2fe9a220abe1d96749887ad9babe9f95..02807cc1fe14e747a7c18edf0fcdc38630cc4e9f 100644
|
||||
index 91005e112950d79e1120e5595570970b94cd3c67..385f369ecd5e130d2951d56c48dc06b490e0f4fd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -298,7 +298,7 @@ public class CraftWorld implements World {
|
@ -15,7 +15,7 @@ will be more effective, since more time will be allocated
|
||||
to actually processing chunk tasks vs the ticket level updates.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index ad90735b5daa658cdd5467eadcb29183d018b1fd..a5fc023312c99e591fc269999c28a766a46f8849 100644
|
||||
index db8532c42fcb2e96f4b3491352d1b9a25a8efe49..b713ff9cae31e075c9df39de52ce4515cb1e8622 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -8,6 +8,7 @@ import it.unimi.dsi.fastutil.longs.Long2ByteOpenHashMap;
|
@ -1,4 +1,4 @@
|
||||
name=Tuinity
|
||||
useBlackList=True
|
||||
list=server/Make-sure-to-remove-correct-TE-during-TE-tick.patch,server/Prevent-light-queue-overfill-when-no-players-are-onl.patch,server/Do-not-schedule-poi-task-for-each-block-write-on-chu.patch
|
||||
list=server/Make-sure-to-remove-correct-TE-during-TE-tick.patch,server/Prevent-light-queue-overfill-when-no-players-are-onl.patch,server/Do-not-schedule-poi-task-for-each-block-write-on-chu.patch,server/Do-not-schedule-poi-task-for-each-block-write-on-chu.patch
|
||||
branch=origin/master
|
||||
|
Loading…
Reference in New Issue
Block a user