mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 17:37:45 +01:00
Improve Async Login so pending connections dont get exposed
We still keep vanilla process of waiting for existing session to be removed before logging in by storing a separate map of pending. also fire the callback using executor incase further recursion causes any trouble
This commit is contained in:
parent
f275e9cb9c
commit
cb15cfa4f8
@ -1,4 +1,4 @@
|
|||||||
From 14de9d711e280f43a4c18b4f295eef6407d99f80 Mon Sep 17 00:00:00 2001
|
From a3cb7f33acca0c854544f6d17d0e9407b1cd418e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||||
Subject: [PATCH] MC Utils
|
Subject: [PATCH] MC Utils
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] MC Utils
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java b/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java b/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..4029dc68c
|
index 0000000000..4029dc68cf
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/concurrent/WeakSeqLock.java
|
||||||
@@ -0,0 +1,68 @@
|
@@ -0,0 +1,68 @@
|
||||||
@ -80,7 +80,7 @@ index 000000000..4029dc68c
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..59868f37d
|
index 0000000000..59868f37d1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Int.java
|
||||||
@@ -0,0 +1,162 @@
|
@@ -0,0 +1,162 @@
|
||||||
@ -248,7 +248,7 @@ index 000000000..59868f37d
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..07685b6bd
|
index 0000000000..07685b6bd5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/map/QueuedChangesMapLong2Object.java
|
||||||
@@ -0,0 +1,172 @@
|
@@ -0,0 +1,172 @@
|
||||||
@ -426,7 +426,7 @@ index 000000000..07685b6bd
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..4eac05778
|
index 0000000000..4eac057786
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/ChunkList.java
|
||||||
@@ -0,0 +1,129 @@
|
@@ -0,0 +1,129 @@
|
||||||
@ -561,7 +561,7 @@ index 000000000..4eac05778
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java b/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java b/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..cdda74564
|
index 0000000000..cdda74564c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/EntityList.java
|
||||||
@@ -0,0 +1,128 @@
|
@@ -0,0 +1,128 @@
|
||||||
@ -695,7 +695,7 @@ index 000000000..cdda74564
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java b/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java b/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..84ef8d9ec
|
index 0000000000..84ef8d9eca
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/maplist/IBlockDataList.java
|
||||||
@@ -0,0 +1,128 @@
|
@@ -0,0 +1,128 @@
|
||||||
@ -829,7 +829,7 @@ index 000000000..84ef8d9ec
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java b/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java b/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..c3b936f54
|
index 0000000000..c3b936f54b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/math/IntegerUtil.java
|
||||||
@@ -0,0 +1,230 @@
|
@@ -0,0 +1,230 @@
|
||||||
@ -1065,7 +1065,7 @@ index 000000000..c3b936f54
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..f625da9f0
|
index 0000000000..f625da9f09
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java
|
||||||
@@ -0,0 +1,409 @@
|
@@ -0,0 +1,409 @@
|
||||||
@ -1480,7 +1480,7 @@ index 000000000..f625da9f0
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..3f86c1ad4
|
index 0000000000..3f86c1ad43
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/DistanceTrackingAreaMap.java
|
||||||
@@ -0,0 +1,175 @@
|
@@ -0,0 +1,175 @@
|
||||||
@ -1661,7 +1661,7 @@ index 000000000..3f86c1ad4
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..8a552a87a
|
index 0000000000..8a552a87ab
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PlayerAreaMap.java
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,27 @@
|
||||||
@ -1694,7 +1694,7 @@ index 000000000..8a552a87a
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..0292afc52
|
index 0000000000..0292afc522
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PlayerDistanceTrackingAreaMap.java
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,24 @@
|
||||||
@ -1724,7 +1724,7 @@ index 000000000..0292afc52
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java b/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java b/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..e51104e65
|
index 0000000000..e51104e65a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/misc/PooledLinkedHashSets.java
|
||||||
@@ -0,0 +1,287 @@
|
@@ -0,0 +1,287 @@
|
||||||
@ -2017,7 +2017,7 @@ index 000000000..e51104e65
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java b/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java b/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..9df0006c1
|
index 0000000000..9df0006c1a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/set/OptimizedSmallEnumSet.java
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,67 @@
|
||||||
@ -2089,7 +2089,7 @@ index 000000000..9df0006c1
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||||
index 4f60b931a..f427953a8 100644
|
index 4f60b931a1..f427953a83 100644
|
||||||
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||||
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
|
||||||
@@ -186,6 +186,7 @@ public class AxisAlignedBB {
|
@@ -186,6 +186,7 @@ public class AxisAlignedBB {
|
||||||
@ -2101,7 +2101,7 @@ index 4f60b931a..f427953a8 100644
|
|||||||
return this.a(axisalignedbb.minX, axisalignedbb.minY, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.maxY, axisalignedbb.maxZ);
|
return this.a(axisalignedbb.minX, axisalignedbb.minY, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.maxY, axisalignedbb.maxZ);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||||
index eff6ebcd3..30cbfc8ea 100644
|
index eff6ebcd30..30cbfc8eac 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockAccessAir.java
|
--- a/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
+++ b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||||
@@ -14,6 +14,18 @@ public enum BlockAccessAir implements IBlockAccess {
|
@@ -14,6 +14,18 @@ public enum BlockAccessAir implements IBlockAccess {
|
||||||
@ -2124,7 +2124,7 @@ index eff6ebcd3..30cbfc8ea 100644
|
|||||||
public IBlockData getType(BlockPosition blockposition) {
|
public IBlockData getType(BlockPosition blockposition) {
|
||||||
return Blocks.AIR.getBlockData();
|
return Blocks.AIR.getBlockData();
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||||
index 1cf97cefc..2040f1834 100644
|
index 1cf97cefc9..2040f18349 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||||
@@ -78,6 +78,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
|
@@ -78,6 +78,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
|
||||||
@ -2136,7 +2136,7 @@ index 1cf97cefc..2040f1834 100644
|
|||||||
return this.d.containsKey(iblockstate);
|
return this.d.containsKey(iblockstate);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index c88a62f6b..5dbd3e60f 100644
|
index c88a62f6b7..5dbd3e60fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
@@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||||
@ -2191,7 +2191,7 @@ index c88a62f6b..5dbd3e60f 100644
|
|||||||
this.d = i;
|
this.d = i;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 55373cae0..c50fe1c24 100644
|
index 55373cae07..c50fe1c245 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
|
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
@ -2408,7 +2408,7 @@ index 55373cae0..c50fe1c24 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
index 11c4d23ba..53c15c1c0 100644
|
index 11c4d23ba9..53c15c1c0b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
@@ -8,7 +8,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
@@ -8,7 +8,7 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||||
@ -2442,7 +2442,7 @@ index 11c4d23ba..53c15c1c0 100644
|
|||||||
@Override
|
@Override
|
||||||
public TileEntity getTileEntity(BlockPosition blockposition) {
|
public TileEntity getTileEntity(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
index 260644bf0..f2a19acd8 100644
|
index 260644bf0b..f2a19acd84 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
@@ -31,7 +31,9 @@ public class ChunkCoordIntPair {
|
@@ -31,7 +31,9 @@ public class ChunkCoordIntPair {
|
||||||
@ -2457,7 +2457,7 @@ index 260644bf0..f2a19acd8 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 32c496fa8..940bcf6ab 100644
|
index 32c496fa88..ba2af2abe2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -23,7 +23,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -23,7 +23,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
@ -2469,7 +2469,7 @@ index 32c496fa8..940bcf6ab 100644
|
|||||||
private final LightEngineThreaded lightEngine;
|
private final LightEngineThreaded lightEngine;
|
||||||
private final ChunkProviderServer.a serverThreadQueue;
|
private final ChunkProviderServer.a serverThreadQueue;
|
||||||
public final PlayerChunkMap playerChunkMap;
|
public final PlayerChunkMap playerChunkMap;
|
||||||
@@ -35,6 +35,167 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -35,6 +35,169 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
private final ChunkStatus[] cacheStatus = new ChunkStatus[4];
|
private final ChunkStatus[] cacheStatus = new ChunkStatus[4];
|
||||||
private final IChunkAccess[] cacheChunk = new IChunkAccess[4];
|
private final IChunkAccess[] cacheChunk = new IChunkAccess[4];
|
||||||
|
|
||||||
@ -2615,7 +2615,9 @@ index 32c496fa8..940bcf6ab 100644
|
|||||||
+
|
+
|
||||||
+ try {
|
+ try {
|
||||||
+ if (onLoad != null) {
|
+ if (onLoad != null) {
|
||||||
+ onLoad.accept(either == null ? null : either.left().orElse(null)); // indicate failure to the callback.
|
+ playerChunkMap.callbackExecutor.execute(() -> {
|
||||||
|
+ onLoad.accept(either == null ? null : either.left().orElse(null)); // indicate failure to the callback.
|
||||||
|
+ });
|
||||||
+ }
|
+ }
|
||||||
+ } catch (Throwable thr) {
|
+ } catch (Throwable thr) {
|
||||||
+ if (thr instanceof ThreadDeath) {
|
+ if (thr instanceof ThreadDeath) {
|
||||||
@ -2637,7 +2639,7 @@ index 32c496fa8..940bcf6ab 100644
|
|||||||
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
||||||
this.world = worldserver;
|
this.world = worldserver;
|
||||||
this.serverThreadQueue = new ChunkProviderServer.a(worldserver);
|
this.serverThreadQueue = new ChunkProviderServer.a(worldserver);
|
||||||
@@ -77,6 +238,49 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -77,6 +240,49 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.cacheChunk[0] = ichunkaccess;
|
this.cacheChunk[0] = ichunkaccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2688,7 +2690,7 @@ index 32c496fa8..940bcf6ab 100644
|
|||||||
@Override
|
@Override
|
||||||
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
index 7ca3a1d0c..2edd9b871 100644
|
index 7ca3a1d0c5..2edd9b8714 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
@@ -83,6 +83,7 @@ public class DataBits {
|
@@ -83,6 +83,7 @@ public class DataBits {
|
||||||
@ -2700,7 +2702,7 @@ index 7ca3a1d0c..2edd9b871 100644
|
|||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
index 75ba69886..45403fbe3 100644
|
index 75ba698868..45403fbe30 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
@@ -4,10 +4,12 @@ import javax.annotation.Nullable;
|
@@ -4,10 +4,12 @@ import javax.annotation.Nullable;
|
||||||
@ -2717,7 +2719,7 @@ index 75ba69886..45403fbe3 100644
|
|||||||
T a(int i);
|
T a(int i);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
index 774a8f543..d5f5a5187 100644
|
index 774a8f5434..d5f5a51872 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
@@ -11,7 +11,7 @@ import java.util.stream.Collectors;
|
@@ -11,7 +11,7 @@ import java.util.stream.Collectors;
|
||||||
@ -2759,7 +2761,7 @@ index 774a8f543..d5f5a5187 100644
|
|||||||
this.a();
|
this.a();
|
||||||
packetdataserializer.writeByte(this.i);
|
packetdataserializer.writeByte(this.i);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
index fe69161e5..b40c8d2f8 100644
|
index fe69161e5b..b40c8d2f83 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
@@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
@@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||||
@ -2772,7 +2774,7 @@ index fe69161e5..b40c8d2f8 100644
|
|||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index bdfb17385..0b06fa2b6 100644
|
index bdfb173853..0b06fa2b66 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -146,6 +146,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -146,6 +146,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
@ -2784,7 +2786,7 @@ index bdfb17385..0b06fa2b6 100644
|
|||||||
// CraftBukkit start - fire event
|
// CraftBukkit start - fire event
|
||||||
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 3b1bcf349..1f350e335 100644
|
index 3b1bcf3495..1f350e3352 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -129,6 +129,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -129,6 +129,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
@ -2796,7 +2798,7 @@ index 3b1bcf349..1f350e335 100644
|
|||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
index 00c3b666d..e5322fbae 100644
|
index 00c3b666d7..e5322fbae5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
@@ -5,6 +5,7 @@ import java.util.function.Predicate;
|
@@ -5,6 +5,7 @@ import java.util.function.Predicate;
|
||||||
@ -2808,7 +2810,7 @@ index 00c3b666d..e5322fbae 100644
|
|||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.f = 5;
|
this.f = 5;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index ce4821092..57ce9bde6 100644
|
index ce48210922..57ce9bde64 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -87,6 +87,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -87,6 +87,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -2830,7 +2832,7 @@ index ce4821092..57ce9bde6 100644
|
|||||||
this.displayName = this.getName();
|
this.displayName = this.getName();
|
||||||
this.canPickUpLoot = true;
|
this.canPickUpLoot = true;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
index 29e776ca1..4328273b1 100644
|
index 29e776ca19..4328273b1f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
|
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
|
||||||
@ -2853,7 +2855,7 @@ index 29e776ca1..4328273b1 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||||
index 1890c760f..7e5ece9d5 100644
|
index 1890c760f9..7e5ece9d50 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||||
@@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
@@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
||||||
@ -2873,7 +2875,7 @@ index 1890c760f..7e5ece9d5 100644
|
|||||||
this.d.add(r0);
|
this.d.add(r0);
|
||||||
LockSupport.unpark(this.getThread());
|
LockSupport.unpark(this.getThread());
|
||||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||||
index 3b0877080..0dff02352 100644
|
index 3b08770801..0dff023529 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||||
@@ -9,10 +9,24 @@ public interface IBlockAccess {
|
@@ -9,10 +9,24 @@ public interface IBlockAccess {
|
||||||
@ -2902,7 +2904,7 @@ index 3b0877080..0dff02352 100644
|
|||||||
return this.getType(blockposition).h();
|
return this.getType(blockposition).h();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java
|
diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java
|
||||||
index c5658c077..b90baef0f 100644
|
index c5658c0779..b90baef0f5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IOWorker.java
|
--- a/src/main/java/net/minecraft/server/IOWorker.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IOWorker.java
|
+++ b/src/main/java/net/minecraft/server/IOWorker.java
|
||||||
@@ -22,7 +22,7 @@ public class IOWorker implements AutoCloseable {
|
@@ -22,7 +22,7 @@ public class IOWorker implements AutoCloseable {
|
||||||
@ -2915,7 +2917,7 @@ index c5658c077..b90baef0f 100644
|
|||||||
private boolean g = true;
|
private boolean g = true;
|
||||||
private CompletableFuture<Void> h = new CompletableFuture();
|
private CompletableFuture<Void> h = new CompletableFuture();
|
||||||
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
|
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
|
||||||
index ba315131e..cbe2aa4c0 100644
|
index ba315131e1..cbe2aa4c0a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IWorldReader.java
|
--- a/src/main/java/net/minecraft/server/IWorldReader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
|
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
|
||||||
@@ -4,6 +4,7 @@ import javax.annotation.Nullable;
|
@@ -4,6 +4,7 @@ import javax.annotation.Nullable;
|
||||||
@ -2927,7 +2929,7 @@ index ba315131e..cbe2aa4c0 100644
|
|||||||
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
|
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index 75308712d..aa7501d36 100644
|
index 75308712d0..aa7501d366 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
|
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
|
||||||
@ -2987,7 +2989,7 @@ index 75308712d..aa7501d36 100644
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..9fb9a96cc
|
index 0000000000..9fb9a96ccb
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -0,0 +1,414 @@
|
@@ -0,0 +1,414 @@
|
||||||
@ -3406,7 +3408,7 @@ index 000000000..9fb9a96cc
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
index e85b24a32..75604dbc6 100644
|
index e85b24a327..75604dbc69 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
@@ -60,7 +60,7 @@ public class NBTTagCompound implements NBTBase {
|
@@ -60,7 +60,7 @@ public class NBTTagCompound implements NBTBase {
|
||||||
@ -3435,7 +3437,7 @@ index e85b24a32..75604dbc6 100644
|
|||||||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 6700582e3..3ccf16636 100644
|
index 6700582e36..3ccf166366 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -159,6 +159,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -159,6 +159,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
@ -3467,7 +3469,7 @@ index 6700582e3..3ccf16636 100644
|
|||||||
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||||
this.a = packet;
|
this.a = packet;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
index 81b6f4581..d9574a9ac 100644
|
index 81b6f4581f..d9574a9ace 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||||
@ -3479,7 +3481,7 @@ index 81b6f4581..d9574a9ac 100644
|
|||||||
for (int j = 1; j < 5; ++j) {
|
for (int j = 1; j < 5; ++j) {
|
||||||
if ((i & -1 << j * 7) == 0) {
|
if ((i & -1 << j * 7) == 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
|
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||||
index 90223deae..63c4dbd32 100644
|
index 90223deae3..63c4dbd327 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketEncoder.java
|
--- a/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java
|
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||||
@@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
@@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||||
@ -3491,7 +3493,7 @@ index 90223deae..63c4dbd32 100644
|
|||||||
throw new SkipEncodeException(throwable);
|
throw new SkipEncodeException(throwable);
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
index 677e3e5f6..3a1d0deb0 100644
|
index 677e3e5f68..3a1d0deb0d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
@@ -17,7 +17,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -17,7 +17,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
@ -3512,7 +3514,7 @@ index 677e3e5f6..3a1d0deb0 100644
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
ChunkSection[] achunksection = chunk.getSections();
|
ChunkSection[] achunksection = chunk.getSections();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index 5c5bf010d..6e9f402fb 100644
|
index 5c5bf010d0..6e9f402fb0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -19,9 +19,9 @@ public class PlayerChunk {
|
@@ -19,9 +19,9 @@ public class PlayerChunk {
|
||||||
@ -3702,7 +3704,7 @@ index 5c5bf010d..6e9f402fb 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 7ad30548e..93d838ec2 100644
|
index 7ad30548e2..93d838ec2d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -99,6 +99,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -99,6 +99,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -3751,7 +3753,7 @@ index 7ad30548e..93d838ec2 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 0c496ee0a..6a681d694 100644
|
index 0c496ee0a0..6a681d694e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
@ -3768,7 +3770,7 @@ index 0c496ee0a..6a681d694 100644
|
|||||||
private volatile int chatThrottle;
|
private volatile int chatThrottle;
|
||||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||||
index 08768a3c8..d103cfaac 100644
|
index 08768a3c87..d103cfaace 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
|
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
|
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||||
@@ -17,7 +17,7 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
|
@@ -17,7 +17,7 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
|
||||||
@ -3781,7 +3783,7 @@ index 08768a3c8..d103cfaac 100644
|
|||||||
public final EntityHuman player;
|
public final EntityHuman player;
|
||||||
private ItemStack carried;
|
private ItemStack carried;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java
|
diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||||
index b3824898d..bf4172be5 100644
|
index b3824898da..bf4172be52 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PotionUtil.java
|
--- a/src/main/java/net/minecraft/server/PotionUtil.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PotionUtil.java
|
+++ b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||||
@@ -110,6 +110,7 @@ public class PotionUtil {
|
@@ -110,6 +110,7 @@ public class PotionUtil {
|
||||||
@ -3793,7 +3795,7 @@ index b3824898d..bf4172be5 100644
|
|||||||
MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry);
|
MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
index 6e65306a2..39339fa27 100644
|
index 6e65306a27..39339fa275 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
@@ -80,6 +80,18 @@ public class ProtoChunk implements IChunkAccess {
|
@@ -80,6 +80,18 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
@ -3816,7 +3818,7 @@ index 6e65306a2..39339fa27 100644
|
|||||||
public IBlockData getType(BlockPosition blockposition) {
|
public IBlockData getType(BlockPosition blockposition) {
|
||||||
int i = blockposition.getY();
|
int i = blockposition.getY();
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index 7b6e0e86b..187c4e0f5 100644
|
index 7b6e0e86b0..187c4e0f58 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -88,6 +88,7 @@ public class RegionFile implements AutoCloseable {
|
@@ -88,6 +88,7 @@ public class RegionFile implements AutoCloseable {
|
||||||
@ -3828,7 +3830,7 @@ index 7b6e0e86b..187c4e0f5 100644
|
|||||||
public synchronized DataInputStream a(ChunkCoordIntPair chunkcoordintpair) throws IOException {
|
public synchronized DataInputStream a(ChunkCoordIntPair chunkcoordintpair) throws IOException {
|
||||||
int i = this.getOffset(chunkcoordintpair);
|
int i = this.getOffset(chunkcoordintpair);
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||||
index 8c123f265..9d0e8c2d4 100644
|
index 8c123f265e..9d0e8c2d43 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||||
@@ -108,6 +108,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
|
@@ -108,6 +108,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
|
||||||
@ -3859,7 +3861,7 @@ index 8c123f265..9d0e8c2d4 100644
|
|||||||
public IBlockData getType(BlockPosition blockposition) {
|
public IBlockData getType(BlockPosition blockposition) {
|
||||||
return this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4).getType(blockposition);
|
return this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4).getType(blockposition);
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
index 4efcb8b59..60948afa4 100644
|
index 4efcb8b595..60948afa4e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
@@ -57,6 +57,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
@@ -57,6 +57,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||||
@ -3871,7 +3873,7 @@ index 4efcb8b59..60948afa4 100644
|
|||||||
return this.b.size();
|
return this.b.size();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
index 7b92ecfff..7e224ebef 100644
|
index 7b92ecfff9..7e224ebeff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||||
@@ -58,7 +58,7 @@ public class SystemUtils {
|
@@ -58,7 +58,7 @@ public class SystemUtils {
|
||||||
@ -3884,7 +3886,7 @@ index 7b92ecfff..7e224ebef 100644
|
|||||||
|
|
||||||
public static long getTimeMillis() {
|
public static long getTimeMillis() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
|
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
|
||||||
index f82db93f8..75ab9f185 100644
|
index f82db93f88..75ab9f185b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TicketType.java
|
--- a/src/main/java/net/minecraft/server/TicketType.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TicketType.java
|
+++ b/src/main/java/net/minecraft/server/TicketType.java
|
||||||
@@ -21,6 +21,7 @@ public class TicketType<T> {
|
@@ -21,6 +21,7 @@ public class TicketType<T> {
|
||||||
@ -3896,7 +3898,7 @@ index f82db93f8..75ab9f185 100644
|
|||||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||||
return new TicketType<>(s, comparator, 0L);
|
return new TicketType<>(s, comparator, 0L);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 2e1eabba1..2a4fa455f 100644
|
index 2e1eabba14..2a4fa455ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
@@ -22,6 +22,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||||
@ -3960,7 +3962,7 @@ index 2e1eabba1..2a4fa455f 100644
|
|||||||
|
|
||||||
return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0));
|
return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0));
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index d5014abc9..8a5ac6f69 100644
|
index d5014abc9d..8a5ac6f69b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -973,6 +973,7 @@ public class WorldServer extends World {
|
@@ -973,6 +973,7 @@ public class WorldServer extends World {
|
||||||
@ -3980,7 +3982,7 @@ index d5014abc9..8a5ac6f69 100644
|
|||||||
|
|
||||||
this.getScoreboard().a(entity);
|
this.getScoreboard().a(entity);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index e181df6f4..4a9132c70 100644
|
index e181df6f4d..4a9132c701 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
|
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
|
||||||
@ -3992,7 +3994,7 @@ index e181df6f4..4a9132c70 100644
|
|||||||
/**
|
/**
|
||||||
* Mirror
|
* Mirror
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||||
index d8358a0f0..d0b813008 100644
|
index d8358a0f03..d0b813008c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||||
@@ -196,4 +196,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
@@ -196,4 +196,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||||
@ -4019,7 +4021,7 @@ index d8358a0f0..d0b813008 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||||
index 1aec70a1f..f72c13bed 100644
|
index 1aec70a1f1..f72c13beda 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
|
||||||
@@ -17,7 +17,7 @@ import java.util.RandomAccess;
|
@@ -17,7 +17,7 @@ import java.util.RandomAccess;
|
||||||
@ -4032,5 +4034,5 @@ index 1aec70a1f..f72c13bed 100644
|
|||||||
private int initialCapacity;
|
private int initialCapacity;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.26.0
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From a54de5bf0eab573c121f0c1a342bc4685bbe18a6 Mon Sep 17 00:00:00 2001
|
From b633da3b27d8d9d4be6dad68c36f7c9cfed403cb Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||||
Subject: [PATCH] Timings v2
|
Subject: [PATCH] Timings v2
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
|
|||||||
|
|
||||||
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..69e26a826
|
index 0000000000..69e26a8267
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
@@ -0,0 +1,141 @@
|
@@ -0,0 +1,141 @@
|
||||||
@ -153,7 +153,7 @@ index 000000000..69e26a826
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..27ce4a828
|
index 0000000000..27ce4a828e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
@@ -0,0 +1,126 @@
|
@@ -0,0 +1,126 @@
|
||||||
@ -284,7 +284,7 @@ index 000000000..27ce4a828
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index b6d470e59..f402a29b0 100644
|
index b6d470e594..f402a29b09 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
|
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
|
||||||
@ -331,7 +331,7 @@ index b6d470e59..f402a29b0 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||||
index cd72a9c84..5de881371 100644
|
index cd72a9c845..5de881371a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Block.java
|
--- a/src/main/java/net/minecraft/server/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||||
@@ -31,6 +31,15 @@ public class Block implements IMaterial {
|
@@ -31,6 +31,15 @@ public class Block implements IMaterial {
|
||||||
@ -351,7 +351,7 @@ index cd72a9c84..5de881371 100644
|
|||||||
private final float frictionFactor;
|
private final float frictionFactor;
|
||||||
private final float f;
|
private final float f;
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 2b6fe2e01..87c5e09a5 100644
|
index 2b6fe2e01d..87c5e09a59 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -675,6 +675,7 @@ public class Chunk implements IChunkAccess {
|
@@ -675,6 +675,7 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -371,10 +371,10 @@ index 2b6fe2e01..87c5e09a5 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 940bcf6ab..5bc7e86ef 100644
|
index ba2af2abe2..a653ce4ce5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -306,11 +306,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -308,11 +308,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.c("getChunkCacheMiss");
|
gameprofilerfiller.c("getChunkCacheMiss");
|
||||||
@ -390,7 +390,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||||
return ichunkaccess1;
|
return ichunkaccess1;
|
||||||
}, (playerchunk_failure) -> {
|
}, (playerchunk_failure) -> {
|
||||||
@@ -503,7 +505,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -505,7 +507,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
|
|
||||||
public void save(boolean flag) {
|
public void save(boolean flag) {
|
||||||
this.tickDistanceManager();
|
this.tickDistanceManager();
|
||||||
@ -400,7 +400,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -540,7 +544,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -542,7 +546,9 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.tickDistanceManager();
|
this.tickDistanceManager();
|
||||||
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
||||||
this.world.getMethodProfiler().exitEnter("chunks");
|
this.world.getMethodProfiler().exitEnter("chunks");
|
||||||
@ -410,7 +410,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
||||||
this.world.getMethodProfiler().exitEnter("unload");
|
this.world.getMethodProfiler().exitEnter("unload");
|
||||||
this.playerChunkMap.unloadChunks(booleansupplier);
|
this.playerChunkMap.unloadChunks(booleansupplier);
|
||||||
@@ -571,10 +577,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -573,10 +579,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
||||||
@ -423,7 +423,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
this.playerChunkMap.f().forEach((playerchunk) -> {
|
this.playerChunkMap.f().forEach((playerchunk) -> {
|
||||||
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||||
@@ -583,11 +591,14 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -585,11 +593,14 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
Chunk chunk = (Chunk) optional.get();
|
Chunk chunk = (Chunk) optional.get();
|
||||||
|
|
||||||
this.world.getMethodProfiler().enter("broadcast");
|
this.world.getMethodProfiler().enter("broadcast");
|
||||||
@ -438,7 +438,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
chunk.setInhabitedTime(chunk.getInhabitedTime() + j);
|
chunk.setInhabitedTime(chunk.getInhabitedTime() + j);
|
||||||
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
|
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
|
||||||
this.world.getMethodProfiler().enter("spawner");
|
this.world.getMethodProfiler().enter("spawner");
|
||||||
@@ -638,24 +649,24 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -640,24 +651,24 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +468,7 @@ index 940bcf6ab..5bc7e86ef 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index e16d30f2c..4af5a230b 100644
|
index e16d30f2ca..4af5a230ba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -506,7 +506,7 @@ index e16d30f2c..4af5a230b 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
|
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
index 8d7a6d240..707bd2600 100644
|
index 8d7a6d2403..707bd2600d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CustomFunction.java
|
--- a/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
|
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
@@ -13,12 +13,22 @@ public class CustomFunction {
|
@@ -13,12 +13,22 @@ public class CustomFunction {
|
||||||
@ -533,7 +533,7 @@ index 8d7a6d240..707bd2600 100644
|
|||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||||
index ba40d5fbb..ee42e1dfa 100644
|
index ba40d5fbb5..ee42e1dfa4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||||
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||||
@@ -103,7 +103,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
@@ -103,7 +103,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
||||||
@ -546,7 +546,7 @@ index ba40d5fbb..ee42e1dfa 100644
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
CustomFunction.c[] acustomfunction_c = customfunction.b();
|
CustomFunction.c[] acustomfunction_c = customfunction.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index 9eed98e37..d6646d7e6 100644
|
index 9eed98e379..d6646d7e61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
@@ -20,6 +20,8 @@ import java.util.List;
|
@@ -20,6 +20,8 @@ import java.util.List;
|
||||||
@ -634,7 +634,7 @@ index 9eed98e37..d6646d7e6 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 2890e8121..e9d0a4eb9 100644
|
index 2890e8121d..e9d0a4eb90 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
||||||
@ -673,7 +673,7 @@ index 2890e8121..e9d0a4eb9 100644
|
|||||||
|
|
||||||
protected BlockPosition ag() {
|
protected BlockPosition ag() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 1f350e335..35e3f1c78 100644
|
index 1f350e3352..35e3f1c78d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -37,7 +37,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -37,7 +37,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
@ -749,7 +749,7 @@ index 1f350e335..35e3f1c78 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index b4a0bd795..456d03be2 100644
|
index b4a0bd7951..456d03be22 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||||
@ -938,7 +938,7 @@ index b4a0bd795..456d03be2 100644
|
|||||||
this.methodProfiler.exit();
|
this.methodProfiler.exit();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 93d838ec2..2a6955f85 100644
|
index 93d838ec2d..2a6955f855 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -1,7 +1,9 @@
|
@@ -1,7 +1,9 @@
|
||||||
@ -1021,7 +1021,7 @@ index 93d838ec2..2a6955f85 100644
|
|||||||
|
|
||||||
protected void broadcast(Entity entity, Packet<?> packet) {
|
protected void broadcast(Entity entity, Packet<?> packet) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 6a681d694..914366afc 100644
|
index 6a681d694e..914366afcd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
|
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||||
@ -1076,7 +1076,7 @@ index 6a681d694..914366afc 100644
|
|||||||
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
|
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
index 2c671629a..eb3269e0e 100644
|
index 2c671629a4..eb3269e0ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||||
@ -1103,7 +1103,7 @@ index 2c671629a..eb3269e0e 100644
|
|||||||
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
|
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index 94ed83baf..f28be11ee 100644
|
index 94ed83baf0..f28be11eee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1127,7 +1127,7 @@ index 94ed83baf..f28be11ee 100644
|
|||||||
|
|
||||||
public WhiteList getWhitelist() {
|
public WhiteList getWhitelist() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
index 00bbd34b6..f533860bb 100644
|
index 00bbd34b6a..f533860bbe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TickListServer.java
|
+++ b/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
@@ -28,13 +28,18 @@ public class TickListServer<T> implements TickList<T> {
|
@@ -28,13 +28,18 @@ public class TickListServer<T> implements TickList<T> {
|
||||||
@ -1177,7 +1177,7 @@ index 00bbd34b6..f533860bb 100644
|
|||||||
this.g.clear();
|
this.g.clear();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index 820180ab3..fa6400dcc 100644
|
index 820180ab3f..fa6400dccd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
|
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
|
||||||
@ -1196,7 +1196,7 @@ index 820180ab3..fa6400dcc 100644
|
|||||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||||
public CraftPersistentDataContainer persistentDataContainer;
|
public CraftPersistentDataContainer persistentDataContainer;
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 2a4fa455f..f572c5f22 100644
|
index 2a4fa455ff..f572c5f227 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1,5 +1,7 @@
|
@@ -1,5 +1,7 @@
|
||||||
@ -1252,7 +1252,7 @@ index 2a4fa455f..f572c5f22 100644
|
|||||||
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
|
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 8a5ac6f69..6810d49b1 100644
|
index 8a5ac6f69b..6810d49b17 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
@ -1397,7 +1397,7 @@ index 8a5ac6f69..6810d49b1 100644
|
|||||||
|
|
||||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 8d1f066f0..f3eacb181 100644
|
index 8d1f066f00..f3eacb1819 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1973,12 +1973,31 @@ public final class CraftServer implements Server {
|
@@ -1973,12 +1973,31 @@ public final class CraftServer implements Server {
|
||||||
@ -1434,7 +1434,7 @@ index 8d1f066f0..f3eacb181 100644
|
|||||||
org.spigotmc.RestartCommand.restart();
|
org.spigotmc.RestartCommand.restart();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 2bd22a369..000000000
|
index 2bd22a3698..0000000000
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,162 +0,0 @@
|
@@ -1,162 +0,0 @@
|
||||||
@ -1601,7 +1601,7 @@ index 2bd22a369..000000000
|
|||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 4fed5dc92..d7a4e50f2 100644
|
index 4fed5dc92f..d7a4e50f23 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1718,6 +1718,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1718,6 +1718,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@ -1620,7 +1620,7 @@ index 4fed5dc92..d7a4e50f2 100644
|
|||||||
|
|
||||||
public Player.Spigot spigot()
|
public Player.Spigot spigot()
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
index b90979c7b..8823f94f7 100644
|
index b90979c7ba..8823f94f7b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1686,7 +1686,7 @@ index b90979c7b..8823f94f7 100644
|
|||||||
|
|
||||||
private boolean isReady(final int currentTick) {
|
private boolean isReady(final int currentTick) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
index 3f55381c1..0d9a46680 100644
|
index 3f55381c15..0d9a466809 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
@@ -1,9 +1,11 @@
|
@@ -1,9 +1,11 @@
|
||||||
@ -1771,7 +1771,7 @@ index 3f55381c1..0d9a46680 100644
|
|||||||
- // Spigot end
|
- // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||||
index e52ef47b7..3d90b3426 100644
|
index e52ef47b78..3d90b34268 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||||
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
|
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
|
||||||
@ -1783,7 +1783,7 @@ index e52ef47b7..3d90b3426 100644
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 68728b4d8..02f330053 100644
|
index 68728b4d86..02f3300533 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -298,6 +298,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -298,6 +298,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
@ -1801,7 +1801,7 @@ index 68728b4d8..02f330053 100644
|
|||||||
* This helper class represents the different NBT Tags.
|
* This helper class represents the different NBT Tags.
|
||||||
* <p>
|
* <p>
|
||||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
index ca7789b5e..442383969 100644
|
index ca7789b5e0..4423839697 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;
|
@@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;
|
||||||
@ -1862,5 +1862,5 @@ index ca7789b5e..442383969 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.26.0
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 311435ed23ad169d182172814b2198d4cdd0b124 Mon Sep 17 00:00:00 2001
|
From cf9f9bf7ba786e33a1fa989f3c82325ca24a4ec3 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 14 Jan 2018 17:36:02 -0500
|
Date: Sun, 14 Jan 2018 17:36:02 -0500
|
||||||
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
|
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
|
||||||
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
|
|||||||
Also a highly more effecient way to blanket block spawns in a world
|
Also a highly more effecient way to blanket block spawns in a world
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 554013a9..05534126 100644
|
index 3d4d0d57c5..1d5245ab5b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -587,6 +587,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -589,6 +589,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
|
|
||||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
@ -29,7 +29,7 @@ index 554013a9..05534126 100644
|
|||||||
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 95e09e35..d8721ab2 100644
|
index 95e09e3519..d8721ab2f8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -48,7 +48,7 @@ index 95e09e35..d8721ab2 100644
|
|||||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> cachedSingleHashSet; // Paper
|
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> cachedSingleHashSet; // Paper
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 936fc4f6..fcf229ad 100644
|
index 936fc4f6b9..fcf229ad5d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -881,12 +881,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -881,12 +881,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -78,5 +78,5 @@ index 936fc4f6..fcf229ad 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 24f31d237a2e8bb14ce2bbc184190599107ef63d Mon Sep 17 00:00:00 2001
|
From 9d12499485c97ba0067afecd7f644a91352c2477 Mon Sep 17 00:00:00 2001
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
||||||
Subject: [PATCH] incremental chunk saving
|
Subject: [PATCH] incremental chunk saving
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 071e5e7f..48676152 100644
|
index 071e5e7f72..4867615215 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -487,4 +487,19 @@ public class PaperWorldConfig {
|
@@ -487,4 +487,19 @@ public class PaperWorldConfig {
|
||||||
@ -29,7 +29,7 @@ index 071e5e7f..48676152 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 23cc0c36..d6637f3d 100644
|
index 23cc0c360f..d6637f3ddf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
|
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -42,10 +42,10 @@ index 23cc0c36..d6637f3d 100644
|
|||||||
private long inhabitedTime;
|
private long inhabitedTime;
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index c7e86488..d41316c4 100644
|
index b7a2cd7342..0dd873a5dd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -513,6 +513,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -515,6 +515,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
} // Paper - Timings
|
} // Paper - Timings
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ index c7e86488..d41316c4 100644
|
|||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index e9841ef5..7ca4a7cc 100644
|
index e9841ef58d..7ca4a7cca8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||||
@ -108,7 +108,7 @@ index e9841ef5..7ca4a7cc 100644
|
|||||||
this.methodProfiler.enter("snooper");
|
this.methodProfiler.enter("snooper");
|
||||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index a640cb38..3d255b19 100644
|
index a640cb3845..3d255b1964 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -40,6 +40,9 @@ public class PlayerChunk {
|
@@ -40,6 +40,9 @@ public class PlayerChunk {
|
||||||
@ -175,7 +175,7 @@ index a640cb38..3d255b19 100644
|
|||||||
public void a(ProtoChunkExtension protochunkextension) {
|
public void a(ProtoChunkExtension protochunkextension) {
|
||||||
for (int i = 0; i < this.statusFutures.length(); ++i) {
|
for (int i = 0; i < this.statusFutures.length(); ++i) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index cdab5ab6..18c71609 100644
|
index cdab5ab6be..18c71609c0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -331,6 +331,64 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -331,6 +331,64 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -261,7 +261,7 @@ index cdab5ab6..18c71609 100644
|
|||||||
return PlayerChunk.getChunkState(playerchunk.getTicketLevel());
|
return PlayerChunk.getChunkState(playerchunk.getTicketLevel());
|
||||||
});
|
});
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 389c9d03..62c22750 100644
|
index 389c9d03a1..62c2275098 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -814,11 +814,44 @@ public class WorldServer extends World {
|
@@ -814,11 +814,44 @@ public class WorldServer extends World {
|
||||||
@ -319,5 +319,5 @@ index 389c9d03..62c22750 100644
|
|||||||
this.checkSession();
|
this.checkSession();
|
||||||
this.worldProvider.i();
|
this.worldProvider.i();
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From ae592aa30cc3b397c74926c89b7a4ae4682ab2cb Mon Sep 17 00:00:00 2001
|
From fcceb8fb63706e669ee329b3cd5dc780332176f9 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Sat, 15 Jun 2019 08:54:33 -0700
|
Date: Sat, 15 Jun 2019 08:54:33 -0700
|
||||||
Subject: [PATCH] Fix World#isChunkGenerated calls
|
Subject: [PATCH] Fix World#isChunkGenerated calls
|
||||||
@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
|
|||||||
its only purpose is to cache the status on DISK)
|
its only purpose is to cache the status on DISK)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index d41316c4..262055fc 100644
|
index 0dd873a5dd..5e4f3612ba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
@ -20,7 +20,7 @@ index d41316c4..262055fc 100644
|
|||||||
public final PlayerChunkMap playerChunkMap;
|
public final PlayerChunkMap playerChunkMap;
|
||||||
private final WorldPersistentData worldPersistentData;
|
private final WorldPersistentData worldPersistentData;
|
||||||
private long lastTickTime;
|
private long lastTickTime;
|
||||||
@@ -282,6 +282,21 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -284,6 +284,21 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ index d41316c4..262055fc 100644
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index 83bcef7e..47e074a1 100644
|
index 83bcef7e64..47e074a122 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -403,6 +403,17 @@ public class ChunkRegionLoader {
|
@@ -403,6 +403,17 @@ public class ChunkRegionLoader {
|
||||||
@ -65,7 +65,7 @@ index 83bcef7e..47e074a1 100644
|
|||||||
if (nbttagcompound != null) {
|
if (nbttagcompound != null) {
|
||||||
ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status"));
|
ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status"));
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||||
index efdf611e..134a4f0b 100644
|
index efdf611e66..134a4f0b7d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
|
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
|
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||||
@@ -176,6 +176,7 @@ public class ChunkStatus {
|
@@ -176,6 +176,7 @@ public class ChunkStatus {
|
||||||
@ -95,7 +95,7 @@ index efdf611e..134a4f0b 100644
|
|||||||
return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s));
|
return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
|
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||||
index f0a052ee..2f95174f 100644
|
index f0a052eec2..2f95174fcc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
|
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
|
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||||
@@ -8,7 +8,7 @@ import javax.annotation.Nullable;
|
@@ -8,7 +8,7 @@ import javax.annotation.Nullable;
|
||||||
@ -108,7 +108,7 @@ index f0a052ee..2f95174f 100644
|
|||||||
@Nullable
|
@Nullable
|
||||||
private PersistentStructureLegacy c;
|
private PersistentStructureLegacy c;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index 3d255b19..040d4b41 100644
|
index 3d255b1964..040d4b41ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -114,6 +114,19 @@ public class PlayerChunk {
|
@@ -114,6 +114,19 @@ public class PlayerChunk {
|
||||||
@ -132,7 +132,7 @@ index 3d255b19..040d4b41 100644
|
|||||||
|
|
||||||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 18c71609..57b1341b 100644
|
index 18c71609c0..57b1341b5a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -968,12 +968,62 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -968,12 +968,62 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -201,7 +201,7 @@ index 18c71609..57b1341b 100644
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
return isOutsideOfRange(chunkcoordintpair, false);
|
return isOutsideOfRange(chunkcoordintpair, false);
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index 6b543f89..d37abf2c 100644
|
index 6b543f89d4..d37abf2cf3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -36,6 +36,30 @@ public class RegionFile implements AutoCloseable {
|
@@ -36,6 +36,30 @@ public class RegionFile implements AutoCloseable {
|
||||||
@ -250,7 +250,7 @@ index 6b543f89..d37abf2c 100644
|
|||||||
this.c();
|
this.c();
|
||||||
} finally {
|
} finally {
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
index b3d1bb5f..e07ae985 100644
|
index b3d1bb5fd8..e07ae98540 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
@@ -18,7 +18,14 @@ public final class RegionFileCache implements AutoCloseable {
|
@@ -18,7 +18,14 @@ public final class RegionFileCache implements AutoCloseable {
|
||||||
@ -280,7 +280,7 @@ index b3d1bb5f..e07ae985 100644
|
|||||||
throwable = throwable1;
|
throwable = throwable1;
|
||||||
throw throwable1;
|
throw throwable1;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 661a89c5..a71bb865 100644
|
index 661a89c5d6..a71bb86508 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -18,6 +18,7 @@ import java.util.Objects;
|
@@ -18,6 +18,7 @@ import java.util.Objects;
|
||||||
@ -376,5 +376,5 @@ index 661a89c5..a71bb865 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From e3c9ff6e47758371f5ee677cede836b6756b5af9 Mon Sep 17 00:00:00 2001
|
From 0f9018c23eb7702412e86293191b5a69d3da7131 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Sat, 13 Jul 2019 09:23:10 -0700
|
Date: Sat, 13 Jul 2019 09:23:10 -0700
|
||||||
Subject: [PATCH] Asynchronous chunk IO and loading
|
Subject: [PATCH] Asynchronous chunk IO and loading
|
||||||
@ -2399,10 +2399,10 @@ index 0000000000..2b20c159f6
|
|||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 262055fccd..68bac9a3c0 100644
|
index 5e4f3612ba..5b10562369 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -297,11 +297,137 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -299,11 +299,137 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
return playerChunk.getAvailableChunkNow();
|
return playerChunk.getAvailableChunkNow();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2540,7 +2540,7 @@ index 262055fccd..68bac9a3c0 100644
|
|||||||
if (Thread.currentThread() != this.serverThread) {
|
if (Thread.currentThread() != this.serverThread) {
|
||||||
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
return (IChunkAccess) CompletableFuture.supplyAsync(() -> {
|
||||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||||
@@ -327,8 +453,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -329,8 +455,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
|
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag);
|
||||||
|
|
||||||
if (!completablefuture.isDone()) { // Paper
|
if (!completablefuture.isDone()) { // Paper
|
||||||
@ -2554,7 +2554,7 @@ index 262055fccd..68bac9a3c0 100644
|
|||||||
this.world.timings.chunkAwait.stopTiming(); // Paper
|
this.world.timings.chunkAwait.stopTiming(); // Paper
|
||||||
} // Paper
|
} // Paper
|
||||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||||
@@ -833,11 +964,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -835,11 +966,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
protected boolean executeNext() {
|
protected boolean executeNext() {
|
||||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||||
try {
|
try {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 2b629be0b349e3cafe093b09706a413a219fd172 Mon Sep 17 00:00:00 2001
|
From 6e8a1f19c69babcf1acc2a75c5e01d98065e0dbe Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Fri, 19 Jul 2019 03:29:14 -0700
|
Date: Fri, 19 Jul 2019 03:29:14 -0700
|
||||||
Subject: [PATCH] Reduce sync loads
|
Subject: [PATCH] Reduce sync loads
|
||||||
@ -11,7 +11,7 @@ it must be enabled by setting the startup flag -Dpaper.debug-sync-loads=true
|
|||||||
To get a debug log for sync loads, the command is /paper syncloadinfo
|
To get a debug log for sync loads, the command is /paper syncloadinfo
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
index af810987..dfe92780 100644
|
index af81098784..dfe92780ad 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
@@ -1,9 +1,13 @@
|
@@ -1,9 +1,13 @@
|
||||||
@ -91,7 +91,7 @@ index af810987..dfe92780 100644
|
|||||||
if (args.length < 2 || args[1].equals("*")) {
|
if (args.length < 2 || args[1].equals("*")) {
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..59aec103
|
index 0000000000..59aec10329
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||||
@@ -0,0 +1,172 @@
|
@@ -0,0 +1,172 @@
|
||||||
@ -268,10 +268,10 @@ index 00000000..59aec103
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 68bac9a3..dd4bb664 100644
|
index 5b10562369..db0925f993 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -457,6 +457,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -459,6 +459,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
||||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
|
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -280,7 +280,7 @@ index 68bac9a3..dd4bb664 100644
|
|||||||
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
|
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
|
||||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 90f60dfd..48c75af8 100644
|
index 311685180f..568e04faa3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1173,7 +1173,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -1173,7 +1173,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
@ -311,7 +311,7 @@ index 90f60dfd..48c75af8 100644
|
|||||||
if (chunk != null) {
|
if (chunk != null) {
|
||||||
chunk.a(oclass, axisalignedbb, list, predicate);
|
chunk.a(oclass, axisalignedbb, list, predicate);
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index b967f6a1..0d25529b 100644
|
index 3db0ad0a46..5f2c425129 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -154,6 +154,12 @@ public class WorldServer extends World {
|
@@ -154,6 +154,12 @@ public class WorldServer extends World {
|
||||||
@ -328,5 +328,5 @@ index b967f6a1..0d25529b 100644
|
|||||||
// Add env and gen to constructor
|
// Add env and gen to constructor
|
||||||
public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
|
public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 56a70e238a04999209b1b0d75b00f23a7f904e7c Mon Sep 17 00:00:00 2001
|
From 76b94acd550514b6c4c6ae226cd9dc63effca302 Mon Sep 17 00:00:00 2001
|
||||||
From: kickash32 <kickash32@gmail.com>
|
From: kickash32 <kickash32@gmail.com>
|
||||||
Date: Mon, 19 Aug 2019 01:27:58 +0500
|
Date: Mon, 19 Aug 2019 01:27:58 +0500
|
||||||
Subject: [PATCH] implement optional per player mob spawns
|
Subject: [PATCH] implement optional per player mob spawns
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
index 30bafb21..c9a3ba4b 100644
|
index 30bafb214b..c9a3ba4bfb 100644
|
||||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
@@ -60,6 +60,7 @@ public class WorldTimingsHandler {
|
@@ -60,6 +60,7 @@ public class WorldTimingsHandler {
|
||||||
@ -25,7 +25,7 @@ index 30bafb21..c9a3ba4b 100644
|
|||||||
poiUnload = Timings.ofSafe(name + "Chunk unload - POI");
|
poiUnload = Timings.ofSafe(name + "Chunk unload - POI");
|
||||||
chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk");
|
chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk");
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 9d9260ad..fd3dbea6 100644
|
index 9d9260ad07..fd3dbea628 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -613,4 +613,9 @@ public class PaperWorldConfig {
|
@@ -613,4 +613,9 @@ public class PaperWorldConfig {
|
||||||
@ -40,7 +40,7 @@ index 9d9260ad..fd3dbea6 100644
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..9ebd7ecb
|
index 0000000000..9ebd7ecb7a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||||
@@ -0,0 +1,253 @@
|
@@ -0,0 +1,253 @@
|
||||||
@ -299,7 +299,7 @@ index 00000000..9ebd7ecb
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..4f13d3ff
|
index 0000000000..4f13d3ff83
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||||
@@ -0,0 +1,241 @@
|
@@ -0,0 +1,241 @@
|
||||||
@ -545,10 +545,10 @@ index 00000000..4f13d3ff
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index dd4bb664..d0602743 100644
|
index db0925f993..29197d6c8d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -739,7 +739,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -741,7 +741,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
this.world.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||||
int l = this.chunkMapDistance.b();
|
int l = this.chunkMapDistance.b();
|
||||||
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values();
|
||||||
@ -572,7 +572,7 @@ index dd4bb664..d0602743 100644
|
|||||||
|
|
||||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
@@ -807,8 +822,23 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -809,8 +824,23 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) {
|
if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) {
|
||||||
int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits
|
int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ index dd4bb664..d0602743 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 82a80e34..3d0316e9 100644
|
index 82a80e34a5..3d0316e93c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -81,6 +81,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -81,6 +81,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
@ -631,7 +631,7 @@ index 82a80e34..3d0316e9 100644
|
|||||||
return this.cs;
|
return this.cs;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
index 8427ee2e..0f04bcc8 100644
|
index 8427ee2ee8..0f04bcc8b7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
@@ -254,6 +254,7 @@ public class EntityTypes<T extends Entity> {
|
@@ -254,6 +254,7 @@ public class EntityTypes<T extends Entity> {
|
||||||
@ -643,7 +643,7 @@ index 8427ee2e..0f04bcc8 100644
|
|||||||
return this.bb;
|
return this.bb;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 7e5fa016..f564502f 100644
|
index 7e5fa016c7..f564502f81 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -78,7 +78,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -78,7 +78,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -682,7 +682,7 @@ index 7e5fa016..f564502f 100644
|
|||||||
|
|
||||||
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
index fdac5bb3..58bbf2f9 100644
|
index fdac5bb3a2..58bbf2f9d2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||||
@ -755,7 +755,7 @@ index fdac5bb3..58bbf2f9 100644
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 149600ae..b164ee89 100644
|
index f9aed78188..fd8ca2a510 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -1028,7 +1028,20 @@ public class WorldServer extends World {
|
@@ -1028,7 +1028,20 @@ public class WorldServer extends World {
|
||||||
@ -800,5 +800,5 @@ index 149600ae..b164ee89 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From b9140558ec5495e12e345e093900a1636d4cd5d5 Mon Sep 17 00:00:00 2001
|
From 6c6a52d79167aca84ffc1f252bd0b09bb87ca44c Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Sat, 25 Jan 2020 17:04:35 -0800
|
Date: Sat, 25 Jan 2020 17:04:35 -0800
|
||||||
Subject: [PATCH] Optimise getChunkAt calls for loaded chunks
|
Subject: [PATCH] Optimise getChunkAt calls for loaded chunks
|
||||||
@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
|
|||||||
then unwrap it...
|
then unwrap it...
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index d0602743..12fa1013 100644
|
index 29197d6c8d..57e797cd86 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -433,6 +433,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -435,6 +435,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
return this.getChunkAt(i, j, chunkstatus, flag);
|
return this.getChunkAt(i, j, chunkstatus, flag);
|
||||||
}, this.serverThreadQueue).join();
|
}, this.serverThreadQueue).join();
|
||||||
} else {
|
} else {
|
||||||
@ -23,7 +23,7 @@ index d0602743..12fa1013 100644
|
|||||||
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
|
||||||
|
|
||||||
gameprofilerfiller.c("getChunk");
|
gameprofilerfiller.c("getChunk");
|
||||||
@@ -483,39 +489,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -485,39 +491,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
if (Thread.currentThread() != this.serverThread) {
|
if (Thread.currentThread() != this.serverThread) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
@ -65,7 +65,7 @@ index d0602743..12fa1013 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 79d8c7ba..28b6c9a0 100644
|
index 2d51ca9224..5036348abf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -259,6 +259,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -259,6 +259,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
@ -84,5 +84,5 @@ index 79d8c7ba..28b6c9a0 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7ff0fd47e2b6d042dc9f180410ac9dc1406e92d4 Mon Sep 17 00:00:00 2001
|
From f9dbb955a21c698e64cda2fed7a3ae215d660d11 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Fri, 14 Feb 2020 01:24:39 -0800
|
Date: Fri, 14 Feb 2020 01:24:39 -0800
|
||||||
Subject: [PATCH] Optimise TickListServer by rewriting it
|
Subject: [PATCH] Optimise TickListServer by rewriting it
|
||||||
@ -43,7 +43,7 @@ sets the excessive tick delay to the specified ticks (defaults to
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..ce653f6b
|
index 0000000000..ce653f6b4b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/PaperTickList.java
|
||||||
@@ -0,0 +1,622 @@
|
@@ -0,0 +1,622 @@
|
||||||
@ -671,7 +671,7 @@ index 00000000..ce653f6b
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java b/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java
|
diff --git a/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java b/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..13cf1a55
|
index 0000000000..13cf1a55a9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java
|
+++ b/src/main/java/com/destroystokyo/paper/server/ticklist/TickListServerInterval.java
|
||||||
@@ -0,0 +1,41 @@
|
@@ -0,0 +1,41 @@
|
||||||
@ -718,7 +718,7 @@ index 00000000..13cf1a55
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java b/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java b/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..118988c3
|
index 0000000000..118988c39e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/set/LinkedSortedSet.java
|
||||||
@@ -0,0 +1,142 @@
|
@@ -0,0 +1,142 @@
|
||||||
@ -865,7 +865,7 @@ index 00000000..118988c3
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index e650a2e4..2d07d350 100644
|
index e650a2e48d..2d07d350d2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -125,6 +125,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
@@ -125,6 +125,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||||
@ -877,10 +877,10 @@ index e650a2e4..2d07d350 100644
|
|||||||
return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
return this.b(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 12fa1013..5c45756c 100644
|
index 57e797cd86..2e63f64783 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -198,6 +198,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -200,6 +200,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@ -895,7 +895,7 @@ index 12fa1013..5c45756c 100644
|
|||||||
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
public ChunkProviderServer(WorldServer worldserver, File file, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, ChunkGenerator<?> chunkgenerator, int i, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier) {
|
||||||
this.world = worldserver;
|
this.world = worldserver;
|
||||||
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||||
index 33cfeabd..2287e47d 100644
|
index 33cfeabdee..2287e47d1b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java
|
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||||
@@ -5,11 +5,13 @@ import java.util.Comparator;
|
@@ -5,11 +5,13 @@ import java.util.Comparator;
|
||||||
@ -966,7 +966,7 @@ index 33cfeabd..2287e47d 100644
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f;
|
return this.e + ": " + this.a + ", " + this.b + ", " + this.c + ", " + this.f;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index 74e6b8b9..04b97cec 100644
|
index 74e6b8b973..04b97cec29 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -477,7 +477,9 @@ public class PlayerChunk {
|
@@ -477,7 +477,9 @@ public class PlayerChunk {
|
||||||
@ -981,7 +981,7 @@ index 74e6b8b9..04b97cec 100644
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
diff --git a/src/main/java/net/minecraft/server/StructureBoundingBox.java b/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
diff --git a/src/main/java/net/minecraft/server/StructureBoundingBox.java b/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
||||||
index dbb565e7..185658e2 100644
|
index dbb565e74d..185658e230 100644
|
||||||
--- a/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
--- a/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
||||||
+++ b/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
+++ b/src/main/java/net/minecraft/server/StructureBoundingBox.java
|
||||||
@@ -4,12 +4,12 @@ import com.google.common.base.MoreObjects;
|
@@ -4,12 +4,12 @@ import com.google.common.base.MoreObjects;
|
||||||
@ -1020,7 +1020,7 @@ index dbb565e7..185658e2 100644
|
|||||||
return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e;
|
return baseblockposition.getX() >= this.a && baseblockposition.getX() <= this.d && baseblockposition.getZ() >= this.c && baseblockposition.getZ() <= this.f && baseblockposition.getY() >= this.b && baseblockposition.getY() <= this.e;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
index f533860b..3f1aa5ce 100644
|
index f533860bbe..3f1aa5ced6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TickListServer.java
|
+++ b/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
@@ -42,6 +42,11 @@ public class TickListServer<T> implements TickList<T> {
|
@@ -42,6 +42,11 @@ public class TickListServer<T> implements TickList<T> {
|
||||||
@ -1143,7 +1143,7 @@ index f533860b..3f1aa5ce 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index ed41c814..9d35d650 100644
|
index 95860454da..b74f701b9e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -170,6 +170,13 @@ public class WorldServer extends World {
|
@@ -170,6 +170,13 @@ public class WorldServer extends World {
|
||||||
@ -1174,5 +1174,5 @@ index ed41c814..9d35d650 100644
|
|||||||
}, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings
|
}, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings
|
||||||
this.navigators = Sets.newHashSet();
|
this.navigators = Sets.newHashSet();
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 360f5da781c580a4cf0dcc1b7638318df8fba3b8 Mon Sep 17 00:00:00 2001
|
From ce1db781f0616e0667f80d3395381026b1107547 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 8 Apr 2020 03:06:30 -0400
|
Date: Wed, 8 Apr 2020 03:06:30 -0400
|
||||||
Subject: [PATCH] Optimize PlayerChunkMap memory use for visibleChunks
|
Subject: [PATCH] Optimize PlayerChunkMap memory use for visibleChunks
|
||||||
@ -13,7 +13,7 @@ This should result in siginificant memory use reduction and improved GC behavior
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java
|
diff --git a/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..e0ad725b
|
index 0000000000..e0ad725b2e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java
|
+++ b/src/main/java/com/destroystokyo/paper/util/map/Long2ObjectLinkedOpenHashMapFastCopy.java
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
@ -50,10 +50,10 @@ index 00000000..e0ad725b
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 5c45756c..1c0a7f40 100644
|
index 2e63f64783..3d79e756d9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -748,7 +748,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -750,7 +750,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||||
};
|
};
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -63,7 +63,7 @@ index 5c45756c..1c0a7f40 100644
|
|||||||
|
|
||||||
if (optional.isPresent()) {
|
if (optional.isPresent()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
index d9941b38..71ab65e0 100644
|
index d9941b38ca..71ab65e00f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -529,7 +529,7 @@ public final class MCUtil {
|
@@ -529,7 +529,7 @@ public final class MCUtil {
|
||||||
@ -76,7 +76,7 @@ index d9941b38..71ab65e0 100644
|
|||||||
List<PlayerChunk> allChunks = new ArrayList<>(visibleChunks.values());
|
List<PlayerChunk> allChunks = new ArrayList<>(visibleChunks.values());
|
||||||
List<EntityPlayer> players = world.players;
|
List<EntityPlayer> players = world.players;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index e1e4ea79..e61ddeb1 100644
|
index e1e4ea793a..e61ddeb1ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -55,8 +55,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -55,8 +55,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -213,7 +213,7 @@ index e1e4ea79..e61ddeb1 100644
|
|||||||
while (objectbidirectionaliterator.hasNext()) {
|
while (objectbidirectionaliterator.hasNext()) {
|
||||||
Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next();
|
Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 051506fc..630d6470 100644
|
index 051506fce8..630d6470a4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -74,6 +74,7 @@ import net.minecraft.server.GameRules;
|
@@ -74,6 +74,7 @@ import net.minecraft.server.GameRules;
|
||||||
@ -271,5 +271,5 @@ index 051506fc..630d6470 100644
|
|||||||
return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.server.Chunk::getBukkitChunk).toArray(Chunk[]::new);
|
return chunks.values().stream().map(PlayerChunk::getFullChunk).filter(Objects::nonNull).map(net.minecraft.server.Chunk::getBukkitChunk).toArray(Chunk[]::new);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7014d349d3e52fe0aa58f9d2b6b72d2675396332 Mon Sep 17 00:00:00 2001
|
From df60dff93009e0cf28dc3e5b984d1a5afbf93bd2 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 9 Apr 2020 00:09:26 -0400
|
Date: Thu, 9 Apr 2020 00:09:26 -0400
|
||||||
Subject: [PATCH] Speed up processing of chunk loads and generation
|
Subject: [PATCH] Speed up processing of chunk loads and generation
|
||||||
@ -33,7 +33,7 @@ In a view distance of 15, chunk loading performance was visually faster on the c
|
|||||||
Flying at high speed in spectator mode was able to keep up with chunk loading (as long as they are already generated)
|
Flying at high speed in spectator mode was able to keep up with chunk loading (as long as they are already generated)
|
||||||
|
|
||||||
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
index 69e26a82..434833d5 100644
|
index 69e26a8267..434833d50e 100644
|
||||||
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
|
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
@@ -13,6 +13,7 @@ import java.util.Map;
|
@@ -13,6 +13,7 @@ import java.util.Map;
|
||||||
@ -45,10 +45,10 @@ index 69e26a82..434833d5 100644
|
|||||||
public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions");
|
public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions");
|
||||||
public static final Timing connectionTimer = Timings.ofSafe("Connection Handler");
|
public static final Timing connectionTimer = Timings.ofSafe("Connection Handler");
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 1c0a7f40..4af75a95 100644
|
index 3d79e756d9..5fea6e56d5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -681,6 +681,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -683,6 +683,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.getMethodProfiler().enter("purge");
|
this.world.getMethodProfiler().enter("purge");
|
||||||
this.world.timings.doChunkMap.startTiming(); // Spigot
|
this.world.timings.doChunkMap.startTiming(); // Spigot
|
||||||
this.chunkMapDistance.purgeTickets();
|
this.chunkMapDistance.purgeTickets();
|
||||||
@ -56,7 +56,7 @@ index 1c0a7f40..4af75a95 100644
|
|||||||
this.tickDistanceManager();
|
this.tickDistanceManager();
|
||||||
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
this.world.timings.doChunkMap.stopTiming(); // Spigot
|
||||||
this.world.getMethodProfiler().exitEnter("chunks");
|
this.world.getMethodProfiler().exitEnter("chunks");
|
||||||
@@ -690,6 +691,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -692,6 +693,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
this.world.timings.doChunkUnload.startTiming(); // Spigot
|
||||||
this.world.getMethodProfiler().exitEnter("unload");
|
this.world.getMethodProfiler().exitEnter("unload");
|
||||||
this.playerChunkMap.unloadChunks(booleansupplier);
|
this.playerChunkMap.unloadChunks(booleansupplier);
|
||||||
@ -64,7 +64,7 @@ index 1c0a7f40..4af75a95 100644
|
|||||||
this.world.timings.doChunkUnload.stopTiming(); // Spigot
|
this.world.timings.doChunkUnload.stopTiming(); // Spigot
|
||||||
this.world.getMethodProfiler().exit();
|
this.world.getMethodProfiler().exit();
|
||||||
this.clearCache();
|
this.clearCache();
|
||||||
@@ -748,7 +750,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -750,7 +752,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||||
};
|
};
|
||||||
// Paper end
|
// Paper end
|
||||||
@ -73,7 +73,7 @@ index 1c0a7f40..4af75a95 100644
|
|||||||
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||||
|
|
||||||
if (optional.isPresent()) {
|
if (optional.isPresent()) {
|
||||||
@@ -831,6 +833,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -833,6 +835,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
this.world.timings.chunkTicks.startTiming(); // Spigot // Paper
|
||||||
this.world.a(chunk, k);
|
this.world.a(chunk, k);
|
||||||
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
|
this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper
|
||||||
@ -81,7 +81,7 @@ index 1c0a7f40..4af75a95 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -972,6 +975,38 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -974,6 +977,38 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
super.executeTask(runnable);
|
super.executeTask(runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ index 1c0a7f40..4af75a95 100644
|
|||||||
protected boolean executeNext() {
|
protected boolean executeNext() {
|
||||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index e35bacac..2f424e6e 100644
|
index e35bacac71..2f424e6e8b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -907,6 +907,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
@@ -907,6 +907,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||||
@ -163,7 +163,7 @@ index e35bacac..2f424e6e 100644
|
|||||||
protected TickTask postToMainThread(Runnable runnable) {
|
protected TickTask postToMainThread(Runnable runnable) {
|
||||||
return new TickTask(this.ticks, runnable);
|
return new TickTask(this.ticks, runnable);
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index e61ddeb1..92c9ab43 100644
|
index e61ddeb1ff..92c9ab43d7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -793,7 +793,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -793,7 +793,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -176,7 +176,7 @@ index e61ddeb1..92c9ab43 100644
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 969c6aad..4b9b79a9 100644
|
index 33de08a8ac..4a63536dee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -420,6 +420,7 @@ public class WorldServer extends World {
|
@@ -420,6 +420,7 @@ public class WorldServer extends World {
|
||||||
@ -214,5 +214,5 @@ index 969c6aad..4b9b79a9 100644
|
|||||||
|
|
||||||
gameprofilerfiller.exit();
|
gameprofilerfiller.exit();
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From d3f69fdacc40bcebc991188160a9d2508277bd5e Mon Sep 17 00:00:00 2001
|
From 98260d8a7b814a9c1fbdd4002c40e7182e36ecf6 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 11 Apr 2020 03:56:07 -0400
|
Date: Sat, 11 Apr 2020 03:56:07 -0400
|
||||||
Subject: [PATCH] Implement Chunk Priority / Urgency System for World Gen
|
Subject: [PATCH] Implement Chunk Priority / Urgency System for World Gen
|
||||||
@ -16,10 +16,10 @@ lots of chunks already.
|
|||||||
This massively reduces the lag spikes from sync chunk gens.
|
This massively reduces the lag spikes from sync chunk gens.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 4af75a95..8d4b227e 100644
|
index 5fea6e56d5..bcf59beed6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -306,6 +306,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -308,6 +308,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private long asyncLoadSeqCounter;
|
private long asyncLoadSeqCounter;
|
||||||
@ -27,7 +27,7 @@ index 4af75a95..8d4b227e 100644
|
|||||||
|
|
||||||
public void getChunkAtAsynchronously(int x, int z, boolean gen, java.util.function.Consumer<Chunk> onComplete) {
|
public void getChunkAtAsynchronously(int x, int z, boolean gen, java.util.function.Consumer<Chunk> onComplete) {
|
||||||
if (Thread.currentThread() != this.serverThread) {
|
if (Thread.currentThread() != this.serverThread) {
|
||||||
@@ -463,10 +464,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -465,10 +466,18 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
gameprofilerfiller.c("getChunkCacheMiss");
|
gameprofilerfiller.c("getChunkCacheMiss");
|
||||||
@ -46,7 +46,7 @@ index 4af75a95..8d4b227e 100644
|
|||||||
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
this.world.asyncChunkTaskManager.raisePriority(x, z, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
||||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
|
com.destroystokyo.paper.io.chunk.ChunkTaskManager.pushChunkWait(this.world, x, z);
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -476,6 +485,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -478,6 +487,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
|
||||||
this.world.timings.chunkAwait.stopTiming(); // Paper
|
this.world.timings.chunkAwait.stopTiming(); // Paper
|
||||||
} // Paper
|
} // Paper
|
||||||
@ -59,7 +59,7 @@ index 4af75a95..8d4b227e 100644
|
|||||||
return ichunkaccess1;
|
return ichunkaccess1;
|
||||||
}, (playerchunk_failure) -> {
|
}, (playerchunk_failure) -> {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index 04b97cec..568fbbd5 100644
|
index 04b97cec29..568fbbd5f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -43,6 +43,111 @@ public class PlayerChunk {
|
@@ -43,6 +43,111 @@ public class PlayerChunk {
|
||||||
@ -197,7 +197,7 @@ index 04b97cec..568fbbd5 100644
|
|||||||
|
|
||||||
private void d(int i) {
|
private void d(int i) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 92c9ab43..c38d31fa 100644
|
index 92c9ab43d7..c38d31fafe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -324,6 +324,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -324,6 +324,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -280,5 +280,5 @@ index 92c9ab43..c38d31fa 100644
|
|||||||
return either.flatMap((list) -> {
|
return either.flatMap((list) -> {
|
||||||
Chunk chunk = (Chunk) list.get(list.size() / 2);
|
Chunk chunk = (Chunk) list.get(list.size() / 2);
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f1385354f2a9e9aad317152a00d10f8d7773c19e Mon Sep 17 00:00:00 2001
|
From c4c018236d1050729389fe9a766654280d9508a0 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Thu, 16 Apr 2020 16:13:59 -0700
|
Date: Thu, 16 Apr 2020 16:13:59 -0700
|
||||||
Subject: [PATCH] Optimize ChunkProviderServer's chunk level checking helper
|
Subject: [PATCH] Optimize ChunkProviderServer's chunk level checking helper
|
||||||
@ -9,10 +9,10 @@ so inline where possible, and avoid the abstraction of the
|
|||||||
Either class.
|
Either class.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 8d4b227e..59568224 100644
|
index bcf59beed6..15bd3cacb3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -613,27 +613,37 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -615,27 +615,37 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
|
|
||||||
public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER
|
public final boolean isInEntityTickingChunk(Entity entity) { return this.a(entity); } // Paper - OBFHELPER
|
||||||
@Override public boolean a(Entity entity) {
|
@Override public boolean a(Entity entity) {
|
||||||
@ -61,5 +61,5 @@ index 8d4b227e..59568224 100644
|
|||||||
|
|
||||||
private boolean a(long i, Function<PlayerChunk, CompletableFuture<Either<Chunk, PlayerChunk.Failure>>> function) {
|
private boolean a(long i, Function<PlayerChunk, CompletableFuture<Either<Chunk, PlayerChunk.Failure>>> function) {
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7efd9e913ddf547057c364e553e4a79c69c4c397 Mon Sep 17 00:00:00 2001
|
From d4150f3df14622ffc4ad49ff655ba6aaa23114bb Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 18 Apr 2020 04:36:11 -0400
|
Date: Sat, 18 Apr 2020 04:36:11 -0400
|
||||||
Subject: [PATCH] Fix Chunk Post Processing deadlock risk
|
Subject: [PATCH] Fix Chunk Post Processing deadlock risk
|
||||||
@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash
|
|||||||
for heightmaps.
|
for heightmaps.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 59568224..fd84807a 100644
|
index 15bd3cacb3..2d4d7250f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -1017,6 +1017,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -1019,6 +1019,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
// we do not want to use this.executeNext as that also processes chunk loads and might count against task counter.
|
// we do not want to use this.executeNext as that also processes chunk loads and might count against task counter.
|
||||||
// We also have already ticked the distance manager above too.
|
// We also have already ticked the distance manager above too.
|
||||||
if (server.chunksTasksRan < 200 && now - lastChunkTask > 100000 && super.executeNext()) {
|
if (server.chunksTasksRan < 200 && now - lastChunkTask > 100000 && super.executeNext()) {
|
||||||
@ -36,7 +36,7 @@ index 59568224..fd84807a 100644
|
|||||||
ChunkProviderServer.this.lightEngine.queueUpdate();
|
ChunkProviderServer.this.lightEngine.queueUpdate();
|
||||||
server.chunksTasksRan++;
|
server.chunksTasksRan++;
|
||||||
lastChunkTask = now;
|
lastChunkTask = now;
|
||||||
@@ -1040,7 +1041,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -1042,7 +1043,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
ChunkProviderServer.this.lightEngine.queueUpdate();
|
ChunkProviderServer.this.lightEngine.queueUpdate();
|
||||||
@ -50,7 +50,7 @@ index 59568224..fd84807a 100644
|
|||||||
} finally {
|
} finally {
|
||||||
playerChunkMap.callbackExecutor.run();
|
playerChunkMap.callbackExecutor.run();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index c38d31fa..e19342eb 100644
|
index c38d31fafe..e19342eb89 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -92,6 +92,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -92,6 +92,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
@ -80,5 +80,5 @@ index c38d31fa..e19342eb 100644
|
|||||||
|
|
||||||
completablefuture1.thenAcceptAsync((either) -> {
|
completablefuture1.thenAcceptAsync((either) -> {
|
||||||
--
|
--
|
||||||
2.25.1.windows.1
|
2.25.1
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 8a89997b6fd09a04f3085e265e205c0c1c2dcb58 Mon Sep 17 00:00:00 2001
|
From 3dc63160ade1b4a3feac971d88fb0b6ecbb5c28e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 19 Apr 2020 04:28:29 -0400
|
Date: Sun, 19 Apr 2020 04:28:29 -0400
|
||||||
Subject: [PATCH] Load Chunks for Login Asynchronously
|
Subject: [PATCH] Load Chunks for Login Asynchronously
|
||||||
@ -18,10 +18,18 @@ index 96a47dd1c2..96ebe0b226 100644
|
|||||||
|
|
||||||
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
|
public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
index 686fd4cbad..84c6e5b614 100644
|
index 686fd4cbad..079ddc714e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||||
@@ -105,6 +105,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
|
private static final Logger LOGGER = LogManager.getLogger();
|
||||||
|
public String locale = null; // CraftBukkit - lowercase // Paper - default to null
|
||||||
|
public PlayerConnection playerConnection;
|
||||||
|
+ public NetworkManager networkManager; // Paper
|
||||||
|
public final MinecraftServer server;
|
||||||
|
public final PlayerInteractManager playerInteractManager;
|
||||||
|
public final Deque<Integer> removeQueue = new ArrayDeque<>(); // Paper
|
||||||
|
@@ -105,6 +106,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
public boolean joining = true;
|
public boolean joining = true;
|
||||||
public boolean sentListPacket = false;
|
public boolean sentListPacket = false;
|
||||||
public boolean supressTrackerForLogin = false; // Paper
|
public boolean supressTrackerForLogin = false; // Paper
|
||||||
@ -29,6 +37,28 @@ index 686fd4cbad..84c6e5b614 100644
|
|||||||
public Integer clientViewDistance;
|
public Integer clientViewDistance;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
|
index f1222fcb2b..28f48f2252 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
|
@@ -66,7 +66,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
} else if (this.g == LoginListener.EnumProtocolState.DELAY_ACCEPT) {
|
||||||
|
- EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId());
|
||||||
|
+ EntityPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.i.getId()); // Paper
|
||||||
|
|
||||||
|
if (entityplayer == null) {
|
||||||
|
this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
|
@@ -165,7 +165,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||||
|
}
|
||||||
|
|
||||||
|
this.networkManager.sendPacket(new PacketLoginOutSuccess(this.i));
|
||||||
|
- EntityPlayer entityplayer = this.server.getPlayerList().a(this.i.getId());
|
||||||
|
+ EntityPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.i.getId()); // Paper
|
||||||
|
|
||||||
|
if (entityplayer != null) {
|
||||||
|
this.g = LoginListener.EnumProtocolState.DELAY_ACCEPT;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 7929fcc800..c3710b73af 100644
|
index 7929fcc800..c3710b73af 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@ -42,19 +72,55 @@ index 7929fcc800..c3710b73af 100644
|
|||||||
this.player.lastX = this.player.locX();
|
this.player.lastX = this.player.locX();
|
||||||
this.player.lastY = this.player.locY();
|
this.player.lastY = this.player.locY();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index ec45c30dd3..ddecbc0a28 100644
|
index ec45c30dd3..eaba3cbf06 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -173,6 +173,31 @@ public abstract class PlayerList {
|
@@ -52,11 +52,12 @@ public abstract class PlayerList {
|
||||||
this.players.add(entityplayer);
|
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
||||||
this.playersByName.put(entityplayer.getName().toLowerCase(java.util.Locale.ROOT), entityplayer); // Spigot
|
private final MinecraftServer server;
|
||||||
this.j.put(entityplayer.getUniqueID(), entityplayer);
|
public final List<EntityPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
|
||||||
|
- private final Map<UUID, EntityPlayer> j = Maps.newHashMap();
|
||||||
|
+ private final Map<UUID, EntityPlayer> j = Maps.newHashMap();Map<UUID, EntityPlayer> getUUIDMap() { return j; } // Paper - OBFHELPER
|
||||||
|
private final GameProfileBanList k;
|
||||||
|
private final IpBanList l;
|
||||||
|
private final OpList operators;
|
||||||
|
private final WhiteList whitelist;
|
||||||
|
+ private final Map<UUID, EntityPlayer> pendingPlayers = Maps.newHashMap(); // Paper
|
||||||
|
// CraftBukkit start
|
||||||
|
// private final Map<UUID, ServerStatisticManager> o;
|
||||||
|
// private final Map<UUID, AdvancementDataPlayer> p;
|
||||||
|
@@ -94,6 +95,11 @@ public abstract class PlayerList {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(NetworkManager networkmanager, EntityPlayer entityplayer) {
|
||||||
|
+ EntityPlayer prev = pendingPlayers.put(entityplayer.getUniqueID(), entityplayer);// Paper
|
||||||
|
+ if (prev != null) {
|
||||||
|
+ disconnectPendingPlayer(prev);
|
||||||
|
+ }
|
||||||
|
+ entityplayer.networkManager = networkmanager; // Paper
|
||||||
|
entityplayer.loginTime = System.currentTimeMillis(); // Paper
|
||||||
|
GameProfile gameprofile = entityplayer.getProfile();
|
||||||
|
UserCache usercache = this.server.getUserCache();
|
||||||
|
@@ -107,7 +113,7 @@ public abstract class PlayerList {
|
||||||
|
if (nbttagcompound != null && nbttagcompound.hasKey("bukkit")) {
|
||||||
|
NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit");
|
||||||
|
s = bukkit.hasKeyOfType("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
|
||||||
|
- }
|
||||||
|
+ }String lastKnownName = s; // Paper
|
||||||
|
if (nbttagcompound == null) entityplayer.moveToSpawn(worldserver); // Paper - only move to spawn on first login, otherwise, stay where you are....
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@@ -158,6 +164,46 @@ public abstract class PlayerList {
|
||||||
|
entityplayer.B().a(entityplayer);
|
||||||
|
this.sendScoreboard(worldserver.getScoreboard(), entityplayer);
|
||||||
|
this.server.invalidatePingSample();
|
||||||
+ // Paper start - async load spawn in chunk
|
+ // Paper start - async load spawn in chunk
|
||||||
+ WorldServer finalWorldserver = worldserver;
|
+ WorldServer finalWorldserver = worldserver;
|
||||||
+ int chunkX = loc.getBlockX() >> 4;
|
+ int chunkX = loc.getBlockX() >> 4;
|
||||||
+ int chunkZ = loc.getBlockZ() >> 4;
|
+ int chunkZ = loc.getBlockZ() >> 4;
|
||||||
+ worldserver.getChunkProvider().getTickingChunkAsync(chunkX, chunkZ, (chunk -> { // use ticking - as it has at least 1 neighbours loaded
|
+ worldserver.getChunkProvider().getTickingChunkAsync(chunkX, chunkZ, (chunk -> { // use ticking - as it has at least 1 neighbours loaded
|
||||||
+ postChunkLoadJoin(entityplayer, finalWorldserver, playerconnection, nbttagcompound, networkmanager.getSocketAddress().toString(), joinMessage);
|
+ postChunkLoadJoin(entityplayer, finalWorldserver, networkmanager, playerconnection, nbttagcompound, networkmanager.getSocketAddress().toString(),
|
||||||
|
+ lastKnownName);
|
||||||
+ }));
|
+ }));
|
||||||
+ // boost the priorities
|
+ // boost the priorities
|
||||||
+ worldserver.asyncChunkTaskManager.raisePriority(chunkX, chunkZ, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
+ worldserver.asyncChunkTaskManager.raisePriority(chunkX, chunkZ, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
||||||
@ -62,22 +128,36 @@ index ec45c30dd3..ddecbc0a28 100644
|
|||||||
+ for (int cz = -1; cz <= 1; cz++) {
|
+ for (int cz = -1; cz <= 1; cz++) {
|
||||||
+ if (cx == 0 && cz == 0) continue;
|
+ if (cx == 0 && cz == 0) continue;
|
||||||
+ // we have to directly request it otherwise the task won't be started yet to boost priority
|
+ // we have to directly request it otherwise the task won't be started yet to boost priority
|
||||||
+ worldserver.getChunkProvider().getFullChunkAsync(chunkX + cx, chunkZ + cz, (c) -> {});
|
+ worldserver.getChunkProvider().getFullChunkAsync(chunkX + cx, chunkZ + cz, null);
|
||||||
+ worldserver.asyncChunkTaskManager.raisePriority(chunkX + cx, chunkZ + cz, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
+ worldserver.asyncChunkTaskManager.raisePriority(chunkX + cx, chunkZ + cz, com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
+ }
|
+ }
|
||||||
+ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String joinMessage) {
|
+
|
||||||
+ if (!entityplayer.playerConnection.networkManager.isConnected()) {
|
+ EntityPlayer getActivePlayer(UUID uuid) {
|
||||||
|
+ EntityPlayer player = this.getUUIDMap().get(uuid);
|
||||||
|
+ return player != null ? player : pendingPlayers.get(uuid);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ void disconnectPendingPlayer(EntityPlayer entityplayer) {
|
||||||
|
+ ChatMessage msg = new ChatMessage("multiplayer.disconnect.duplicate_login", new Object[0]);
|
||||||
|
+ entityplayer.networkManager.sendPacket(new PacketPlayOutKickDisconnect(msg), (future) -> {
|
||||||
|
+ entityplayer.networkManager.close(msg);
|
||||||
|
+ entityplayer.networkManager = null;
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private void postChunkLoadJoin(EntityPlayer entityplayer, WorldServer worldserver, NetworkManager networkmanager, PlayerConnection playerconnection, NBTTagCompound nbttagcompound, String s1, String s) {
|
||||||
|
+ pendingPlayers.remove(entityplayer.getUniqueID(), entityplayer);
|
||||||
|
+ if (!networkmanager.isConnected()) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ entityplayer.didPlayerJoinEvent = true;
|
+ entityplayer.didPlayerJoinEvent = true;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below
|
ChatMessage chatmessage;
|
||||||
|
|
||||||
// Paper start - correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) {
|
||||||
@@ -388,6 +413,7 @@ public abstract class PlayerList {
|
@@ -388,6 +434,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
protected void savePlayerFile(EntityPlayer entityplayer) {
|
protected void savePlayerFile(EntityPlayer entityplayer) {
|
||||||
if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||||
@ -85,7 +165,7 @@ index ec45c30dd3..ddecbc0a28 100644
|
|||||||
this.playerFileData.save(entityplayer);
|
this.playerFileData.save(entityplayer);
|
||||||
ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit
|
ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit
|
||||||
|
|
||||||
@@ -412,7 +438,7 @@ public abstract class PlayerList {
|
@@ -412,7 +459,7 @@ public abstract class PlayerList {
|
||||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer, org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||||
|
|
||||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||||
@ -94,7 +174,21 @@ index ec45c30dd3..ddecbc0a28 100644
|
|||||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||||
|
|
||||||
if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
if (server.isMainThread()) entityplayer.playerTick();// SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
||||||
@@ -481,7 +507,7 @@ public abstract class PlayerList {
|
@@ -464,6 +511,13 @@ public abstract class PlayerList {
|
||||||
|
// this.p.remove(uuid);
|
||||||
|
// CraftBukkit end
|
||||||
|
}
|
||||||
|
+ // Paper start
|
||||||
|
+ entityplayer1 = pendingPlayers.get(uuid);
|
||||||
|
+ if (entityplayer1 == entityplayer) {
|
||||||
|
+ pendingPlayers.remove(uuid);
|
||||||
|
+ }
|
||||||
|
+ entityplayer.networkManager = null;
|
||||||
|
+ // Paper end
|
||||||
|
|
||||||
|
// CraftBukkit start
|
||||||
|
// this.sendAll(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer}));
|
||||||
|
@@ -481,7 +535,7 @@ public abstract class PlayerList {
|
||||||
cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -103,6 +197,20 @@ index ec45c30dd3..ddecbc0a28 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
||||||
|
@@ -500,6 +554,13 @@ public abstract class PlayerList {
|
||||||
|
list.add(entityplayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ // Paper start - check pending players too
|
||||||
|
+ entityplayer = pendingPlayers.get(uuid);
|
||||||
|
+ if (entityplayer != null) {
|
||||||
|
+ this.pendingPlayers.remove(uuid);
|
||||||
|
+ disconnectPendingPlayer(entityplayer);
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
|
||||||
|
Iterator iterator = list.iterator();
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.25.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user