mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 22:45:31 +01:00
Finish updating chunk system patch
Add in locking changes from folia, plus fix some diffs. I'm sure it'll be error-free.
This commit is contained in:
parent
3fe0e32495
commit
cc491a396e
77 changed files with 4053 additions and 20161 deletions
File diff suppressed because it is too large
Load diff
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 62a95a0fac59683948f34b202e6e3859b6652d6d..d47e99ac96e622296d045cfcf93b53dddd314827 100644
|
index 995be2fd84ce343d7430d9658f91868e653da43d..4af495424d60632b770cd1cb02157bbcf34366e8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2282,6 +2282,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2363,6 +2363,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||||
entity.valid = true; // CraftBukkit
|
entity.valid = true; // CraftBukkit
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index d47e99ac96e622296d045cfcf93b53dddd314827..2df6cc14176465dcdc7cfc8d12382bf7edc49666 100644
|
index 4af495424d60632b770cd1cb02157bbcf34366e8..a2a7568499bddb3c515ef8155e6e7e827f2a5b97 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -752,7 +752,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -833,7 +833,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
gameprofilerfiller.push("thunder");
|
gameprofilerfiller.push("thunder");
|
||||||
BlockPos blockposition;
|
BlockPos blockposition;
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 2df6cc14176465dcdc7cfc8d12382bf7edc49666..feee30aa0bccfa40765f1c4a179ba04907b11433 100644
|
index a2a7568499bddb3c515ef8155e6e7e827f2a5b97..e253531f5da93d2a5b328e1af6eef2a6d9a72bc1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -783,7 +783,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -864,7 +864,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
int l;
|
int l;
|
||||||
int i1;
|
int i1;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
|
||||||
Methods that can be used for other patches to help improve logic.
|
Methods that can be used for other patches to help improve logic.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index feee30aa0bccfa40765f1c4a179ba04907b11433..4598ca4cd9da931db33ca26576bfbcdf7df99094 100644
|
index e253531f5da93d2a5b328e1af6eef2a6d9a72bc1..d48ad601dc9f8b3ed3bc0e2dd068981eb7613c30 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4598ca4cd9da931db33ca26576bfbcdf7df99094..f6be0fefb461c1b5fd0feb5553d36b5817b96e3a 100644
|
index d48ad601dc9f8b3ed3bc0e2dd068981eb7613c30..5cde98b0225799bccdb84ce6b6cf06b904d5986c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -756,7 +756,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -837,7 +837,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||||
if (this.isRainingAt(blockposition)) {
|
if (this.isRainingAt(blockposition)) {
|
||||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||||
|
|
|
@ -18,7 +18,7 @@ index 821725460b62ebadedb789f4408ef172416c2092..81abb732e2bb3bca683028d505e74850
|
||||||
this.profiler.push(() -> {
|
this.profiler.push(() -> {
|
||||||
return worldserver + " " + worldserver.dimension().location();
|
return worldserver + " " + worldserver.dimension().location();
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index f6be0fefb461c1b5fd0feb5553d36b5817b96e3a..33c6a673d98323a3790b3e494841dffa9ce5f4f5 100644
|
index 5cde98b0225799bccdb84ce6b6cf06b904d5986c..699fc5f11efa8240723854cd2e91877b278f9495 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 33c6a673d98323a3790b3e494841dffa9ce5f4f5..507cab9d689b774b320fac00f7760c4143957b67 100644
|
index 699fc5f11efa8240723854cd2e91877b278f9495..7da059a2e8560250021654f3d5586027c15c7dd3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2292,6 +2292,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2373,6 +2373,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -16,7 +16,7 @@ index 33c6a673d98323a3790b3e494841dffa9ce5f4f5..507cab9d689b774b320fac00f7760c41
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTrackingEnd(Entity entity) {
|
public void onTrackingEnd(Entity entity) {
|
||||||
@@ -2367,6 +2368,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2448,6 +2449,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 507cab9d689b774b320fac00f7760c4143957b67..508c1f2874db3add98aad29bd4eee6c9f5d58006 100644
|
index 7da059a2e8560250021654f3d5586027c15c7dd3..35b59c83a35bc3a4d05bc95b0caec1f1865589c0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1517,6 +1517,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1598,6 +1598,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
||||||
|
|
|
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
|
||||||
Additionally, numerous issues to player position tracking on maps has been fixed.
|
Additionally, numerous issues to player position tracking on maps has been fixed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 508c1f2874db3add98aad29bd4eee6c9f5d58006..90c19a08b51dee98701fc397ab95bf93cb1a2102 100644
|
index 35b59c83a35bc3a4d05bc95b0caec1f1865589c0..17d9c5a6c357ac5e3eacd9e4d2cff9a05ec0f262 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2313,6 +2313,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2394,6 +2394,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
{
|
{
|
||||||
if ( iter.next().player == entity )
|
if ( iter.next().player == entity )
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ index 52325a99ea38530ad69a39ac0215233139f35268..dd74e8a034022fe72a1652f92712182b
|
||||||
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index a70b68cdff1e5a793b8b3a214cb8ea0ed3ff2e4b..9347d321eaba21e0ef9662ebcacae64c19149e1d 100644
|
index 5f4fa76fe3a1a0a4fc11064fcf57bfab20bd9729..4da303d7e15496f04f0e27bfb613176bc2a72b76 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator {
|
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator {
|
||||||
|
|
|
@ -40,10 +40,10 @@ index a502d293cedb2f507e6cf1792429b36685ed1910..e50af28f806593a0171ad7cee5805f74
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 5c97b0069d20815c2a1d61bf34596a8a928d8940..bf802a791e857b0018cc760a24c32981eb732f68 100644
|
index b0687dcf8af84af627b67e7fbb68170a2fd28da0..5cb151a7d89c7281b03f24c5f79afb7edf7cbfea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -716,6 +716,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -565,6 +565,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||||
|
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
|
|
|
@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
||||||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 90c19a08b51dee98701fc397ab95bf93cb1a2102..317ba116e52c193fbd0a9cd853bc03ed640cc70f 100644
|
index 17d9c5a6c357ac5e3eacd9e4d2cff9a05ec0f262..f2eefdeab44ad4f7c0abd0e55e688e74a83abfff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2246,6 +2246,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2327,6 +2327,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
public void onTickingEnd(Entity entity) {
|
public void onTickingEnd(Entity entity) {
|
||||||
ServerLevel.this.entityTickList.remove(entity);
|
ServerLevel.this.entityTickList.remove(entity);
|
||||||
|
|
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
||||||
This adds a new Builder API which is much friendlier to use.
|
This adds a new Builder API which is much friendlier to use.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 317ba116e52c193fbd0a9cd853bc03ed640cc70f..68d32251091d103cb2d5afca8f4461631eff83c1 100644
|
index f2eefdeab44ad4f7c0abd0e55e688e74a83abfff..68257f257dd3b167e237482c8d149590103896b2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1636,12 +1636,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1717,12 +1717,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||||
|
|
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||||
to "confirm" things based on if it was player triggered close or not.
|
to "confirm" things based on if it was player triggered close or not.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 68d32251091d103cb2d5afca8f4461631eff83c1..0dd9b622f652cc67e365032a948df4c40c315a80 100644
|
index 68257f257dd3b167e237482c8d149590103896b2..33ce550ea68d4862e0966ed827200cf426909d85 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1368,7 +1368,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1449,7 +1449,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||||
if (tileentity instanceof net.minecraft.world.Container) {
|
if (tileentity instanceof net.minecraft.world.Container) {
|
||||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
||||||
|
@ -19,7 +19,7 @@ index 68d32251091d103cb2d5afca8f4461631eff83c1..0dd9b622f652cc67e365032a948df4c4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2336,7 +2336,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2417,7 +2417,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ index e50af28f806593a0171ad7cee5805f74b25fec89..7495bd988a48cbb977ebac25854547ae
|
||||||
|
|
||||||
protected void tick() {
|
protected void tick() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 0dd9b622f652cc67e365032a948df4c40c315a80..203dcc314b20a427a827eabc1713dc3abdcca467 100644
|
index 33ce550ea68d4862e0966ed827200cf426909d85..6b157b362cffedae26133fc0f0af1094655ee11f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -221,6 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -221,6 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
@ -42,7 +42,7 @@ index 0dd9b622f652cc67e365032a948df4c40c315a80..203dcc314b20a427a827eabc1713dc3a
|
||||||
|
|
||||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||||
return this.chunkSource.getChunk(x, z, false);
|
return this.chunkSource.getChunk(x, z, false);
|
||||||
@@ -1330,7 +1333,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1411,7 +1414,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||||
|
|
|
@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
|
||||||
or DEFAULT since data was not stored.
|
or DEFAULT since data was not stored.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 203dcc314b20a427a827eabc1713dc3abdcca467..80c3b79db7ee83467de839444aeac4cfad734564 100644
|
index 6b157b362cffedae26133fc0f0af1094655ee11f..986a509998d217228eb1dc2b5815787599e02d6b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1348,6 +1348,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1429,6 +1429,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
|
@ -63,10 +63,10 @@ index ac0c25ec9a06163f0f7290f9813fd5177b7ff87d..798a9083d78d49bc7c9e1d3dfb70c30e
|
||||||
// this.updateMobSpawningFlags();
|
// this.updateMobSpawningFlags();
|
||||||
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
|
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 80c3b79db7ee83467de839444aeac4cfad734564..e6fcc3f39e99e817405776fc05efce9605000af2 100644
|
index 986a509998d217228eb1dc2b5815787599e02d6b..773fea9c2c4bef931439b5663471c010d9a1297c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1785,12 +1785,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1866,12 +1866,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
|
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
|
||||||
Use the PlayerList map instead of iterating over all players
|
Use the PlayerList map instead of iterating over all players
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e6fcc3f39e99e817405776fc05efce9605000af2..15fdb6d6307bad251be9272d44bea9fbad90e55f 100644
|
index 773fea9c2c4bef931439b5663471c010d9a1297c..0efc377743e93a0120843cab192753d037e88a73 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -469,6 +469,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -550,6 +550,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal
|
||||||
public net.minecraft.world.entity.LivingEntity jumping
|
public net.minecraft.world.entity.LivingEntity jumping
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92744066cd 100644
|
index 0efc377743e93a0120843cab192753d037e88a73..b12e9da3eebda396769b30f4b7e37a78f3bcb060 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
|
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
|
||||||
|
@ -29,7 +29,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.datafixers.DataFixer;
|
import com.mojang.datafixers.DataFixer;
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
@@ -1105,17 +1104,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1186,17 +1185,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
++TimingHistory.entityTicks; // Paper - timings
|
++TimingHistory.entityTicks; // Paper - timings
|
||||||
// Spigot start
|
// Spigot start
|
||||||
co.aikar.timings.Timing timer; // Paper
|
co.aikar.timings.Timing timer; // Paper
|
||||||
|
@ -51,7 +51,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
||||||
try {
|
try {
|
||||||
// Paper end - timings
|
// Paper end - timings
|
||||||
entity.setOldPosAndRot();
|
entity.setOldPosAndRot();
|
||||||
@@ -1126,9 +1125,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1207,9 +1206,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
||||||
});
|
});
|
||||||
gameprofilerfiller.incrementCounter("tickNonPassenger");
|
gameprofilerfiller.incrementCounter("tickNonPassenger");
|
||||||
|
@ -65,7 +65,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
||||||
Iterator iterator = entity.getPassengers().iterator();
|
Iterator iterator = entity.getPassengers().iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@@ -1136,13 +1139,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1217,13 +1220,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
this.tickPassenger(entity, entity1);
|
this.tickPassenger(entity, entity1);
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
||||||
passenger.setOldPosAndRot();
|
passenger.setOldPosAndRot();
|
||||||
++passenger.tickCount;
|
++passenger.tickCount;
|
||||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||||
@@ -1151,8 +1159,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1232,8 +1240,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
|
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
|
||||||
});
|
});
|
||||||
gameprofilerfiller.incrementCounter("tickPassenger");
|
gameprofilerfiller.incrementCounter("tickPassenger");
|
||||||
|
@ -103,7 +103,7 @@ index 15fdb6d6307bad251be9272d44bea9fbad90e55f..826634d50d8d537b01c1cfa545e82c92
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
Iterator iterator = passenger.getPassengers().iterator();
|
Iterator iterator = passenger.getPassengers().iterator();
|
||||||
|
|
||||||
@@ -1162,6 +1179,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1243,6 +1260,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.tickPassenger(passenger, entity2);
|
this.tickPassenger(passenger, entity2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -338,10 +338,10 @@ index 8c4d2b2f206d7662c0aceb30f49fa58f9426ec5c..1711170ef98831dacfbf30ac22e19f47
|
||||||
double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8);
|
double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8);
|
||||||
double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8);
|
double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index bf802a791e857b0018cc760a24c32981eb732f68..8e183df0603d3abbf09301d71758c9cbb4cf413f 100644
|
index 5cb151a7d89c7281b03f24c5f79afb7edf7cbfea..d9743139d1cb932c6aac56da85f073e4dfe2933c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -694,7 +694,18 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -543,7 +543,18 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
gameprofilerfiller.push("naturalSpawnCount");
|
gameprofilerfiller.push("naturalSpawnCount");
|
||||||
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||||
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
int l = this.distanceManager.getNaturalSpawnChunkCount();
|
||||||
|
|
|
@ -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/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 8e183df0603d3abbf09301d71758c9cbb4cf413f..feb494177f8bfc6eb343aa29f5a7ffd8c47f9cb7 100644
|
index d9743139d1cb932c6aac56da85f073e4dfe2933c..603f9d1f501a18214f11a6e401f2c43d9c3cf8eb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -421,6 +421,12 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -270,6 +270,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
return this.getChunk(x, z, leastStatus, create);
|
return this.getChunk(x, z, leastStatus, create);
|
||||||
}, this.mainThreadProcessor).join();
|
}, this.mainThreadProcessor).join();
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,7 +23,7 @@ index 8e183df0603d3abbf09301d71758c9cbb4cf413f..feb494177f8bfc6eb343aa29f5a7ffd8
|
||||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||||
|
|
||||||
gameprofilerfiller.incrementCounter("getChunk");
|
gameprofilerfiller.incrementCounter("getChunk");
|
||||||
@@ -464,39 +470,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -313,39 +319,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system
|
if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index feb494177f8bfc6eb343aa29f5a7ffd8c47f9cb7..f6fd35300324f931c92f546b76dc16883b0f791d 100644
|
index 603f9d1f501a18214f11a6e401f2c43d9c3cf8eb..1c327067d488cc916d082a797b161cb7836ffa2e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -445,6 +445,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -294,6 +294,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
// Paper start - async chunk io/loading
|
// Paper start - async chunk io/loading
|
||||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system
|
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -312,10 +312,10 @@ index feb494177f8bfc6eb343aa29f5a7ffd8c47f9cb7..f6fd35300324f931c92f546b76dc1688
|
||||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
|
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 826634d50d8d537b01c1cfa545e82c92744066cd..179e95ebc8d9b87339f8daaf232c61e54ac99d88 100644
|
index b12e9da3eebda396769b30f4b7e37a78f3bcb060..e61781d7ac9ec8828b4968e6e3824f5212bf6dea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -570,6 +570,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -651,6 +651,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system
|
this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,10 @@ index 1711170ef98831dacfbf30ac22e19f47b3c4c413..67317919d86ca4e0aa11d9f0625851fd
|
||||||
EntityType<?> entitytypes = entity.getType();
|
EntityType<?> entitytypes = entity.getType();
|
||||||
int i = entitytypes.clientTrackingRange() * 16;
|
int i = entitytypes.clientTrackingRange() * 16;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 179e95ebc8d9b87339f8daaf232c61e54ac99d88..4a8d4c92ba97d224d8ccd6a9232623ec66ef40a9 100644
|
index e61781d7ac9ec8828b4968e6e3824f5212bf6dea..faba22ba5b45fbd9463ed2172f5aa9096ed84ba0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2392,7 +2392,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2473,7 +2473,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
public void onTrackingStart(Entity entity) {
|
public void onTrackingStart(Entity entity) {
|
||||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||||
|
@ -37,7 +37,7 @@ index 179e95ebc8d9b87339f8daaf232c61e54ac99d88..4a8d4c92ba97d224d8ccd6a9232623ec
|
||||||
if (entity instanceof ServerPlayer) {
|
if (entity instanceof ServerPlayer) {
|
||||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||||
|
|
||||||
@@ -2426,6 +2426,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2507,6 +2507,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||||
entity.valid = true; // CraftBukkit
|
entity.valid = true; // CraftBukkit
|
||||||
|
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
|
||||||
I suspect it deals with teleporting as it uses players current x/y/z
|
I suspect it deals with teleporting as it uses players current x/y/z
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
index 20d600d29c2f2e47c798721d1f151e625b12acc3..fcbdf311e981e010adc78342f0865d3f803354f9 100644
|
index c716047fefb51a77ce18df243c517d80c78b6853..0a926afa06a5e37cf2650afa1b5099a2a9ffa659 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
@@ -147,8 +147,8 @@ public abstract class DistanceManager {
|
@@ -147,8 +147,8 @@ public abstract class DistanceManager {
|
||||||
|
|
|
@ -516,7 +516,7 @@ index 71b395db734c257a64ec3297eebbe52883ea4cc7..072888f891c8e25a2b4daaf561e12493
|
||||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4a8d4c92ba97d224d8ccd6a9232623ec66ef40a9..e065a559a0ccccf76c27bc465137016472607762 100644
|
index faba22ba5b45fbd9463ed2172f5aa9096ed84ba0..345db2f58f52a465d04f46e43403ced57a1bae34 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
@ -530,7 +530,7 @@ index 4a8d4c92ba97d224d8ccd6a9232623ec66ef40a9..e065a559a0ccccf76c27bc4651370164
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||||
@@ -1386,7 +1388,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1467,7 +1469,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (entity.isRemoved()) {
|
if (entity.isRemoved()) {
|
||||||
// Paper start
|
// Paper start
|
||||||
if (DEBUG_ENTITIES) {
|
if (DEBUG_ENTITIES) {
|
||||||
|
|
|
@ -53,10 +53,10 @@ index 2a55f9e0ab6fa07ba913203bb62acd54add450a0..7bd02abf039f7e047b6b6b1de0bc4788
|
||||||
// Paper start - move executeAll() into full server tick timing
|
// Paper start - move executeAll() into full server tick timing
|
||||||
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index f6fd35300324f931c92f546b76dc16883b0f791d..a8efb80b1408e2c4598e3baee3fe3f51618c9e63 100644
|
index 1c327067d488cc916d082a797b161cb7836ffa2e..3f5d572994bc8b3f1e106105dc0bb202ad005b8c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -603,6 +603,15 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -452,6 +452,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
} // Paper - Timings
|
} // Paper - Timings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,10 +73,10 @@ index f6fd35300324f931c92f546b76dc16883b0f791d..a8efb80b1408e2c4598e3baee3fe3f51
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e065a559a0ccccf76c27bc465137016472607762..e1535ad949ead050ebb1813b3f4cd38597e1924c 100644
|
index 345db2f58f52a465d04f46e43403ced57a1bae34..d02f9030d47764f8f3f71f27f133b676b42efe59 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1200,6 +1200,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1281,6 +1281,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e1535ad949ead050ebb1813b3f4cd38597e1924c..e0574ad1e5d07f58649cb580a9b4f4d11cacc2b1 100644
|
index d02f9030d47764f8f3f71f27f133b676b42efe59..4fc75299b65b2d298f6f8397e56c44221ed4c3e9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1922,9 +1922,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2003,9 +2003,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
||||||
// Paper - configurable spawn radius
|
// Paper - configurable spawn radius
|
||||||
BlockPos prevSpawn = this.getSharedSpawnPos();
|
BlockPos prevSpawn = this.getSharedSpawnPos();
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e0574ad1e5d07f58649cb580a9b4f4d11cacc2b1..a62e33af3a7e4cb038fdbe9e50bf448958b1c170 100644
|
index 4fc75299b65b2d298f6f8397e56c44221ed4c3e9..9b7a87b0ba537d1e92d0c02149f97dc41975c53f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1426,6 +1426,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1507,6 +1507,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index a62e33af3a7e4cb038fdbe9e50bf448958b1c170..885498368c8b725259bd63af79b05784a20aa864 100644
|
index 9b7a87b0ba537d1e92d0c02149f97dc41975c53f..7cb5dc1d0badba864705386d70b69dc3a6790284 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1991,6 +1991,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2072,6 +2072,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
});
|
});
|
||||||
optional1.ifPresent((holder) -> {
|
optional1.ifPresent((holder) -> {
|
||||||
this.getServer().execute(() -> {
|
this.getServer().execute(() -> {
|
||||||
|
|
|
@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..09837f6e6c6ab8a1df2aacdb86646993
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index 9347d321eaba21e0ef9662ebcacae64c19149e1d..b975cca39e18fd274702543066971fcf0cc24186 100644
|
index 4da303d7e15496f04f0e27bfb613176bc2a72b76..3c7920721914588a3e7eaf1faff46f7305823416 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -121,6 +121,24 @@ public abstract class ChunkGenerator {
|
@@ -121,6 +121,24 @@ public abstract class ChunkGenerator {
|
||||||
|
|
|
@ -17,7 +17,7 @@ index 0ed954f83a7a045c964930247ea393cbaafcbf12..5ac5937c72286d96c394a4da90cbc443
|
||||||
this.profiler.push(() -> {
|
this.profiler.push(() -> {
|
||||||
return worldserver + " " + worldserver.dimension().location();
|
return worldserver + " " + worldserver.dimension().location();
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 885498368c8b725259bd63af79b05784a20aa864..e6b7bbf3c805b314d2473131770cc4791829a6d0 100644
|
index 7cb5dc1d0badba864705386d70b69dc3a6790284..896168b532cf42cae4911a35c0d5d6dd5e37f128 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e6b7bbf3c805b314d2473131770cc4791829a6d0..64f79684824e5f709b2bf66da600d18860c9f3c4 100644
|
index 896168b532cf42cae4911a35c0d5d6dd5e37f128..02723e2d34804d911dcf093a3a6fd6af7ce4c14b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1571,6 +1571,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1652,6 +1652,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getChunkSource().blockChanged(pos);
|
this.getChunkSource().blockChanged(pos);
|
||||||
|
@ -16,7 +16,7 @@ index e6b7bbf3c805b314d2473131770cc4791829a6d0..64f79684824e5f709b2bf66da600d188
|
||||||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||||
|
|
||||||
@@ -1612,6 +1613,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1693,6 +1694,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 64f79684824e5f709b2bf66da600d18860c9f3c4..3454cc832f2c09425336d9627a6ece74622080a9 100644
|
index 02723e2d34804d911dcf093a3a6fd6af7ce4c14b..746713d742cf6c375353570e86e5e1802e9aec60 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -591,8 +591,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -672,8 +672,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.serverLevelData.setClearWeatherTime(clearDuration);
|
this.serverLevelData.setClearWeatherTime(clearDuration);
|
||||||
this.serverLevelData.setRainTime(rainDuration);
|
this.serverLevelData.setRainTime(rainDuration);
|
||||||
this.serverLevelData.setThunderTime(rainDuration);
|
this.serverLevelData.setThunderTime(rainDuration);
|
||||||
|
@ -19,7 +19,7 @@ index 64f79684824e5f709b2bf66da600d18860c9f3c4..3454cc832f2c09425336d9627a6ece74
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1004,8 +1004,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1085,8 +1085,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.serverLevelData.setThunderTime(j);
|
this.serverLevelData.setThunderTime(j);
|
||||||
this.serverLevelData.setRainTime(k);
|
this.serverLevelData.setRainTime(k);
|
||||||
this.serverLevelData.setClearWeatherTime(i);
|
this.serverLevelData.setClearWeatherTime(i);
|
||||||
|
@ -30,7 +30,7 @@ index 64f79684824e5f709b2bf66da600d18860c9f3c4..3454cc832f2c09425336d9627a6ece74
|
||||||
}
|
}
|
||||||
|
|
||||||
this.oThunderLevel = this.thunderLevel;
|
this.oThunderLevel = this.thunderLevel;
|
||||||
@@ -1071,14 +1071,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1152,14 +1152,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
private void resetWeatherCycle() {
|
private void resetWeatherCycle() {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
|
|
@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
|
||||||
load in that case).
|
load in that case).
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 3454cc832f2c09425336d9627a6ece74622080a9..d35de35f0a72bf9080b48028010379426d50c5bc 100644
|
index 746713d742cf6c375353570e86e5e1802e9aec60..712002e1b2effb08daee0e0204000e32b7df5b27 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -228,7 +228,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -228,7 +228,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
|
||||||
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index d35de35f0a72bf9080b48028010379426d50c5bc..5795836844691ce4bcfaf3df8ae6dc28b80df47a 100644
|
index 712002e1b2effb08daee0e0204000e32b7df5b27..0f0c19fcf7eb273adcee9bf181d0ad1ad06037f0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -893,6 +893,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -974,6 +974,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BlockPos findLightningTargetAround(BlockPos pos) {
|
protected BlockPos findLightningTargetAround(BlockPos pos) {
|
||||||
|
@ -22,7 +22,7 @@ index d35de35f0a72bf9080b48028010379426d50c5bc..5795836844691ce4bcfaf3df8ae6dc28
|
||||||
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
|
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
|
||||||
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
|
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
|
||||||
|
|
||||||
@@ -907,6 +912,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -988,6 +993,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
|
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
|
||||||
state desync POV because the TE is getting unloaded anyways.
|
state desync POV because the TE is getting unloaded anyways.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 5795836844691ce4bcfaf3df8ae6dc28b80df47a..00508122ab504b1a84ef050145749fa9fea7a7d1 100644
|
index 0f0c19fcf7eb273adcee9bf181d0ad1ad06037f0..e8dd1f2c354d2031076b7c96bfcc5bec9249fb67 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1472,9 +1472,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1553,9 +1553,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||||
if (tileentity instanceof net.minecraft.world.Container) {
|
if (tileentity instanceof net.minecraft.world.Container) {
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize anyPlayerCloseEnoughForSpawning to use distance maps
|
||||||
Use a distance map to find the players in range quickly
|
Use a distance map to find the players in range quickly
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index 84e4aea3d44cd7d5405ffc970a0568337ee5b0a7..e7c81056e9f4da0f89cf411afd446444bb40958c 100644
|
index c5389e7f3665c06e487dfde3200b7e229694fbd2..4164204ba80f68a768de0ed1721c6447b972a631 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -86,16 +86,29 @@ public class ChunkHolder {
|
@@ -79,16 +79,29 @@ public class ChunkHolder {
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
public void onChunkAdd() {
|
public void onChunkAdd() {
|
||||||
|
@ -42,14 +42,13 @@ index 84e4aea3d44cd7d5405ffc970a0568337ee5b0a7..e7c81056e9f4da0f89cf411afd446444
|
||||||
private final com.destroystokyo.paper.util.maplist.ReferenceList<ServerPlayer> playersSentChunkTo = new com.destroystokyo.paper.util.maplist.ReferenceList<>();
|
private final com.destroystokyo.paper.util.maplist.ReferenceList<ServerPlayer> playersSentChunkTo = new com.destroystokyo.paper.util.maplist.ReferenceList<>();
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce5129584e21d 100644
|
index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..f400f95309a22a4bfcef899c39e9589105e6a6f0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -157,12 +157,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -157,12 +157,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
// Paper start - distance maps
|
// Paper start - distance maps
|
||||||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||||
+ public final io.papermc.paper.chunk.PlayerChunkLoader playerChunkManager = new io.papermc.paper.chunk.PlayerChunkLoader(this, this.pooledLinkedPlayerHashSets); // Paper - replace chunk loader
|
|
||||||
+ // Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
+ // Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
+ // A note about the naming used here:
|
+ // A note about the naming used here:
|
||||||
+ // Previously, mojang used a "spawn range" of 8 for controlling both ticking and
|
+ // Previously, mojang used a "spawn range" of 8 for controlling both ticking and
|
||||||
|
@ -71,7 +70,7 @@ index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce512
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if (this.playerMobDistanceMap != null) {
|
if (this.playerMobDistanceMap != null) {
|
||||||
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||||
@@ -173,6 +186,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -173,6 +185,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||||
this.level.playerChunkLoader.removePlayer(player); // Paper - replace chunk loader
|
this.level.playerChunkLoader.removePlayer(player); // Paper - replace chunk loader
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce512
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if (this.playerMobDistanceMap != null) {
|
if (this.playerMobDistanceMap != null) {
|
||||||
this.playerMobDistanceMap.remove(player);
|
this.playerMobDistanceMap.remove(player);
|
||||||
@@ -185,6 +202,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -185,6 +201,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||||
this.level.playerChunkLoader.updatePlayer(player); // Paper - replace chunk loader
|
this.level.playerChunkLoader.updatePlayer(player); // Paper - replace chunk loader
|
||||||
|
@ -90,7 +89,7 @@ index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce512
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if (this.playerMobDistanceMap != null) {
|
if (this.playerMobDistanceMap != null) {
|
||||||
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||||
@@ -276,6 +294,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -276,6 +293,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.regionManagers.add(this.dataRegionManager);
|
this.regionManagers.add(this.dataRegionManager);
|
||||||
// Paper end
|
// Paper end
|
||||||
this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper
|
this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper
|
||||||
|
@ -129,7 +128,7 @@ index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce512
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ChunkGenerator generator() {
|
protected ChunkGenerator generator() {
|
||||||
@@ -850,43 +900,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -850,43 +899,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +209,7 @@ index 8d8bb430e44d7608a8aa44c7feb41797b8bbfb06..7d80cfd701d910badf1feaecaa4ce512
|
||||||
|
|
||||||
public List<ServerPlayer> getPlayersCloseForSpawning(ChunkPos pos) {
|
public List<ServerPlayer> getPlayersCloseForSpawning(ChunkPos pos) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
index fcbdf311e981e010adc78342f0865d3f803354f9..40e17a8f182fea7c99b64cd074ce1757e48758bf 100644
|
index 0a926afa06a5e37cf2650afa1b5099a2a9ffa659..ae4a4710ba07614be42cdcbf52cee04cfa08466b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||||
@@ -50,7 +50,7 @@ public abstract class DistanceManager {
|
@@ -50,7 +50,7 @@ public abstract class DistanceManager {
|
||||||
|
@ -263,10 +262,10 @@ index fcbdf311e981e010adc78342f0865d3f803354f9..40e17a8f182fea7c99b64cd074ce1757
|
||||||
|
|
||||||
public String getDebugStatus() {
|
public String getDebugStatus() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index a8efb80b1408e2c4598e3baee3fe3f51618c9e63..cd260728e95197f4b0cde35f3d6111366bd979db 100644
|
index 3f5d572994bc8b3f1e106105dc0bb202ad005b8c..5c5fe2087a7617324ab8e18389e3ffa9ac413026 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -668,6 +668,37 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -517,6 +517,37 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.chunkMap.tick();
|
this.chunkMap.tick();
|
||||||
} else {
|
} else {
|
||||||
|
@ -304,7 +303,7 @@ index a8efb80b1408e2c4598e3baee3fe3f51618c9e63..cd260728e95197f4b0cde35f3d611136
|
||||||
LevelData worlddata = this.level.getLevelData();
|
LevelData worlddata = this.level.getLevelData();
|
||||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||||
|
|
||||||
@@ -711,15 +742,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -560,15 +591,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||||
|
|
||||||
Collections.shuffle(list);
|
Collections.shuffle(list);
|
||||||
|
@ -321,7 +320,7 @@ index a8efb80b1408e2c4598e3baee3fe3f51618c9e63..cd260728e95197f4b0cde35f3d611136
|
||||||
Iterator iterator1 = list.iterator();
|
Iterator iterator1 = list.iterator();
|
||||||
|
|
||||||
while (iterator1.hasNext()) {
|
while (iterator1.hasNext()) {
|
||||||
@@ -727,9 +750,9 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -576,9 +599,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
LevelChunk chunk1 = chunkproviderserver_a.chunk;
|
LevelChunk chunk1 = chunkproviderserver_a.chunk;
|
||||||
ChunkPos chunkcoordintpair = chunk1.getPos();
|
ChunkPos chunkcoordintpair = chunk1.getPos();
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise chunk tick iteration
|
||||||
Use a dedicated list of entity ticking chunks to reduce the cost
|
Use a dedicated list of entity ticking chunks to reduce the cost
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839d9da6a05 100644
|
index 4164204ba80f68a768de0ed1721c6447b972a631..4ae1ba645d9fdc1eb6d5a3e4f8ceed9b4841e003 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -91,6 +91,11 @@ public class ChunkHolder {
|
@@ -84,6 +84,11 @@ public class ChunkHolder {
|
||||||
this.playersInMobSpawnRange = this.chunkMap.playerMobSpawnMap.getObjectsInRange(key);
|
this.playersInMobSpawnRange = this.chunkMap.playerMobSpawnMap.getObjectsInRange(key);
|
||||||
this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key);
|
this.playersInChunkTickRange = this.chunkMap.playerChunkTickRangeMap.getObjectsInRange(key);
|
||||||
// Paper end - optimise anyPlayerCloseEnoughForSpawning
|
// Paper end - optimise anyPlayerCloseEnoughForSpawning
|
||||||
|
@ -21,7 +21,7 @@ index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onChunkRemove() {
|
public void onChunkRemove() {
|
||||||
@@ -98,6 +103,11 @@ public class ChunkHolder {
|
@@ -91,6 +96,11 @@ public class ChunkHolder {
|
||||||
this.playersInMobSpawnRange = null;
|
this.playersInMobSpawnRange = null;
|
||||||
this.playersInChunkTickRange = null;
|
this.playersInChunkTickRange = null;
|
||||||
// Paper end - optimise anyPlayerCloseEnoughForSpawning
|
// Paper end - optimise anyPlayerCloseEnoughForSpawning
|
||||||
|
@ -33,7 +33,7 @@ index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -237,7 +247,7 @@ public class ChunkHolder {
|
@@ -230,7 +240,7 @@ public class ChunkHolder {
|
||||||
|
|
||||||
if (i < 0 || i >= this.changedBlocksPerSection.length) return; // CraftBukkit - SPIGOT-6086, SPIGOT-6296
|
if (i < 0 || i >= this.changedBlocksPerSection.length) return; // CraftBukkit - SPIGOT-6086, SPIGOT-6296
|
||||||
if (this.changedBlocksPerSection[i] == null) {
|
if (this.changedBlocksPerSection[i] == null) {
|
||||||
|
@ -42,7 +42,7 @@ index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839
|
||||||
this.changedBlocksPerSection[i] = new ShortOpenHashSet();
|
this.changedBlocksPerSection[i] = new ShortOpenHashSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,6 +271,7 @@ public class ChunkHolder {
|
@@ -254,6 +264,7 @@ public class ChunkHolder {
|
||||||
int k = this.lightEngine.getMaxLightSection();
|
int k = this.lightEngine.getMaxLightSection();
|
||||||
|
|
||||||
if (y >= j && y <= k) {
|
if (y >= j && y <= k) {
|
||||||
|
@ -50,7 +50,7 @@ index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839
|
||||||
int l = y - j;
|
int l = y - j;
|
||||||
|
|
||||||
if (lightType == LightLayer.SKY) {
|
if (lightType == LightLayer.SKY) {
|
||||||
@@ -275,8 +286,19 @@ public class ChunkHolder {
|
@@ -268,8 +279,19 @@ public class ChunkHolder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ index e7c81056e9f4da0f89cf411afd446444bb40958c..ec0419e2d895d08d4ba069c98f994839
|
||||||
List list;
|
List list;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 7d80cfd701d910badf1feaecaa4ce5129584e21d..03b802f9f6e31b1ab23af0ff7b235f64c72ec462 100644
|
index f400f95309a22a4bfcef899c39e9589105e6a6f0..da2fa26ddb2b801feff962d96f488239058c4be7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -115,6 +115,8 @@ import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
@@ -115,6 +115,8 @@ import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
||||||
|
@ -93,7 +93,7 @@ index 7d80cfd701d910badf1feaecaa4ce5129584e21d..03b802f9f6e31b1ab23af0ff7b235f64
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index cd260728e95197f4b0cde35f3d6111366bd979db..d9d3def899ee3dfea6df0c97e2be3fad9764776a 100644
|
index 5c5fe2087a7617324ab8e18389e3ffa9ac413026..828de28f2777e2477a9c6545c8af96c4ca4e352b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -48,6 +48,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemp
|
@@ -48,6 +48,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemp
|
||||||
|
@ -104,7 +104,7 @@ index cd260728e95197f4b0cde35f3d6111366bd979db..d9d3def899ee3dfea6df0c97e2be3fad
|
||||||
|
|
||||||
public class ServerChunkCache extends ChunkSource {
|
public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
@@ -725,42 +726,59 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -574,42 +575,59 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
this.lastSpawnState = spawnercreature_d;
|
this.lastSpawnState = spawnercreature_d;
|
||||||
gameprofilerfiller.popPush("filteringLoadedChunks");
|
gameprofilerfiller.popPush("filteringLoadedChunks");
|
||||||
|
@ -181,7 +181,7 @@ index cd260728e95197f4b0cde35f3d6111366bd979db..d9d3def899ee3dfea6df0c97e2be3fad
|
||||||
this.level.timings.chunkTicks.stopTiming(); // Paper
|
this.level.timings.chunkTicks.stopTiming(); // Paper
|
||||||
gameprofilerfiller.popPush("customSpawners");
|
gameprofilerfiller.popPush("customSpawners");
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
@@ -768,15 +786,24 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -617,15 +635,24 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||||
} // Paper - timings
|
} // Paper - timings
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,10 +106,10 @@ index b800249823e413933a5d469e431a003f977f59e7..d8fa1cb0b340f97debceb7e5b90051d2
|
||||||
+ // Paper end - execute chunk tasks mid tick
|
+ // Paper end - execute chunk tasks mid tick
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index d9d3def899ee3dfea6df0c97e2be3fad9764776a..85d5c712f48c12079c6bf6a23d295746fe5f2550 100644
|
index 828de28f2777e2477a9c6545c8af96c4ca4e352b..2a31265ac49b7a6e32105530d00952ee0c0d4331 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -750,6 +750,8 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -599,6 +599,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
Collections.shuffle(shuffled);
|
Collections.shuffle(shuffled);
|
||||||
iterator1 = shuffled.iterator();
|
iterator1 = shuffled.iterator();
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ index d9d3def899ee3dfea6df0c97e2be3fad9764776a..85d5c712f48c12079c6bf6a23d295746
|
||||||
try {
|
try {
|
||||||
while (iterator1.hasNext()) {
|
while (iterator1.hasNext()) {
|
||||||
LevelChunk chunk1 = iterator1.next();
|
LevelChunk chunk1 = iterator1.next();
|
||||||
@@ -767,6 +769,7 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -616,6 +618,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - the chunk is known ticking
|
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - the chunk is known ticking
|
||||||
this.level.tickChunk(chunk1, k);
|
this.level.tickChunk(chunk1, k);
|
||||||
|
@ -127,7 +127,7 @@ index d9d3def899ee3dfea6df0c97e2be3fad9764776a..85d5c712f48c12079c6bf6a23d295746
|
||||||
}
|
}
|
||||||
// Paper start - optimise chunk tick iteration
|
// Paper start - optimise chunk tick iteration
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 00508122ab504b1a84ef050145749fa9fea7a7d1..418bf659d31c5810d786064a76779cfa39943020 100644
|
index e8dd1f2c354d2031076b7c96bfcc5bec9249fb67..0b12c1f2fab60f5832ff6a968d3a4545f42042fc 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
@ -138,7 +138,7 @@ index 00508122ab504b1a84ef050145749fa9fea7a7d1..418bf659d31c5810d786064a76779cfa
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||||
@@ -1104,6 +1105,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1185,6 +1186,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (fluid1.is(fluid)) {
|
if (fluid1.is(fluid)) {
|
||||||
fluid1.tick(this, pos);
|
fluid1.tick(this, pos);
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ index 00508122ab504b1a84ef050145749fa9fea7a7d1..418bf659d31c5810d786064a76779cfa
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1113,6 +1115,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1194,6 +1196,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (iblockdata.is(block)) {
|
if (iblockdata.is(block)) {
|
||||||
iblockdata.tick(this, pos, this.random);
|
iblockdata.tick(this, pos, this.random);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,10 +76,10 @@ index 4a1148a76020089caf01f888f87afdbb35788dc0..52a84eeb3b7df782cbf91aac6df42fb8
|
||||||
});
|
});
|
||||||
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
|
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 418bf659d31c5810d786064a76779cfa39943020..f8bcf1239c18a6334936cec483f2ae316429a894 100644
|
index 0b12c1f2fab60f5832ff6a968d3a4545f42042fc..25ffcafd27b0119301faf81817e3072cd6fd8de6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1119,7 +1119,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1200,7 +1200,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ index 418bf659d31c5810d786064a76779cfa39943020..f8bcf1239c18a6334936cec483f2ae31
|
||||||
++TimingHistory.entityTicks; // Paper - timings
|
++TimingHistory.entityTicks; // Paper - timings
|
||||||
// Spigot start
|
// Spigot start
|
||||||
co.aikar.timings.Timing timer; // Paper
|
co.aikar.timings.Timing timer; // Paper
|
||||||
@@ -1159,7 +1178,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1240,7 +1259,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.tickPassenger(entity, entity1);
|
this.tickPassenger(entity, entity1);
|
||||||
}
|
}
|
||||||
// } finally { timer.stopTiming(); } // Paper - timings - move up
|
// } finally { timer.stopTiming(); } // Paper - timings - move up
|
||||||
|
|
|
@ -19,10 +19,10 @@ index efbf77024d235d8af9f7efc938c17afd76a51b0c..670dcfa32d003870091b75937f1603a5
|
||||||
public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks");
|
public static final Timing midTickChunkTasks = Timings.ofSafe("Mid Tick Chunk Tasks");
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
index 4054bf71486734d722a6a3c7b0b4638188798609..ae0c01539e068e2cc851d2ad52baccf5ebc9545f 100644
|
index 8e52ebe8d12f5da3d877b0e4ff3723229fb47db1..abd0217cf0bff183c8e262edc173a53403797c1a 100644
|
||||||
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
|
||||||
@@ -1082,7 +1082,9 @@ public final class ChunkHolderManager {
|
@@ -1315,7 +1315,9 @@ public final class ChunkHolderManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean processTicketUpdates() {
|
public boolean processTicketUpdates() {
|
||||||
|
|
|
@ -22,10 +22,10 @@ With this change I could get all 200 on at 0ms ping.
|
||||||
So in general this patch should reduce Netty I/O thread load.
|
So in general this patch should reduce Netty I/O thread load.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 85d5c712f48c12079c6bf6a23d295746fe5f2550..1409db8d73a2ed43efbba7f0932bd6d497d9009e 100644
|
index 2a31265ac49b7a6e32105530d00952ee0c0d4331..488a253e218409b5f0b4a872cee0928578fa7582 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
@@ -807,7 +807,24 @@ public class ServerChunkCache extends ChunkSource {
|
@@ -656,7 +656,24 @@ public class ServerChunkCache extends ChunkSource {
|
||||||
this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
// Paper end - use set of chunks requiring updates, rather than iterating every single one loaded
|
// Paper end - use set of chunks requiring updates, rather than iterating every single one loaded
|
||||||
|
|
|
@ -7,10 +7,10 @@ Reference2BooleanOpenHashMap is going to have
|
||||||
better lookups than HashMap.
|
better lookups than HashMap.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 03b802f9f6e31b1ab23af0ff7b235f64c72ec462..84dfa7efa4be86558c38ee9e6f70f87b5638173a 100644
|
index da2fa26ddb2b801feff962d96f488239058c4be7..85d5f8b52cbdcf39c0d62c3005712aa5f0bdde93 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1343,7 +1343,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1342,7 +1342,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
final Entity entity;
|
final Entity entity;
|
||||||
private final int range;
|
private final int range;
|
||||||
SectionPos lastSectionPos;
|
SectionPos lastSectionPos;
|
||||||
|
|
|
@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..7d93652c1abbb6aee6eb7c26cf35d4d0
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index f8bcf1239c18a6334936cec483f2ae316429a894..b1cc896a3f5d7e59a15969308d78d2ef036b0cb1 100644
|
index 25ffcafd27b0119301faf81817e3072cd6fd8de6..f1ae9c3b3db3a7540650365b1c8a9b8274b25644 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -764,6 +764,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -845,6 +845,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entityplayer.stopSleepInBed(false, false);
|
entityplayer.stopSleepInBed(false, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ index f8bcf1239c18a6334936cec483f2ae316429a894..b1cc896a3f5d7e59a15969308d78d2ef
|
||||||
|
|
||||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||||
@@ -773,10 +777,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -854,10 +858,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||||
|
|
||||||
gameprofilerfiller.push("thunder");
|
gameprofilerfiller.push("thunder");
|
||||||
|
@ -117,7 +117,7 @@ index f8bcf1239c18a6334936cec483f2ae316429a894..b1cc896a3f5d7e59a15969308d78d2ef
|
||||||
if (this.isRainingAt(blockposition)) {
|
if (this.isRainingAt(blockposition)) {
|
||||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||||
boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper
|
boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper
|
||||||
@@ -807,16 +811,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -888,16 +892,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
int i1;
|
int i1;
|
||||||
|
|
||||||
if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
|
if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
|
||||||
|
@ -147,7 +147,7 @@ index f8bcf1239c18a6334936cec483f2ae316429a894..b1cc896a3f5d7e59a15969308d78d2ef
|
||||||
if (l > 0 && biomebase.shouldSnow(this, blockposition)) {
|
if (l > 0 && biomebase.shouldSnow(this, blockposition)) {
|
||||||
BlockState iblockdata = this.getBlockState(blockposition);
|
BlockState iblockdata = this.getBlockState(blockposition);
|
||||||
|
|
||||||
@@ -832,51 +845,54 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -913,51 +926,54 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit
|
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ since the penalty of a map lookup could outweigh the benefits of
|
||||||
searching less players (as it basically did in the outside range patch).
|
searching less players (as it basically did in the outside range patch).
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
index ec0419e2d895d08d4ba069c98f994839d9da6a05..ed6a7cd6874e6692c60c5faedd2a86ef9c9425ed 100644
|
index 4ae1ba645d9fdc1eb6d5a3e4f8ceed9b4841e003..e2202389a2c4133a183cca59c4e909fc419379ab 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||||
@@ -96,6 +96,12 @@ public class ChunkHolder {
|
@@ -89,6 +89,12 @@ public class ChunkHolder {
|
||||||
this.chunkMap.needsChangeBroadcasting.add(this);
|
this.chunkMap.needsChangeBroadcasting.add(this);
|
||||||
}
|
}
|
||||||
// Paper end - optimise chunk tick iteration
|
// Paper end - optimise chunk tick iteration
|
||||||
|
@ -25,7 +25,7 @@ index ec0419e2d895d08d4ba069c98f994839d9da6a05..ed6a7cd6874e6692c60c5faedd2a86ef
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onChunkRemove() {
|
public void onChunkRemove() {
|
||||||
@@ -108,6 +114,12 @@ public class ChunkHolder {
|
@@ -101,6 +107,12 @@ public class ChunkHolder {
|
||||||
this.chunkMap.needsChangeBroadcasting.remove(this);
|
this.chunkMap.needsChangeBroadcasting.remove(this);
|
||||||
}
|
}
|
||||||
// Paper end - optimise chunk tick iteration
|
// Paper end - optimise chunk tick iteration
|
||||||
|
@ -39,7 +39,7 @@ index ec0419e2d895d08d4ba069c98f994839d9da6a05..ed6a7cd6874e6692c60c5faedd2a86ef
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc65845cd98d2 100644
|
index 85d5f8b52cbdcf39c0d62c3005712aa5f0bdde93..4f2d6dcbd2f2e94cb82f723f88cb020bf75a7ab9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -157,6 +157,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -157,6 +157,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
@ -55,7 +55,7 @@ index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc658
|
||||||
|
|
||||||
// Paper start - distance maps
|
// Paper start - distance maps
|
||||||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||||
@@ -184,6 +190,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -183,6 +189,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||||
}
|
}
|
||||||
// Paper end - per player mob spawning
|
// Paper end - per player mob spawning
|
||||||
|
@ -63,7 +63,7 @@ index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc658
|
||||||
}
|
}
|
||||||
|
|
||||||
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
void removePlayerFromDistanceMaps(ServerPlayer player) {
|
||||||
@@ -193,6 +200,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -192,6 +199,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.playerMobSpawnMap.remove(player);
|
this.playerMobSpawnMap.remove(player);
|
||||||
this.playerChunkTickRangeMap.remove(player);
|
this.playerChunkTickRangeMap.remove(player);
|
||||||
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
|
@ -71,7 +71,7 @@ index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc658
|
||||||
// Paper start - per player mob spawning
|
// Paper start - per player mob spawning
|
||||||
if (this.playerMobDistanceMap != null) {
|
if (this.playerMobDistanceMap != null) {
|
||||||
this.playerMobDistanceMap.remove(player);
|
this.playerMobDistanceMap.remove(player);
|
||||||
@@ -211,6 +219,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -210,6 +218,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player));
|
||||||
}
|
}
|
||||||
// Paper end - per player mob spawning
|
// Paper end - per player mob spawning
|
||||||
|
@ -79,7 +79,7 @@ index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc658
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -329,6 +338,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -328,6 +337,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
|
@ -104,10 +104,10 @@ index 84dfa7efa4be86558c38ee9e6f70f87b5638173a..c2dec99102fa4c64c3c874f725cdc658
|
||||||
|
|
||||||
protected ChunkGenerator generator() {
|
protected ChunkGenerator generator() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index b1cc896a3f5d7e59a15969308d78d2ef036b0cb1..4bec4a6955d6c38c8bd8fb9a10d153209d693a01 100644
|
index f1ae9c3b3db3a7540650365b1c8a9b8274b25644..ac3d978b81f0f238ace9724f817c25cbdd866e83 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -481,6 +481,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -562,6 +562,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ index b1cc896a3f5d7e59a15969308d78d2ef036b0cb1..4bec4a6955d6c38c8bd8fb9a10d15320
|
||||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||||
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
||||||
@@ -606,6 +684,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -687,6 +765,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick(BooleanSupplier shouldKeepTicking) {
|
public void tick(BooleanSupplier shouldKeepTicking) {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4bec4a6955d6c38c8bd8fb9a10d153209d693a01..b89544fdfceee67fb452c37294131efca007e2fe 100644
|
index ac3d978b81f0f238ace9724f817c25cbdd866e83..e03810a2c4dea09f52236e7d25877cd803ed764f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2656,6 +2656,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2737,6 +2737,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Spigot end
|
// Spigot end
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||||
|
|
|
@ -19,7 +19,7 @@ index 1080e1f67afe5574baca0df50cdb1d029a7a586a..a2f71a6d1a9e98133dff6cd0f625da94
|
||||||
}
|
}
|
||||||
final Object val = config.get(key);
|
final Object val = config.get(key);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index b975cca39e18fd274702543066971fcf0cc24186..a2abdcd161bae048f1c7fd40b3a93d909ebbd0b4 100644
|
index 3c7920721914588a3e7eaf1faff46f7305823416..eee2239cd715d01c5adbf1cd79282e115f42cd2e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -431,7 +431,14 @@ public abstract class ChunkGenerator {
|
@@ -431,7 +431,14 @@ public abstract class ChunkGenerator {
|
||||||
|
|
|
@ -8,7 +8,7 @@ Move collision logic to just the hasNewCollision call instead of getCubes + hasN
|
||||||
CHECK ME
|
CHECK ME
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 13e73042653909f194cfc909a96370656cbcf1ca..be79308ac6d30afe7b626f325a44b607969477fe 100644
|
index 13e73042653909f194cfc909a96370656cbcf1ca..0dc3cfb53a34cb7ecfa0a31c4c0faa247dda66e6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -647,7 +647,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -647,7 +647,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
@ -116,7 +116,7 @@ index 13e73042653909f194cfc909a96370656cbcf1ca..be79308ac6d30afe7b626f325a44b607
|
||||||
// Paper start - prevent position desync
|
// Paper start - prevent position desync
|
||||||
if (this.awaitingPositionFromClient != null) {
|
if (this.awaitingPositionFromClient != null) {
|
||||||
return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
||||||
@@ -1500,11 +1535,22 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1500,11 +1535,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
boolean flag2 = false;
|
boolean flag2 = false;
|
||||||
|
|
||||||
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
|
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
|
||||||
|
@ -127,6 +127,7 @@ index 13e73042653909f194cfc909a96370656cbcf1ca..be79308ac6d30afe7b626f325a44b607
|
||||||
|
|
||||||
- if (!this.player.noPhysics && !this.player.isSleeping() && (flag2 && worldserver.noCollision(this.player, axisalignedbb) || this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2))) {
|
- if (!this.player.noPhysics && !this.player.isSleeping() && (flag2 && worldserver.noCollision(this.player, axisalignedbb) || this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2))) {
|
||||||
+ // Paper start - optimise out extra getCubes
|
+ // Paper start - optimise out extra getCubes
|
||||||
|
+ this.player.absMoveTo(d0, d1, d2, f, f1); // prevent desync by tping to the set position, dropped for unknown reasons by mojang
|
||||||
+ // Original for reference:
|
+ // Original for reference:
|
||||||
+ // boolean teleportBack = flag2 && worldserver.getCubes(this.player, axisalignedbb) || (didCollide && this.a((IWorldReader) worldserver, axisalignedbb));
|
+ // boolean teleportBack = flag2 && worldserver.getCubes(this.player, axisalignedbb) || (didCollide && this.a((IWorldReader) worldserver, axisalignedbb));
|
||||||
+ boolean teleportBack = flag2; // violating this is always a fail
|
+ boolean teleportBack = flag2; // violating this is always a fail
|
||||||
|
@ -141,7 +142,7 @@ index 13e73042653909f194cfc909a96370656cbcf1ca..be79308ac6d30afe7b626f325a44b607
|
||||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||||
} else {
|
} else {
|
||||||
@@ -1587,6 +1633,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1587,6 +1634,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@ Makes the PlayerKickEvent fire on the main thread for
|
||||||
illegal characters or chat out-of-order errors.
|
illegal characters or chat out-of-order errors.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index be79308ac6d30afe7b626f325a44b607969477fe..37a7d0189ccceb114b1f0f82d2ccb420e0b251cc 100644
|
index 0dc3cfb53a34cb7ecfa0a31c4c0faa247dda66e6..52885e9a9b761465a6f65026b19b2757bce38c82 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2161,7 +2161,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2162,7 +2162,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
||||||
|
@ -20,7 +20,7 @@ index be79308ac6d30afe7b626f325a44b607969477fe..37a7d0189ccceb114b1f0f82d2ccb420
|
||||||
} else {
|
} else {
|
||||||
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages());
|
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages());
|
||||||
|
|
||||||
@@ -2195,7 +2197,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2196,7 +2198,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
@Override
|
@Override
|
||||||
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
||||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
||||||
|
@ -30,7 +30,7 @@ index be79308ac6d30afe7b626f325a44b607969477fe..37a7d0189ccceb114b1f0f82d2ccb420
|
||||||
} else {
|
} else {
|
||||||
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());
|
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());
|
||||||
|
|
||||||
@@ -2281,7 +2285,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2282,7 +2286,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||||
if (!this.updateChatOrder(timestamp)) {
|
if (!this.updateChatOrder(timestamp)) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message);
|
ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message);
|
||||||
|
|
|
@ -20,7 +20,7 @@ seeds/salts to the frequency reducer which has a similar effect.
|
||||||
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index a2abdcd161bae048f1c7fd40b3a93d909ebbd0b4..287c7a210df1f9d260b2c4bafe85e01943fc792d 100644
|
index eee2239cd715d01c5adbf1cd79282e115f42cd2e..8bab3fcfc6aa6c0b37621474a69f15e94bda2113 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -568,7 +568,7 @@ public abstract class ChunkGenerator {
|
@@ -568,7 +568,7 @@ public abstract class ChunkGenerator {
|
||||||
|
|
|
@ -7,7 +7,7 @@ Bring the vehicle move packet behavior in line with the
|
||||||
regular player move packet.
|
regular player move packet.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 37a7d0189ccceb114b1f0f82d2ccb420e0b251cc..912c831ca4c52810ff16d4c8f4659d71347ddfa5 100644
|
index 52885e9a9b761465a6f65026b19b2757bce38c82..8527025729614a2828e5c39e40747b3fc0cc0c61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -576,6 +576,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -576,6 +576,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 912c831ca4c52810ff16d4c8f4659d71347ddfa5..52021f110bb873cfedacd874a9d7a74055a537bb 100644
|
index 8527025729614a2828e5c39e40747b3fc0cc0c61..e9fc80f4d934bb485781b3213708e37792b50be1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -3307,7 +3307,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3308,7 +3308,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
||||||
|
|
||||||
if (this.player.level().isLoaded(blockposition)) {
|
if (this.player.level().isLoaded(blockposition)) {
|
||||||
|
|
|
@ -18,10 +18,10 @@ index 9951e999b1440ef623f14bdd46b5e42a90387f1e..91e6161449dc5625331e467d9e837575
|
||||||
|
|
||||||
if (dedicatedserverproperties.enableQuery) {
|
if (dedicatedserverproperties.enableQuery) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 52021f110bb873cfedacd874a9d7a74055a537bb..67c39acfc811eaef9ea58f76c9da9dcb10a031a2 100644
|
index e9fc80f4d934bb485781b3213708e37792b50be1..079fc18274102dea52b14bf39e2f72f89a014fed 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2897,7 +2897,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2898,7 +2898,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
|
||||||
if (this.server.isHardcore()) {
|
if (this.server.isHardcore()) {
|
||||||
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
|
this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper
|
||||||
|
|
|
@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index b89544fdfceee67fb452c37294131efca007e2fe..2737bd5f1915466a73dd4e093e35301c4353ddea 100644
|
index e03810a2c4dea09f52236e7d25877cd803ed764f..6ed2833f89fd159daa81cd8b577be31a886469eb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2566,6 +2566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2647,6 +2647,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTickingStart(Entity entity) {
|
public void onTickingStart(Entity entity) {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 67c39acfc811eaef9ea58f76c9da9dcb10a031a2..7675bb14e02322ea58cfde1dd6837c0ddefdd798 100644
|
index 079fc18274102dea52b14bf39e2f72f89a014fed..af9e34f5f07626121f7df16d077360940bda7e43 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -3449,6 +3449,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3450,6 +3450,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
@Override
|
@Override
|
||||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
|
|
|
@ -2008,7 +2008,7 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 2737bd5f1915466a73dd4e093e35301c4353ddea..4e2b2223c90f1e994dcd584dfa570953caf37a55 100644
|
index 6ed2833f89fd159daa81cd8b577be31a886469eb..90b69060de8bf17b3414a79b901ee7c652f646a8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
@ -2019,7 +2019,7 @@ index 2737bd5f1915466a73dd4e093e35301c4353ddea..4e2b2223c90f1e994dcd584dfa570953
|
||||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||||
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||||
@@ -2555,6 +2556,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2636,6 +2637,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return this.randomSequences;
|
return this.randomSequences;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
||||||
Just simply prevent them from being added to the world instead.
|
Just simply prevent them from being added to the world instead.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4e2b2223c90f1e994dcd584dfa570953caf37a55..6369fba72d7bf2db00f7df064242561681f35a41 100644
|
index 90b69060de8bf17b3414a79b901ee7c652f646a8..1ee55cb0e1a75f45e5d10feb8a611b45653df60a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1564,6 +1564,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1645,6 +1645,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't print component in resource pack rejection message
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 7675bb14e02322ea58cfde1dd6837c0ddefdd798..cb7146db52b59e7d51146d79a1655292e52ab286 100644
|
index af9e34f5f07626121f7df16d077360940bda7e43..c10aba1a414eaa0349ab0b325b6673eb2142bb05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2031,7 +2031,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2032,7 +2032,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
|
public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
|
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {
|
||||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors
|
||||||
TODO: potentially add some kick leeway
|
TODO: potentially add some kick leeway
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index cb7146db52b59e7d51146d79a1655292e52ab286..3e8d06db9f182ce7a09887f850f4d0a8556e5ae1 100644
|
index c10aba1a414eaa0349ab0b325b6673eb2142bb05..e348a3da6f743b211aaef8af738f31bb4d196370 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2289,7 +2289,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2290,7 +2290,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||||
if (!this.updateChatOrder(timestamp)) {
|
if (!this.updateChatOrder(timestamp)) {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 3e8d06db9f182ce7a09887f850f4d0a8556e5ae1..e197c14ff64ef38a2c7a911906c62178b83002fd 100644
|
index e348a3da6f743b211aaef8af738f31bb4d196370..2c8e77df54167ac6b3ae3b17f86a9e147aa27a05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2536,7 +2536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2537,7 +2537,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
// this.chatSpamTickCount += 20;
|
// this.chatSpamTickCount += 20;
|
||||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API
|
||||||
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
|
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index e197c14ff64ef38a2c7a911906c62178b83002fd..6c132a65916520ad7c4f09c65aed1ce5d0cc6f49 100644
|
index 2c8e77df54167ac6b3ae3b17f86a9e147aa27a05..45f28f27304373733128b4e686d0b1b21876d5c1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1707,11 +1707,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1708,11 +1708,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
return false; // CraftBukkit - Return event status
|
return false; // CraftBukkit - Return event status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@ index 0f0cf4fdfcbf8537696f15f98f3fb7e68baeb27c..c38268b11dd5a76d5b3c2013c241063c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 6c132a65916520ad7c4f09c65aed1ce5d0cc6f49..8011128c540f964cebec0b8730a0caffb007c138 100644
|
index 45f28f27304373733128b4e686d0b1b21876d5c1..4d89165216883e58f6bfc732f6a47eb607ef569c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -1853,8 +1853,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1854,8 +1854,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - Don't allow digging in unloaded chunks
|
// Paper end - Don't allow digging in unloaded chunks
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid signature login stacktrace
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 8011128c540f964cebec0b8730a0caffb007c138..ee2043891c04b95fccccbd19c79b91d7b8fcb436 100644
|
index 4d89165216883e58f6bfc732f6a47eb607ef569c..4e0397b59e3c11dc8362610bbc90a841a624394d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -3584,7 +3584,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3585,7 +3585,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
|
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
|
||||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
||||||
|
|
|
@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
|
||||||
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
|
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||||
index 09234062090c210227350cafeed141f8cb73108a..9f5f0d8ddc8f480b48079c70e38c9c08eff403f6 100644
|
index 3294da27227b5a332904398afa56d21ea97d55f0..77d05f7efdcdceef681a75692c208075d873d368 100644
|
||||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||||
@@ -254,13 +254,26 @@ public class GlobalConfiguration extends ConfigurationPart {
|
@@ -239,13 +239,26 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
public Misc misc;
|
public Misc misc;
|
||||||
|
|
||||||
public class Misc extends ConfigurationPart {
|
public class Misc extends ConfigurationPart {
|
||||||
|
|
|
@ -79,10 +79,10 @@ index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 6369fba72d7bf2db00f7df064242561681f35a41..3a5686086e113eed8b80bb65f5b05d4b81138b00 100644
|
index 1ee55cb0e1a75f45e5d10feb8a611b45653df60a..b4eae79189397995cbc81d449fcd82c7a6ea8327 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1010,7 +1010,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1091,7 +1091,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
} else {
|
} else {
|
||||||
AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D);
|
AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D);
|
||||||
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 3a5686086e113eed8b80bb65f5b05d4b81138b00..83267ae18c606116cf0c0b55549dc732f269a5d7 100644
|
index b4eae79189397995cbc81d449fcd82c7a6ea8327..d3e2005f4f1abd9ad5bda6acc8860bd74a2d2d25 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2602,7 +2602,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2683,7 +2683,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (entity instanceof Mob) {
|
if (entity instanceof Mob) {
|
||||||
Mob entityinsentient = (Mob) entity;
|
Mob entityinsentient = (Mob) entity;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ index 3a5686086e113eed8b80bb65f5b05d4b81138b00..83267ae18c606116cf0c0b55549dc732
|
||||||
String s = "onTrackingStart called during navigation iteration";
|
String s = "onTrackingStart called during navigation iteration";
|
||||||
|
|
||||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||||
@@ -2687,7 +2687,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2768,7 +2768,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (entity instanceof Mob) {
|
if (entity instanceof Mob) {
|
||||||
Mob entityinsentient = (Mob) entity;
|
Mob entityinsentient = (Mob) entity;
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
|
||||||
instead of just checking players in their world.
|
instead of just checking players in their world.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 83267ae18c606116cf0c0b55549dc732f269a5d7..a97926b5d36c92d5696c6b7a547ada30d652afbd 100644
|
index d3e2005f4f1abd9ad5bda6acc8860bd74a2d2d25..5932cfd855ee08442e0f8efb52bd9f2de8d6fcc7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -2724,4 +2724,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2805,4 +2805,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
|
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,10 +66,10 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..bf6a70a69bb695ec1a202cd1e863c468
|
||||||
public static class DataItem<T> {
|
public static class DataItem<T> {
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index ee2043891c04b95fccccbd19c79b91d7b8fcb436..d4c683b99bdc8fa76749b8edd1136303f7367101 100644
|
index 4e0397b59e3c11dc8362610bbc90a841a624394d..61aa5fec06b2c9a0986596790fc735caec1cc564 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2795,7 +2795,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2796,7 +2796,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
||||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index d4c683b99bdc8fa76749b8edd1136303f7367101..60d1a2ec1f7b800d66f923ae3149db2c6a62691b 100644
|
index 61aa5fec06b2c9a0986596790fc735caec1cc564..06ea0185c7eb6bbb2ece220db4c0795ddabc465b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2253,7 +2253,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2254,7 +2254,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
|
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
String command = "/" + packet.command();
|
String command = "/" + packet.command();
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 60d1a2ec1f7b800d66f923ae3149db2c6a62691b..9ca6a2e610b6a82286bb617177bec657fbb13c72 100644
|
index 06ea0185c7eb6bbb2ece220db4c0795ddabc465b..47e61033ccebe5cd2a850207aaed6235cc14b599 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -3599,7 +3599,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3600,7 +3600,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||||
this.chatMessageChain.append((executor) -> {
|
this.chatMessageChain.append((executor) -> {
|
||||||
this.player.setChatSession(session);
|
this.player.setChatSession(session);
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Treat sequence violations like they should be
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 9ca6a2e610b6a82286bb617177bec657fbb13c72..ed54d3f9ab92b3391d459bcd92b7b00adc6e6238 100644
|
index 47e61033ccebe5cd2a850207aaed6235cc14b599..307d5eed074df91ed4746881ffeae22041ecde0d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2123,6 +2123,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2124,6 +2124,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
public void ackBlockChangesUpTo(int sequence) {
|
public void ackBlockChangesUpTo(int sequence) {
|
||||||
if (sequence < 0) {
|
if (sequence < 0) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ index 23e0e6937e28f09271a4ec7c35e0076a576cf3d3..4aa8b483841028fbcc43f9ed47730881
|
||||||
UPDATE_GAME_MODE((serialized, buf) -> {
|
UPDATE_GAME_MODE((serialized, buf) -> {
|
||||||
serialized.gameMode = GameType.byId(buf.readVarInt());
|
serialized.gameMode = GameType.byId(buf.readVarInt());
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index ed54d3f9ab92b3391d459bcd92b7b00adc6e6238..705181a7cc203b7f60d7038d1f341c2d52cec6b1 100644
|
index 307d5eed074df91ed4746881ffeae22041ecde0d..10c387c813d5af1c9522d361f2c843c096fcbe6e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
@ -49,7 +49,7 @@ index ed54d3f9ab92b3391d459bcd92b7b00adc6e6238..705181a7cc203b7f60d7038d1f341c2d
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetPosition() {
|
public void resetPosition() {
|
||||||
@@ -3597,6 +3605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3598,6 +3606,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
private void resetPlayerChatState(RemoteChatSession session) {
|
private void resetPlayerChatState(RemoteChatSession session) {
|
||||||
this.chatSession = session;
|
this.chatSession = session;
|
||||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index a97926b5d36c92d5696c6b7a547ada30d652afbd..42d5b4ffc51da90a8f3bbec84e44ac2b0cb7b5ee 100644
|
index 5932cfd855ee08442e0f8efb52bd9f2de8d6fcc7..2ac23779222369ace69f1e3f7fb12184865b7a43 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1701,6 +1701,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1782,6 +1782,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) {
|
public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue