Fix erroneuous entity count reporting in timings

This commit is contained in:
Spottedleaf 2020-07-14 11:58:55 +01:00 committed by Shane Freeder
parent e594a58695
commit 94315dad74
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
31 changed files with 95 additions and 103 deletions

View File

@ -1581,7 +1581,7 @@ index f8d859cda8186d706304b4e182bca34573f09433..057d703fe73de9bb9ca6f0e263463d32
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer; public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bd5a2eee9cb435a5ee75a39cea231151fba00387..a559f423b19a1e6f8efb6327270250844e8c6fb6 100644 index fc7e29abc5a2e4fdf03f61e54c2ab716273df813..35920c82ef9b79a6d8f806b90f2f8dbd0de061c2 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger; @@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger;
@ -1628,7 +1628,7 @@ index bd5a2eee9cb435a5ee75a39cea231151fba00387..a559f423b19a1e6f8efb632727025084
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea14a6d33d 100644 index d643ff0a0ae9d45711c9a40fc12af68157604a33..4b2d67b8f147015c3ecdd19f79b2719ff079c26a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -3,6 +3,8 @@ package net.minecraft.server; @@ -3,6 +3,8 @@ package net.minecraft.server;
@ -1685,15 +1685,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
gameprofilerfiller.exitEnter("blockEvents"); gameprofilerfiller.exitEnter("blockEvents");
timings.doSounds.startTiming(); // Spigot timings.doSounds.startTiming(); // Spigot
this.ah(); this.ah();
@@ -360,6 +365,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -508,6 +513,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
timings.entityTick.startTiming(); // Spigot
+ TimingHistory.entityTicks += this.entitiesById.size(); // Paper
while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity = (Entity) entry.getValue();
@@ -508,6 +514,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
gameprofilerfiller.exitEnter("tickBlocks"); gameprofilerfiller.exitEnter("tickBlocks");
@ -1701,7 +1693,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
if (i > 0) { if (i > 0) {
ChunkSection[] achunksection = chunk.getSections(); ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length; int l = achunksection.length;
@@ -539,7 +546,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -539,7 +545,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
} }
} }
@ -1710,7 +1702,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
gameprofilerfiller.exit(); gameprofilerfiller.exit();
} }
@@ -637,6 +644,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -637,6 +643,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) { if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) {
this.chunkCheck(entity); this.chunkCheck(entity);
} else { } else {
@ -1718,7 +1710,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
// Spigot start // Spigot start
if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
entity.ticksLived++; entity.ticksLived++;
@@ -644,7 +652,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -644,7 +651,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return; return;
} }
// Spigot end // Spigot end
@ -1728,7 +1720,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
entity.f(entity.locX(), entity.locY(), entity.locZ()); entity.f(entity.locX(), entity.locY(), entity.locZ());
entity.lastYaw = entity.yaw; entity.lastYaw = entity.yaw;
entity.lastPitch = entity.pitch; entity.lastPitch = entity.pitch;
@@ -671,7 +681,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -671,7 +680,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.a(entity, entity1); this.a(entity, entity1);
} }
} }
@ -1738,7 +1730,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
} }
} }
@@ -748,6 +760,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -748,6 +759,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (!flag1) { if (!flag1) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1746,7 +1738,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel")); iprogressupdate.a(new ChatMessage("menu.savingLevel"));
} }
@@ -757,7 +770,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -757,7 +769,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
iprogressupdate.c(new ChatMessage("menu.savingChunks")); iprogressupdate.c(new ChatMessage("menu.savingChunks"));
} }

View File

@ -101,10 +101,10 @@ index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43ce
if (i >= 0 && i < this.list.size()) { if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i); NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9df9ce88e23b31f0303a3c84136a10ea14a6d33d..f764eaf58d225d3c875dda66c1a2ac43ef3c1eae 100644 index 4b2d67b8f147015c3ecdd19f79b2719ff079c26a..11bf3797bde480107e60fbfa32db61003c513201 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1087,6 +1087,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.navigators.add(((EntityInsentient) entity).getNavigation()); this.navigators.add(((EntityInsentient) entity).getNavigation());
} }
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit

View File

@ -19,10 +19,10 @@ index 25e0717186366af580e512eedfd403b8efc64a75..41436a4ead736dc925ca77d4cabf925f
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f764eaf58d225d3c875dda66c1a2ac43ef3c1eae..cca6879e8304a5f345ecc2603a189d898db283a5 100644 index 11bf3797bde480107e60fbfa32db61003c513201..3033745e25fb7f905506a18ac06bdf55a9f863df 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -471,7 +471,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -470,7 +470,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("thunder"); gameprofilerfiller.enter("thunder");
BlockPosition blockposition; BlockPosition blockposition;

View File

@ -19,10 +19,10 @@ index 41436a4ead736dc925ca77d4cabf925f4e492d68..f53d8b96757cbedc5fbb16195952a7da
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index cca6879e8304a5f345ecc2603a189d898db283a5..223482e468862407d53299219e2f4debecd0cd87 100644 index 3033745e25fb7f905506a18ac06bdf55a9f863df..5330a1f3ea1dd8ba7471b10610f958fa912a7f69 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -495,7 +495,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -494,7 +494,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
gameprofilerfiller.exitEnter("iceandsnow"); gameprofilerfiller.exitEnter("iceandsnow");

View File

@ -22,10 +22,10 @@ index d8b9d87bca6eb95c2cea91e4d8466b9792582d52..92d1dffbf436a21943b4a6aa0fabf54f
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f38c88df648aa715aefb18018779efd8075d781e..5e64aca8c318f2fd909cd0e934867e890a152373 100644 index 0572f150fc6f83eaa8a4fb708f1eab5df7357735..18b14851ab2c1cbe838d581b560c1f16726a3a61 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -474,7 +474,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
blockposition = this.a(this.a(j, 0, k, 15)); blockposition = this.a(this.a(j, 0, k, 15));
if (this.isRainingAt(blockposition)) { if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b800844c9a2ae76019213ccb64655eeea2885a67..85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b 100644 index 63f9fbc68c9824832db8c99bbd5ebfe347977242..5bfd8ae57e8808a7f282071b7d46f64acde6dd49 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1056,7 +1056,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1055,7 +1055,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity instanceof EntityInsentient) { if (entity instanceof EntityInsentient) {
this.navigators.remove(((EntityInsentient) entity).getNavigation()); this.navigators.remove(((EntityInsentient) entity).getNavigation());
} }
@ -17,7 +17,7 @@ index b800844c9a2ae76019213ccb64655eeea2885a67..85e6b6fbf99b177a15a04b91fce36a5d
entity.valid = false; // CraftBukkit entity.valid = false; // CraftBukkit
} }
@@ -1094,6 +1094,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1093,6 +1093,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation(); entity.origin = entity.getBukkitEntity().getLocation();
} }
// Paper end // Paper end

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary. Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 58277457ef879c48f3678efeb2a646e116320754..bd7214e4679044461f141f3000f1dab648a24051 100644 index 3fc0fcc9e6598ec77fd562c0887335fe018b4051..e2167413702f8a7369e4719fd6bb28e2e4fc86ef 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -67,10 +67,10 @@ index 58277457ef879c48f3678efeb2a646e116320754..bd7214e4679044461f141f3000f1dab6
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b..6bcead2505365ed2631cd991ac2dae99fff14f78 100644 index 5bfd8ae57e8808a7f282071b7d46f64acde6dd49..ea3a39a45bbc828728de27174c139432a175f653 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1542,7 +1542,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1541,7 +1541,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size()));
@ -79,7 +79,7 @@ index 85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b..6bcead2505365ed2631cd991ac2dae99
bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a())); bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a()));
bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a())); bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a()));
bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n"); bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n");
@@ -1681,7 +1681,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1680,7 +1680,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private void a(Writer writer) throws IOException { private void a(Writer writer) throws IOException {
CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer); CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer);

View File

@ -102,10 +102,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d
for ( org.bukkit.map.MapCursor cursor : render.cursors) { for ( org.bukkit.map.MapCursor cursor : render.cursors) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6bcead2505365ed2631cd991ac2dae99fff14f78..f99bb7f52254d7f052ecfce2b94da329a9d05eea 100644 index ea3a39a45bbc828728de27174c139432a175f653..4667155b33325a6dccf3fd5c5ce42293731282de 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1012,6 +1012,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1011,6 +1011,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
{ {
if ( iter.next().trackee == entity ) if ( iter.next().trackee == entity )
{ {

View File

@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f99bb7f52254d7f052ecfce2b94da329a9d05eea..b68338310106858195099bb45b8bf4da723b8439 100644 index 4667155b33325a6dccf3fd5c5ce42293731282de..d9250c630a8146ed3c906607b2165594a6000d2d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -919,6 +919,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -918,6 +918,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start // CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot

View File

@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent Keep them consistent
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b68338310106858195099bb45b8bf4da723b8439..809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6 100644 index d9250c630a8146ed3c906607b2165594a6000d2d..318345cddb3ecc102d88a6879815af55d05814ee 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -727,7 +727,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity.ck()) { if (entity.ck()) {
this.getMethodProfiler().enter("chunkCheck"); this.getMethodProfiler().enter("chunkCheck");
int i = MathHelper.floor(entity.locX() / 16.0D); int i = MathHelper.floor(entity.locX() / 16.0D);

View File

@ -10,7 +10,7 @@ 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/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f67d4ec66 100644 index 318345cddb3ecc102d88a6879815af55d05814ee..089e7c301d48a2d4302ca3d6bb1235e6207363b7 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -22,7 +22,7 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f
public final ChunkProviderServer chunkProvider; // Paper - public public final ChunkProviderServer chunkProvider; // Paper - public
boolean tickingEntities; boolean tickingEntities;
private final MinecraftServer server; private final MinecraftServer server;
@@ -1310,12 +1310,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1309,12 +1309,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
@ -43,7 +43,7 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f
if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 81f014977b95056020e9695dd49cbbf45d61b8ea..0a280692e6dc6b0a9e47bfd12f70774d49628398 100644 index 214e3d1a626a3a3ff523904d15aec1e351b9957b..14e495f4889383c789acb880cca726c81c366d26 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2329,11 +2329,17 @@ public class CraftWorld implements World { @@ -2329,11 +2329,17 @@ public class CraftWorld implements World {

View File

@ -34,7 +34,7 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481
this.activeContainer = this.defaultContainer; this.activeContainer = this.defaultContainer;
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index d2c61467b8373444609a6aad9688c5b747547d9c..dc8f88d102c06d8fb28ffd66de36f32efec54ff2 100644 index 49c455ae3ee793523133f0dde8dc6037ca899691..79ae3e47bff8a4e910f4dacda8930619d015c5dc 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -408,7 +408,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -408,7 +408,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -114,10 +114,10 @@ index 9d05320b132679ccd511422c2c187b0d5fa89c2c..4c11aa13b725b2bb502701f2d5fb3878
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
cserver.getPluginManager().callEvent(playerQuitEvent); cserver.getPluginManager().callEvent(playerQuitEvent);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda 100644 index 089e7c301d48a2d4302ca3d6bb1235e6207363b7..b7253c4201d601d1e2e354af5d2b17421629d48e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -966,7 +966,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
for (TileEntity tileentity : chunk.getTileEntities().values()) { for (TileEntity tileentity : chunk.getTileEntities().values()) {
if (tileentity instanceof IInventory) { if (tileentity instanceof IInventory) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) {
@ -126,7 +126,7 @@ index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fb
} }
} }
} }
@@ -1025,7 +1025,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1024,7 +1024,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) {
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())) {

View File

@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data...
We should kind of know about these things you know. We should kind of know about these things you know.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda..57be6e9c0062cfe94ad551abd7e8bea1213a10b6 100644 index b7253c4201d601d1e2e354af5d2b17421629d48e..4747c35aee5e3c4cc8b1bcfd63f9d9c43cbef8fc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -956,7 +956,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity1 == null) { if (entity1 == null) {
return false; return false;
} else { } else {

View File

@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb
protected void g() { protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b45eb01e34 100644 index 9c3c0a6ff57a8d1788cf6d7cd91571f4212eb701..530f204b9bcacdac127a44554e06aabac3897766 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -52,7 +52,7 @@ index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b4
public boolean captureBlockStates = false; public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false; public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1aa853c75 100644 index 4747c35aee5e3c4cc8b1bcfd63f9d9c43cbef8fc..cd6fa624205ab18f9c5a8fd700de3eccb7ef471e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -65,7 +65,7 @@ index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkProvider.getChunkAt(x, z, false); return this.chunkProvider.getChunkAt(x, z, false);
@@ -919,8 +922,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -918,8 +921,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start // CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
@ -95,7 +95,7 @@ index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit
return false; return false;
} else if (this.isUUIDTaken(entity)) { } else if (this.isUUIDTaken(entity)) {
@@ -1080,7 +1103,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1079,7 +1102,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
} }

View File

@ -80,10 +80,10 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4
public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) {
if (nbttagcompound != null) { if (nbttagcompound != null) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index fc6639d9729b2714389f191de7a21cb1aa853c75..e5fff59efc2d2794024eae93854a296d2b82cf3e 100644 index cd6fa624205ab18f9c5a8fd700de3eccb7ef471e..bbc0f1b7b363f21e861be5b187d01aed9a89597c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -999,6 +999,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
List[] aentityslice = chunk.getEntitySlices(); // Spigot List[] aentityslice = chunk.getEntitySlices(); // Spigot
int i = aentityslice.length; int i = aentityslice.length;
@ -91,7 +91,7 @@ index fc6639d9729b2714389f191de7a21cb1aa853c75..e5fff59efc2d2794024eae93854a296d
for (int j = 0; j < i; ++j) { for (int j = 0; j < i; ++j) {
List<Entity> entityslice = aentityslice[j]; // Spigot List<Entity> entityslice = aentityslice[j]; // Spigot
Iterator iterator = entityslice.iterator(); Iterator iterator = entityslice.iterator();
@@ -1012,11 +1013,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1011,11 +1012,25 @@ public class WorldServer extends World implements GeneratorAccessSeed {
throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!")); throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!"));
} }

View File

@ -63,10 +63,10 @@ index b0338278f3cfecdb30e1d2febf1ff2a04d0cc66d..55f8863f823836065f4de8240bfeb490
public float getBukkitYaw() { public float getBukkitYaw() {
return this.yaw; return this.yaw;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e228586b5 100644 index bbc0f1b7b363f21e861be5b187d01aed9a89597c..a05e117e76350da7663612f303444bb16b85ba21 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1151,6 +1151,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
entity.origin = entity.getBukkitEntity().getLocation(); entity.origin = entity.getBukkitEntity().getLocation();
} }
// Paper end // Paper end
@ -74,7 +74,7 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e
new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
} }
@@ -1164,6 +1165,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1163,6 +1164,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.removeEntityFromChunk(entity); this.removeEntityFromChunk(entity);
this.entitiesById.remove(entity.getId()); this.entitiesById.remove(entity.getId());
this.unregisterEntity(entity); this.unregisterEntity(entity);
@ -83,7 +83,7 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0..265822138eee71daa1d6858adc17985d941d9d4c 100644 index b1e51fa8593cd9459058a557f1b506817879bdd4..898b97b52dd1bf8c5aa0b436b01ed0d83681810e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1041,6 +1041,7 @@ public class CraftWorld implements World { @@ -1041,6 +1041,7 @@ public class CraftWorld implements World {

View File

@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
int i = blockposition.getX(); int i = blockposition.getX();
int j = blockposition.getY(); int j = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0df7176f1 100644 index 9b6912f6e7b3c289948325a6985d9c961a8a8e30..a0f93486b21e3bdbcf3b705c005c2e13f75589ed 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -212,6 +212,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -212,6 +212,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -95,10 +95,10 @@ index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0
public boolean s_() { public boolean s_() {
return this.isClientSide; return this.isClientSide;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 1a103dd830109e119acc1a371b37386e228586b5..a343cba51850bb7214c241a92db0694d3c1aaf60 100644 index a05e117e76350da7663612f303444bb16b85ba21..dff170fb64ffd26cc7c5ab4b3863e48989c79ad4 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1482,15 +1482,17 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition)); this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition));
} }

View File

@ -84,10 +84,10 @@ index 61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb..6a00d1dcd62034c595723547afb4637e
}); });
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a343cba51850bb7214c241a92db0694d3c1aaf60..a76178da7c923b2dc47bf97f848f7455fe275891 100644 index dff170fb64ffd26cc7c5ab4b3863e48989c79ad4..22d39f465aa366459c1a62422945f5fb6c19e492 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -922,6 +922,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -921,6 +921,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit start // CraftBukkit start
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot

View File

@ -19,10 +19,10 @@ This change ensures the chunks are always loaded when entities are
added to the world, or a valid entity moves between chunks. added to the world, or a valid entity moves between chunks.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a76178da7c923b2dc47bf97f848f7455fe275891..576f5c8c4d702dae7f2db9fb221365394542fcfb 100644 index 22d39f465aa366459c1a62422945f5fb6c19e492..9d768cecf31b45710cfcad0d0ac0b302218d67d4 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -735,11 +735,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -734,11 +734,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
int k = MathHelper.floor(entity.locZ() / 16.0D); int k = MathHelper.floor(entity.locZ() / 16.0D);
if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) {
@ -42,7 +42,7 @@ index a76178da7c923b2dc47bf97f848f7455fe275891..576f5c8c4d702dae7f2db9fb22136539
if (entity.inChunk) { if (entity.inChunk) {
WorldServer.LOGGER.warn("Entity {} left loaded chunk area", entity); WorldServer.LOGGER.warn("Entity {} left loaded chunk area", entity);
} }
@@ -954,7 +961,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -953,7 +960,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return false; return false;
} }
// CraftBukkit end // CraftBukkit end

View File

@ -197,7 +197,7 @@ index 458802dc4b1f923b159168efff0546bb731da07b..936be3fd8954933ac218f62a172df687
ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> { CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 576f5c8c4d702dae7f2db9fb221365394542fcfb..a243dc63eb4c811065c742e61b334864ad582fbe 100644 index 9d768cecf31b45710cfcad0d0ac0b302218d67d4..d1580a77383a4ad5a45aca57f29258869b52b86c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList;
@ -209,7 +209,7 @@ index 576f5c8c4d702dae7f2db9fb221365394542fcfb..a243dc63eb4c811065c742e61b334864
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Queues; import com.google.common.collect.Queues;
@@ -988,8 +990,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -987,8 +989,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
if (entity1 == null) { if (entity1 == null) {
return false; return false;
} else { } else {

View File

@ -102,10 +102,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2
@Override @Override
public void a(ChunkCoordIntPair chunkcoordintpair) { public void a(ChunkCoordIntPair chunkcoordintpair) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af588b30d03 100644 index d1580a77383a4ad5a45aca57f29258869b52b86c..45959064c310997d26c5637a0e5cb61775c406c9 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1500,12 +1500,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1499,12 +1499,88 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return ((PersistentIdCounts) this.getMinecraftServer().D().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); return ((PersistentIdCounts) this.getMinecraftServer().D().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
} }
@ -198,7 +198,7 @@ index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af5
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3549404ec211e88f6d91bdcf07c661e2d2ac4875..29d88bf1a8c5272822dd26e5e93d102748d9abf2 100644 index 48805c32aabe453e0a860168b79ea9026fa848b1..b5621b8456fbd3c5e94a9b9ec9b4be0068962674 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1949,15 +1949,21 @@ public class CraftWorld implements World { @@ -1949,15 +1949,21 @@ public class CraftWorld implements World {

View File

@ -257,10 +257,10 @@ index 6dda11ffc022aa9bc7481506811a710a184f5e78..39d89d6209123ae2146ae292009cad44
return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); return PlayerChunk.getChunkState(playerchunk.getTicketLevel());
}); });
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e8382aabb36f58c55ba47e6495d47af588b30d03..479271a51ba7e9c433f030918bc926ccd93dc938 100644 index 45959064c310997d26c5637a0e5cb61775c406c9..e0023c77736bd67bde63e6ebd1822cd0a7918508 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -768,11 +768,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -767,11 +767,43 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition);
} }
@ -305,7 +305,7 @@ index e8382aabb36f58c55ba47e6495d47af588b30d03..479271a51ba7e9c433f030918bc926cc
try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel")); iprogressupdate.a(new ChatMessage("menu.savingLevel"));
@@ -798,6 +830,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -797,6 +829,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end // CraftBukkit end
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7e862f44ad8b8b878a8a86a4d1b48de4b4506c66..4529ccc02f53fadc6ac2df97682b21913487bc22 100644 index 00446fabbeac8105678cecb9f7f9f3dac4a43d74..b1ac1387e7c9e67120f0155957a4e66cc92a6d0d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1319,6 +1319,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1318,6 +1318,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition);
if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) {
@ -16,7 +16,7 @@ index 7e862f44ad8b8b878a8a86a4d1b48de4b4506c66..4529ccc02f53fadc6ac2df97682b2191
Iterator iterator = this.navigators.iterator(); Iterator iterator = this.navigators.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1329,6 +1330,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1328,6 +1329,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
} }

View File

@ -3899,7 +3899,7 @@ index b8c15047771bd4527b86e514a3b950b2ffc6eef0..303f6b0953ff3c29bd31ec5e02386a92
HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> { HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d5d1fd108 100644 index b1ac1387e7c9e67120f0155957a4e66cc92a6d0d..546a7eaa6cf06a37193104509d78fce7d344b224 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -3991,7 +3991,7 @@ index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d
} }
// CraftBukkit start // CraftBukkit start
@@ -1569,7 +1644,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1568,7 +1643,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> {

View File

@ -243,7 +243,7 @@ index 00827c335e9413e986d7f07d0adbcef0d106a553..c66a8011dde4932e03ea91194ea92a72
// TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them
public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d..93df6a29035bb3cc96409b145a2e1433d38bbe99 100644 index 7c6b7955c454c585eed7457d6680ce67e6219162..a31d293a00d325e4ee1eba48126b112df117fcfc 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1466,10 +1466,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1466,10 +1466,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -267,10 +267,10 @@ index 73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d..93df6a29035bb3cc96409b145a2e1433
public boolean isSavingDisabled() { public boolean isSavingDisabled() {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc6bedf3a9 100644 index 4883b12a8033f62e7c777f6b6f21003d89f470e4..f4571b7892cb7962618c1fee3aad86311c92ca28 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -557,7 +557,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -556,7 +556,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
}); });
} }
@ -284,7 +284,7 @@ index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc
ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
boolean flag = this.isRaining(); boolean flag = this.isRaining();
int j = chunkcoordintpair.d(); int j = chunkcoordintpair.d();
@@ -565,10 +570,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -564,10 +569,10 @@ public class WorldServer extends World implements GeneratorAccessSeed {
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
gameprofilerfiller.enter("thunder"); gameprofilerfiller.enter("thunder");
@ -297,7 +297,7 @@ index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc
if (this.isRainingAt(blockposition)) { if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
@@ -591,59 +596,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -590,59 +595,77 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
gameprofilerfiller.exitEnter("iceandsnow"); gameprofilerfiller.exitEnter("iceandsnow");

View File

@ -23,10 +23,10 @@ index c49d157b8ca25f9811bf64396c207b1c1d6e085d..e895bf811ce5d441541725ade48e3f07
private boolean locked = false; private boolean locked = false;
@Override @Override
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543161aba57 100644 index 22a726a7c4af08d7e7f40c780f392110ca8bf943..d0ed0348a7568f8313f0073a06d3ff35dbffe184 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -531,6 +531,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -530,6 +530,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
Entity entity2; Entity entity2;
while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) { while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) {
@ -34,7 +34,7 @@ index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543
this.registerEntity(entity2); this.registerEntity(entity2);
} }
@@ -1227,6 +1228,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1226,6 +1227,19 @@ public class WorldServer extends World implements GeneratorAccessSeed {
public void unregisterEntity(Entity entity) { public void unregisterEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot
@ -54,7 +54,7 @@ index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543
// Spigot start // Spigot start
if ( entity instanceof EntityHuman ) if ( entity instanceof EntityHuman )
{ {
@@ -1293,9 +1307,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1292,9 +1306,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
private void registerEntity(Entity entity) { private void registerEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot

View File

@ -15,10 +15,10 @@ Combine that with a buggy detail of the previous implementation of
the Dupe UUID patch, then this was the likely source of the "Ghost entities" the Dupe UUID patch, then this was the likely source of the "Ghost entities"
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index ceeefe7ac6b0dcdb96a8939e0d1ba543161aba57..f21011761ddf3082bc9bb59f1ec6d97e5d98c705 100644 index d0ed0348a7568f8313f0073a06d3ff35dbffe184..e5f5efa00c69ca0a06b2f28313ef7163a0e5c208 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1386,9 +1386,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1385,9 +1385,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
private void removeEntityFromChunk(Entity entity) { private void removeEntityFromChunk(Entity entity) {

View File

@ -7,7 +7,7 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing. Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b530316b582390c4c464bb1f3df48597c8bf7569..6ac39fc6cafdcbf7883e868ecb58a2ebfad41601 100644 index 210e91c56197818b622a3ef12a644ea1b77584e0..2d3eeb3a87e345ceb3496ec60d684452c070d4b7 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1443,6 +1443,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1443,6 +1443,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -26,10 +26,10 @@ index b530316b582390c4c464bb1f3df48597c8bf7569..6ac39fc6cafdcbf7883e868ecb58a2eb
EntityTypes<?> entitytypes = entity.getEntityType(); EntityTypes<?> entitytypes = entity.getEntityType();
int i = entitytypes.getChunkRange() * 16; int i = entitytypes.getChunkRange() * 16;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f21011761ddf3082bc9bb59f1ec6d97e5d98c705..d28985adf70b7a06688ac3113477a681f4b19693 100644 index e5f5efa00c69ca0a06b2f28313ef7163a0e5c208..9ae46983ce46f6e9f05869333474d7a3dac41658 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1352,7 +1352,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1351,7 +1351,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
} }
@ -38,7 +38,7 @@ index f21011761ddf3082bc9bb59f1ec6d97e5d98c705..d28985adf70b7a06688ac3113477a681
// CraftBukkit start - SPIGOT-5278 // CraftBukkit start - SPIGOT-5278
if (entity instanceof EntityDrowned) { if (entity instanceof EntityDrowned) {
this.navigators.add(((EntityDrowned) entity).navigationWater); this.navigators.add(((EntityDrowned) entity).navigationWater);
@@ -1363,6 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1362,6 +1362,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.navigators.add(((EntityInsentient) entity).getNavigation()); this.navigators.add(((EntityInsentient) entity).getNavigation());
} }
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit

View File

@ -226,7 +226,7 @@ index 0d91765cb6386c9483a6b5494e37bd7806638928..5b6f3d811ff55d0c6d55bddc7707ef87
// Spigot Start // Spigot Start
CrashReport crashreport; CrashReport crashreport;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a3719c5870c 100644 index 9ae46983ce46f6e9f05869333474d7a3dac41658..876ba27b34b0e5ecf9df548ef23c4b84749a7bdd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -452,6 +452,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -452,6 +452,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -245,7 +245,7 @@ index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a37
this.ticking = false; this.ticking = false;
gameprofilerfiller.exitEnter("entities"); gameprofilerfiller.exitEnter("entities");
boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
@@ -527,6 +529,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -526,6 +528,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
timings.entityTick.stopTiming(); // Spigot timings.entityTick.stopTiming(); // Spigot
this.tickingEntities = false; this.tickingEntities = false;
@ -253,7 +253,7 @@ index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a37
Entity entity2; Entity entity2;
@@ -536,6 +539,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -535,6 +538,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
timings.tickEntities.stopTiming(); // Spigot timings.tickEntities.stopTiming(); // Spigot

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Delay unsafe actions until after entity ticking is done
This will help prevent many cases of unregistering entities during entity ticking This will help prevent many cases of unregistering entities during entity ticking
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 894c3230cf61403beec29a60a9e69a3719c5870c..e99e47b0844bb33560c7c6fcf7712656e9d8cdb4 100644 index 876ba27b34b0e5ecf9df548ef23c4b84749a7bdd..b2048c87e715bc656e8c52e6628dd9a0905a6638 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -61,6 +61,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -61,6 +61,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -26,7 +26,7 @@ index 894c3230cf61403beec29a60a9e69a3719c5870c..e99e47b0844bb33560c7c6fcf7712656
private final MinecraftServer server; private final MinecraftServer server;
public final WorldDataServer worldDataServer; // CraftBukkit - type public final WorldDataServer worldDataServer; // CraftBukkit - type
public boolean savingDisabled; public boolean savingDisabled;
@@ -529,6 +539,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -528,6 +538,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
timings.entityTick.stopTiming(); // Spigot timings.entityTick.stopTiming(); // Spigot
this.tickingEntities = false; this.tickingEntities = false;

View File

@ -918,7 +918,7 @@ index 292d8c742d3be41ba8ad7fb7f1251dc7f790b62b..5b7b7506f5d1a7578fb54a578891324d
public static final class a extends LightEngineStorageArray<LightEngineStorageBlock.a> { public static final class a extends LightEngineStorageArray<LightEngineStorageBlock.a> {
diff --git a/src/main/java/net/minecraft/server/LightEngineStorageSky.java b/src/main/java/net/minecraft/server/LightEngineStorageSky.java diff --git a/src/main/java/net/minecraft/server/LightEngineStorageSky.java b/src/main/java/net/minecraft/server/LightEngineStorageSky.java
index 097f58e9ac3f4096d3b9dad75b6ebe76021fa92c..f744f62c93370d096c113f92ee81a8232c35501d 100644 index a35e7b392c74fadf2760d1fc2021e98d33858cb5..944094e8e770cc8c0205ef2aa6c48fff55d74639 100644
--- a/src/main/java/net/minecraft/server/LightEngineStorageSky.java --- a/src/main/java/net/minecraft/server/LightEngineStorageSky.java
+++ b/src/main/java/net/minecraft/server/LightEngineStorageSky.java +++ b/src/main/java/net/minecraft/server/LightEngineStorageSky.java
@@ -22,7 +22,12 @@ public class LightEngineStorageSky extends LightEngineStorage<LightEngineStorage @@ -22,7 +22,12 @@ public class LightEngineStorageSky extends LightEngineStorage<LightEngineStorage
@ -1281,7 +1281,7 @@ index 446c401b3139f8c6c0e70d883340f0140d94b752..a3bce8f13bf278af2d6870891daa9bf6
if (getCurrentPriority() != priority) { if (getCurrentPriority() != priority) {
this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 0e684a040b1a6cee056e8716c2a69620fc440af3..8c5639fa55404474df8656d3f6ad2db1bc71e3da 100644 index 2fac2e59ab0712459f03cdacc0f67c1528c5a5bf..5544254a655485b8ef9d2883da4d722fa57c63d9 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -1307,10 +1307,10 @@ index 35f4d2d9591e625ab0bbeab7b606761e74965eec..698d82dd736529a8cbfad5c6bed70ab9
this.a.a(t0); this.a.a(t0);
this.f(); this.f();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 472a0c624f09b7c6c07bbe8feadadf3ac7dd05a3..3a740f5669876271a3f13c64e28eb6f2cb033b4c 100644 index e1cbb3431d3ce9db6698b7d9d296611e4d9a5470..5ee9d3009e04b36d2c61007a1dbe06b2bb1106ff 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -708,6 +708,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -707,6 +707,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
gameprofilerfiller.exit(); gameprofilerfiller.exit();
timings.chunkTicksBlocks.stopTiming(); // Paper timings.chunkTicksBlocks.stopTiming(); // Paper