Fix entity count in timings graph (#2293)

This commit is contained in:
Spottedleaf 2019-07-08 06:29:22 -07:00 committed by Shane Freeder
parent 0a8afdacb6
commit ef7202b9c2
21 changed files with 103 additions and 95 deletions

View file

@ -1,4 +1,4 @@
From 5a6ac2574a72aca6611ad1c416a65c6ec393569a Mon Sep 17 00:00:00 2001 From 9e00b0ab023fe548a1acb5c67f03ce7bfbc18ca0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -1056,7 +1056,7 @@ index 32981c4422..2f608305f7 100644
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index df518ff633..229cff562f 100644 index df518ff633..69af071e60 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1111,7 +1111,15 @@ index df518ff633..229cff562f 100644
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
Entry<Entity> entry = (Entry) objectiterator.next(); Entry<Entity> entry = (Entry) objectiterator.next();
Entity entity1 = (Entity) entry.getValue(); Entity entity1 = (Entity) entry.getValue();
@@ -421,6 +423,7 @@ public class WorldServer extends World { @@ -344,6 +346,7 @@ public class WorldServer extends World {
gameprofilerfiller.enter("tick");
if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) {
this.a(this::entityJoinedWorld, entity1);
+ ++TimingHistory.entityTicks; // Paper
}
gameprofilerfiller.exit();
@@ -421,6 +424,7 @@ public class WorldServer extends World {
} }
gameprofilerfiller.exitEnter("tickBlocks"); gameprofilerfiller.exitEnter("tickBlocks");
@ -1119,7 +1127,7 @@ index df518ff633..229cff562f 100644
if (i > 0) { if (i > 0) {
ChunkSection[] achunksection = chunk.getSections(); ChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length; int l = achunksection.length;
@@ -452,7 +455,7 @@ public class WorldServer extends World { @@ -452,7 +456,7 @@ public class WorldServer extends World {
} }
} }
} }
@ -1128,7 +1136,7 @@ index df518ff633..229cff562f 100644
gameprofilerfiller.exit(); gameprofilerfiller.exit();
} }
@@ -747,6 +750,7 @@ public class WorldServer extends World { @@ -747,6 +751,7 @@ public class WorldServer extends World {
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
@ -1136,7 +1144,7 @@ index df518ff633..229cff562f 100644
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
} }
@@ -756,7 +760,10 @@ public class WorldServer extends World { @@ -756,7 +761,10 @@ public class WorldServer extends World {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
} }

View file

@ -1,11 +1,11 @@
From 4c0fc34009ad13105bbafb5be1d5a1f5b464a530 Mon Sep 17 00:00:00 2001 From 81ae322c6e25e4776ad972fd967a4152790f8fa4 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 187374666b..0bfa78bd22 100644 index 617e7d3a71..e5f5dbe980 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -101,10 +101,10 @@ index ce510c4867..b7c94fe238 100644
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 229cff562f..16da9c7acf 100644 index 69af071e60..458c14e1d1 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
@@ -1103,6 +1103,11 @@ public class WorldServer extends World { @@ -1104,6 +1104,11 @@ public class WorldServer extends World {
this.I.add(((EntityInsentient) entity).getNavigation()); this.I.add(((EntityInsentient) entity).getNavigation());
} }
entity.valid = true; // CraftBukkit entity.valid = true; // CraftBukkit

View file

@ -1,4 +1,4 @@
From 5e2def35ef8073cbeb41db5b9c5bf97b57d0371e Mon Sep 17 00:00:00 2001 From b7c3348e24a4f8b8152de7710e197c368163d797 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600 Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder Subject: [PATCH] Disable thunder
@ -19,10 +19,10 @@ index 6a307d5dd6..bf0cd6a8b4 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index fc582fead6..91ec2f9842 100644 index 458c14e1d1..5358c7379a 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
@@ -384,7 +384,7 @@ public class WorldServer extends World { @@ -385,7 +385,7 @@ public class WorldServer extends World {
gameprofilerfiller.enter("thunder"); gameprofilerfiller.enter("thunder");
BlockPosition blockposition; BlockPosition blockposition;
@ -32,5 +32,5 @@ index fc582fead6..91ec2f9842 100644
if (this.isRainingAt(blockposition)) { if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
-- --
2.21.0 2.22.0

View file

@ -1,4 +1,4 @@
From 0527ad333e7ce35d6a6500109a22824607d4d4cf Mon Sep 17 00:00:00 2001 From f5f389e934a6c08470c975a0f85441748562ddf6 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com> From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600 Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow Subject: [PATCH] Disable ice and snow
@ -19,10 +19,10 @@ index bf0cd6a8b4..8db5c3f3fe 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 91ec2f9842..7b78946ece 100644 index 5358c7379a..b72e1b8062 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
@@ -404,7 +404,7 @@ public class WorldServer extends World { @@ -405,7 +405,7 @@ public class WorldServer extends World {
} }
gameprofilerfiller.exitEnter("iceandsnow"); gameprofilerfiller.exitEnter("iceandsnow");
@ -32,5 +32,5 @@ index 91ec2f9842..7b78946ece 100644
BlockPosition blockposition1 = blockposition.down(); BlockPosition blockposition1 = blockposition.down();
BiomeBase biomebase = this.getBiome(blockposition); BiomeBase biomebase = this.getBiome(blockposition);
-- --
2.21.0 2.22.0

View file

@ -1,4 +1,4 @@
From 317afc73fa8b1b25148f5a5743024957fb3ceb0f Mon Sep 17 00:00:00 2001 From cd5273fe9fa835c8840a82f4844be6f873b88cc7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500 Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses Subject: [PATCH] Configurable spawn chances for skeleton horses
@ -22,10 +22,10 @@ index 98049567f4..2a71381dae 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 2895b50915..b5ff34443c 100644 index b72e1b8062..48ee9d7a5c 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
@@ -388,7 +388,7 @@ public class WorldServer extends World { @@ -389,7 +389,7 @@ public class WorldServer extends World {
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

@ -1,14 +1,14 @@
From 0a45d9187c646b7b0fa332fcd3e9385cfe607950 Mon Sep 17 00:00:00 2001 From 41fc6241ac74a486d2515d43f542b4d0c04c192d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:32:58 -0400 Date: Mon, 28 Mar 2016 20:32:58 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events 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 b7e98bc269..edcb99be2c 100644 index 443986ef3a..28a6a62dfc 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
@@ -1109,6 +1109,7 @@ public class WorldServer extends World { @@ -1110,6 +1110,7 @@ public class WorldServer extends World {
entity.origin = entity.getBukkitEntity().getLocation(); entity.origin = entity.getBukkitEntity().getLocation();
} }
// Paper end // Paper end
@ -16,7 +16,7 @@ index b7e98bc269..edcb99be2c 100644
} }
} }
@@ -1118,6 +1119,7 @@ public class WorldServer extends World { @@ -1119,6 +1120,7 @@ public class WorldServer extends World {
if (this.tickingEntities) { if (this.tickingEntities) {
throw new IllegalStateException("Removing entity while ticking!"); throw new IllegalStateException("Removing entity while ticking!");
} else { } else {

View file

@ -1,4 +1,4 @@
From a0d1cba8b421d1536b09fb97f3e089d64aeb3c26 Mon Sep 17 00:00:00 2001 From e06128b6420b69d097ae32d57ee1089c36dcc268 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 29 Apr 2016 20:02:00 -0400 Date: Fri, 29 Apr 2016 20:02:00 -0400
Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes
@ -102,10 +102,10 @@ index fc08158937..090d3dbd31 100644
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 edcb99be2c..fd2a204d3e 100644 index 28a6a62dfc..d0ab361904 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
@@ -1046,6 +1046,7 @@ public class WorldServer extends World { @@ -1047,6 +1047,7 @@ public class WorldServer extends World {
{ {
if ( iter.next().trackee == entity ) if ( iter.next().trackee == entity )
{ {

View file

@ -1,4 +1,4 @@
From 417e09c01cdadc732b5c9ea0ba14c591af101d2b Mon Sep 17 00:00:00 2001 From 58e45655ecd32572a107bc7ce748ffefd05f52f2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 21 Jun 2016 22:54:34 -0400 Date: Tue, 21 Jun 2016 22:54:34 -0400
Subject: [PATCH] Fix Double World Add issues Subject: [PATCH] Fix Double World Add issues
@ -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 fd2a204d3e..8fd4478f2b 100644 index d0ab361904..4ba5b00aef 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
@@ -936,6 +936,7 @@ public class WorldServer extends World { @@ -937,6 +937,7 @@ public class WorldServer extends World {
// 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

@ -1,4 +1,4 @@
From 13accd53a25699c460e044a5b1c5825016fd7e16 Mon Sep 17 00:00:00 2001 From 05f6bfc3adf98f785d098f84f809be59eebd28d0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400 Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes Subject: [PATCH] Chunk registration fixes
@ -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 8fd4478f2b..6bd60ce46c 100644 index 4ba5b00aef..690f530416 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
@@ -624,7 +624,7 @@ public class WorldServer extends World { @@ -625,7 +625,7 @@ public class WorldServer extends World {
public void chunkCheck(Entity entity) { public void chunkCheck(Entity entity) {
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

@ -1,4 +1,4 @@
From 2e8b98f9f26aa269a7e1df92886f9b98120a5a50 Mon Sep 17 00:00:00 2001 From 60c17edb75c3d029b1237a8ce8bdabc08cc30b42 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 15 Aug 2017 22:29:12 -0400 Date: Tue, 15 Aug 2017 22:29:12 -0400
Subject: [PATCH] Expand World.spawnParticle API and add Builder Subject: [PATCH] Expand World.spawnParticle API and add Builder
@ -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 6bd60ce46c..4e17f74ff0 100644 index 690f530416..74939dce3a 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
@@ -48,7 +48,7 @@ public class WorldServer extends World { @@ -48,7 +48,7 @@ public class WorldServer extends World {
@ -22,7 +22,7 @@ index 6bd60ce46c..4e17f74ff0 100644
boolean tickingEntities; boolean tickingEntities;
private final MinecraftServer server; private final MinecraftServer server;
private final WorldNBTStorage dataManager; private final WorldNBTStorage dataManager;
@@ -1331,12 +1331,17 @@ public class WorldServer extends World { @@ -1332,12 +1332,17 @@ public class WorldServer extends World {
} }
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) {

View file

@ -1,4 +1,4 @@
From 9c7802eb0238ad39dd2bed450702083f69c0c32e Mon Sep 17 00:00:00 2001 From 2f3f0e148171ee21582fb264b3933e65d4361165 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400 Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API Subject: [PATCH] InventoryCloseEvent Reason API
@ -114,10 +114,10 @@ index a167843bfb..9e5cd22d7d 100644
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 4e17f74ff0..c55a2a213f 100644 index 74939dce3a..71e5dffb95 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
@@ -989,7 +989,7 @@ public class WorldServer extends World { @@ -990,7 +990,7 @@ public class WorldServer extends World {
{ {
if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
{ {
@ -126,7 +126,7 @@ index 4e17f74ff0..c55a2a213f 100644
} }
} }
} }
@@ -1012,7 +1012,7 @@ public class WorldServer extends World { @@ -1013,7 +1013,7 @@ public class WorldServer extends World {
{ {
if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
{ {

View file

@ -1,4 +1,4 @@
From a54d2f532d9fa34870e1e88b5318ac4a45bb7f4c Mon Sep 17 00:00:00 2001 From 3ade88ed3cd7d0e49d2f22f47a7758397d7d5575 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:08:05 -0400 Date: Thu, 19 Jul 2018 01:08:05 -0400
Subject: [PATCH] Re-add vanilla entity warnings for duplicates Subject: [PATCH] Re-add vanilla entity warnings for duplicates
@ -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 c55a2a213f..1e727fa989 100644 index 71e5dffb95..2e19b7342f 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
@@ -974,7 +974,8 @@ public class WorldServer extends World { @@ -975,7 +975,8 @@ public class WorldServer extends World {
if (entity1 == null) { if (entity1 == null) {
return false; return false;
} else { } else {

View file

@ -1,4 +1,4 @@
From d36df81ad826c2207447db7aefef352cc02fdbf4 Mon Sep 17 00:00:00 2001 From a01f84d4d3117850f5f7f66118084860c9b85088 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 08:25:40 -0400 Date: Sat, 21 Jul 2018 08:25:40 -0400
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bd3e610786..20b6ad48a9 100644 index 146ce3a7a6..143937236d 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -40,7 +40,7 @@ index 1212f3f67d..b38bc77c93 100644
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 985b459efe..f476f326f1 100644 index b9570ea928..23d5555d93 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 IIBlockAccess, GeneratorAccess, AutoClose @@ -68,6 +68,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -52,7 +52,7 @@ index 985b459efe..f476f326f1 100644
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 1e727fa989..e36e1c2721 100644 index 2e19b7342f..dbdc4b66e9 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
@@ -69,6 +69,9 @@ public class WorldServer extends World { @@ -69,6 +69,9 @@ public class WorldServer extends World {
@ -65,7 +65,7 @@ index 1e727fa989..e36e1c2721 100644
// Add env and gen to constructor // Add env and gen to constructor
public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
@@ -938,6 +941,12 @@ public class WorldServer extends World { @@ -939,6 +942,12 @@ public class WorldServer extends World {
org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot
if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper
if (entity.dead) { if (entity.dead) {
@ -78,7 +78,7 @@ index 1e727fa989..e36e1c2721 100644
// 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)) {
@@ -1101,7 +1110,24 @@ public class WorldServer extends World { @@ -1102,7 +1111,24 @@ public class WorldServer extends World {
} }
} }

View file

@ -1,4 +1,4 @@
From 2cd0a100f8299533b6802f20e1462325cb2bb352 Mon Sep 17 00:00:00 2001 From ab4142cd2764ba31b8b5325c1071109507bb43e2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 28 Jul 2018 12:18:27 -0400 Date: Sat, 28 Jul 2018 12:18:27 -0400
Subject: [PATCH] Ignore Dead Entities in entityList iteration Subject: [PATCH] Ignore Dead Entities in entityList iteration
@ -51,7 +51,7 @@ index ebc00f355e..099f0ad78b 100644
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
list.add(t0); list.add(t0);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e1cd5e72a5..b02b084556 100644 index 76e9891054..6064d414ef 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -126,6 +126,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -126,6 +126,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -63,10 +63,10 @@ index e1cd5e72a5..b02b084556 100644
private float av; private float av;
private float aw; private float aw;
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 e36e1c2721..adeff1ef19 100644 index dbdc4b66e9..f52321fbc8 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
@@ -846,6 +846,7 @@ public class WorldServer extends World { @@ -847,6 +847,7 @@ public class WorldServer extends World {
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
Entity entity = (Entity) objectiterator.next(); Entity entity = (Entity) objectiterator.next();
@ -74,7 +74,7 @@ index e36e1c2721..adeff1ef19 100644
// CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs
if (entity instanceof EntityInsentient) { if (entity instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) entity; EntityInsentient entityinsentient = (EntityInsentient) entity;
@@ -1138,6 +1139,7 @@ public class WorldServer extends World { @@ -1139,6 +1140,7 @@ public class WorldServer extends World {
entity.origin = entity.getBukkitEntity().getLocation(); entity.origin = entity.getBukkitEntity().getLocation();
} }
// Paper end // Paper end
@ -82,7 +82,7 @@ index e36e1c2721..adeff1ef19 100644
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
} }
@@ -1152,6 +1154,7 @@ public class WorldServer extends World { @@ -1153,6 +1155,7 @@ public class WorldServer extends World {
this.removeEntityFromChunk(entity); this.removeEntityFromChunk(entity);
this.entitiesById.remove(entity.getId()); this.entitiesById.remove(entity.getId());
this.unregisterEntity(entity); this.unregisterEntity(entity);

View file

@ -1,4 +1,4 @@
From ae55b8c787098245f360f1832020027995902aa3 Mon Sep 17 00:00:00 2001 From 9abfcdef1ec35ecc3163d6688d925dbbd6711783 Mon Sep 17 00:00:00 2001
From: Mystiflow <mystiflow@gmail.com> From: Mystiflow <mystiflow@gmail.com>
Date: Fri, 6 Jul 2018 13:21:30 +0100 Date: Fri, 6 Jul 2018 13:21:30 +0100
Subject: [PATCH] Send nearby packets from world player list not server list Subject: [PATCH] Send nearby packets from world player list not server list
@ -46,10 +46,10 @@ index 9e5cd22d7d..049d702cb9 100644
double d5 = d1 - entityplayer.locY; double d5 = d1 - entityplayer.locY;
double d6 = d2 - entityplayer.locZ; double d6 = d2 - entityplayer.locZ;
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 adeff1ef19..990c0afb85 100644 index f52321fbc8..cca4d97030 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
@@ -1187,7 +1187,7 @@ public class WorldServer extends World { @@ -1188,7 +1188,7 @@ public class WorldServer extends World {
} }
// CraftBukkit end // CraftBukkit end
this.globalEntityList.add(entitylightning); this.globalEntityList.add(entitylightning);
@ -58,7 +58,7 @@ index adeff1ef19..990c0afb85 100644
} }
@Override @Override
@@ -1319,7 +1319,7 @@ public class WorldServer extends World { @@ -1320,7 +1320,7 @@ public class WorldServer extends World {
BlockActionData blockactiondata = (BlockActionData) this.J.removeFirst(); BlockActionData blockactiondata = (BlockActionData) this.J.removeFirst();
if (this.a(blockactiondata)) { if (this.a(blockactiondata)) {

View file

@ -1,11 +1,11 @@
From 8ba844393ca690aeda331914d6dfe84d054f5335 Mon Sep 17 00:00:00 2001 From df681b2f1c2bb8068ba9ed8336354e2c2d87c71c Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com> From: Trigary <trigary0@gmail.com>
Date: Fri, 14 Sep 2018 17:42:08 +0200 Date: Fri, 14 Sep 2018 17:42:08 +0200
Subject: [PATCH] Limit lightning strike effect distance Subject: [PATCH] Limit lightning strike effect distance
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7e031d18..63f313a9 100644 index 7e031d18e0..63f313a92d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -234,6 +234,28 @@ public class PaperWorldConfig { @@ -234,6 +234,28 @@ public class PaperWorldConfig {
@ -38,7 +38,7 @@ index 7e031d18..63f313a9 100644
public int fixedInhabitedTime; public int fixedInhabitedTime;
private void fixedInhabitedTime() { private void fixedInhabitedTime() {
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
index 0169f261..da857860 100644 index 0169f261c6..da85786046 100644
--- a/src/main/java/net/minecraft/server/EntityLightning.java --- a/src/main/java/net/minecraft/server/EntityLightning.java
+++ b/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java
@@ -64,6 +64,17 @@ public class EntityLightning extends Entity { @@ -64,6 +64,17 @@ public class EntityLightning extends Entity {
@ -69,10 +69,10 @@ index 0169f261..da857860 100644
--this.lifeTicks; --this.lifeTicks;
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 990c0afb..28702361 100644 index cca4d97030..9a3690d664 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
@@ -1187,7 +1187,7 @@ public class WorldServer extends World { @@ -1188,7 +1188,7 @@ public class WorldServer extends World {
} }
// CraftBukkit end // CraftBukkit end
this.globalEntityList.add(entitylightning); this.globalEntityList.add(entitylightning);

View file

@ -1,4 +1,4 @@
From 5b0aad32383403388285e2fef30988764f8a53f1 Mon Sep 17 00:00:00 2001 From a9ffddc41689d09f15c07e33899089a2d3c89389 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 00:24:52 -0400 Date: Sun, 24 Mar 2019 00:24:52 -0400
Subject: [PATCH] Entity#getEntitySpawnReason Subject: [PATCH] Entity#getEntitySpawnReason
@ -10,7 +10,7 @@ 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/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 74eb6f0606..a5f80de34e 100644 index 12b7d2531b..c5ba24f27f 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -72,10 +72,10 @@ index 65df0e7c8c..abddc8895e 100644
}); });
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 2870236108..a85125133b 100644 index 9a3690d664..f992fc34c3 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
@@ -940,6 +940,7 @@ public class WorldServer extends World { @@ -941,6 +941,7 @@ public class WorldServer extends World {
// 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

@ -1,4 +1,4 @@
From ff7a203e4718519b882f42c9249ba0533b0095aa Mon Sep 17 00:00:00 2001 From 80795b11a3129f541ec73a1a0bb78cda48bc981d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 21:49:53 -0400 Date: Fri, 28 Sep 2018 21:49:53 -0400
Subject: [PATCH] Fix issues with entity loss due to unloaded chunks Subject: [PATCH] Fix issues with entity loss due to unloaded chunks
@ -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 a85125133b..d47ef7efa0 100644 index f992fc34c3..8d5a291d7c 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
@@ -635,7 +635,7 @@ public class WorldServer extends World { @@ -636,7 +636,7 @@ public class WorldServer extends World {
this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY);
} }
@ -31,7 +31,7 @@ index a85125133b..d47ef7efa0 100644
entity.inChunk = false; entity.inChunk = false;
} else { } else {
this.getChunkAt(i, k).a(entity); this.getChunkAt(i, k).a(entity);
@@ -958,7 +958,7 @@ public class WorldServer extends World { @@ -959,7 +959,7 @@ public class WorldServer extends World {
return false; return false;
} }
// CraftBukkit end // CraftBukkit end

View file

@ -1,4 +1,4 @@
From b3d082d43bde961d07c9dd54eabebd30e815f850 Mon Sep 17 00:00:00 2001 From 7cae6a999380675c040812ee336143b86a07b9b8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400 Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option Subject: [PATCH] Duplicate UUID Resolve Option
@ -195,7 +195,7 @@ index b38bc77c93..9102bf8b60 100644
if (list != null) { if (list != 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 d47ef7efa0..52a0e0a37f 100644 index 8d5a291d7c..04cf967616 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
@@ -2,6 +2,8 @@ package net.minecraft.server; @@ -2,6 +2,8 @@ package net.minecraft.server;
@ -207,7 +207,7 @@ index d47ef7efa0..52a0e0a37f 100644
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;
@@ -985,8 +987,23 @@ public class WorldServer extends World { @@ -986,8 +988,23 @@ public class WorldServer extends World {
if (entity1 == null) { if (entity1 == null) {
return false; return false;
} else { } else {
@ -233,7 +233,7 @@ index d47ef7efa0..52a0e0a37f 100644
return true; return true;
} }
} }
@@ -1117,7 +1134,7 @@ public class WorldServer extends World { @@ -1118,7 +1135,7 @@ public class WorldServer extends World {
} }
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);

View file

@ -1,4 +1,4 @@
From 1bbc5c28e88afb1b898c6499fe01ff219e17dc21 Mon Sep 17 00:00:00 2001 From 6ccb99a5f6c86956c086076fc925b579fcd07da7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400 Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others. This lets you disable it for some worlds and lower it for others.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d8bb1369..de11a91a 100644 index d8bb13693d..de11a91af6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -483,4 +483,10 @@ public class PaperWorldConfig { @@ -483,4 +483,10 @@ public class PaperWorldConfig {
@ -21,7 +21,7 @@ index d8bb1369..de11a91a 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8136a97f..d6c99ce8 100644 index 8136a97f44..d6c99ce897 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -569,6 +569,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -569,6 +569,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -61,7 +61,7 @@ index 8136a97f..d6c99ce8 100644
// CraftBukkit start // CraftBukkit start
// this.nextTick = SystemUtils.getMonotonicMillis() + 10L; // this.nextTick = SystemUtils.getMonotonicMillis() + 10L;
diff --git a/src/main/java/net/minecraft/server/WorldLoadListener.java b/src/main/java/net/minecraft/server/WorldLoadListener.java diff --git a/src/main/java/net/minecraft/server/WorldLoadListener.java b/src/main/java/net/minecraft/server/WorldLoadListener.java
index d6762d38..7b6f5b2d 100644 index d6762d3853..7b6f5b2da0 100644
--- a/src/main/java/net/minecraft/server/WorldLoadListener.java --- a/src/main/java/net/minecraft/server/WorldLoadListener.java
+++ b/src/main/java/net/minecraft/server/WorldLoadListener.java +++ b/src/main/java/net/minecraft/server/WorldLoadListener.java
@@ -9,4 +9,6 @@ public interface WorldLoadListener { @@ -9,4 +9,6 @@ public interface WorldLoadListener {
@ -72,7 +72,7 @@ index d6762d38..7b6f5b2d 100644
+ void setChunkRadius(int radius); // Paper - allow changing chunk radius + void setChunkRadius(int radius); // Paper - allow changing chunk radius
} }
diff --git a/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java b/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java diff --git a/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java b/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java
index 3868572a..ae77805f 100644 index 3868572aed..ae77805f71 100644
--- a/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java --- a/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java
+++ b/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java +++ b/src/main/java/net/minecraft/server/WorldLoadListenerLogger.java
@@ -7,16 +7,24 @@ import org.apache.logging.log4j.Logger; @@ -7,16 +7,24 @@ import org.apache.logging.log4j.Logger;
@ -103,10 +103,10 @@ index 3868572a..ae77805f 100644
@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 52a0e0a3..2e697675 100644 index 04cf967616..5eeec7be76 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
@@ -1495,13 +1495,85 @@ public class WorldServer extends World { @@ -1496,13 +1496,85 @@ public class WorldServer extends World {
return ((PersistentIdCounts) this.getMinecraftServer().getWorldServer(DimensionManager.OVERWORLD).getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); return ((PersistentIdCounts) this.getMinecraftServer().getWorldServer(DimensionManager.OVERWORLD).getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
} }
@ -196,7 +196,7 @@ index 52a0e0a3..2e697675 100644
public LongSet getForceLoadedChunks() { public LongSet getForceLoadedChunks() {
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 57071e84..3444c19b 100644 index 57071e84fc..3444c19b0f 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
@@ -1749,15 +1749,21 @@ public class CraftWorld implements World { @@ -1749,15 +1749,21 @@ public class CraftWorld implements World {

View file

@ -1,11 +1,11 @@
From 77e6256fbc0e0e44a9662b2761563b70a957aac8 Mon Sep 17 00:00:00 2001 From 949f2527fabd68a0cf88736b6d81a25bfab1cd43 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 9 Jun 2019 03:53:22 +0100 Date: Sun, 9 Jun 2019 03:53:22 +0100
Subject: [PATCH] incremental chunk saving Subject: [PATCH] incremental chunk saving
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index de11a91a..4d3c6c6b 100644 index de11a91af6..4d3c6c6b47 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -489,4 +489,19 @@ public class PaperWorldConfig { @@ -489,4 +489,19 @@ public class PaperWorldConfig {
@ -29,7 +29,7 @@ index de11a91a..4d3c6c6b 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 5bf781bb..e2a48695 100644 index 5bf781bb63..e2a48695df 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
@ -42,7 +42,7 @@ index 5bf781bb..e2a48695 100644
private long t; private long t;
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d6c99ce8..2b99fdc6 100644 index d6c99ce897..2b99fdc630 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -155,6 +155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -155,6 +155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -86,7 +86,7 @@ index d6c99ce8..2b99fdc6 100644
this.methodProfiler.enter("snooper"); this.methodProfiler.enter("snooper");
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/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 d85220b6..c4ad039f 100644 index d85220b66c..c4ad039ffd 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
@@ -293,15 +293,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -293,15 +293,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -126,10 +126,10 @@ index d85220b6..c4ad039f 100644
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 2e697675..ccc12952 100644 index 5eeec7be76..c646393eb0 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
@@ -755,8 +755,9 @@ public class WorldServer extends World { @@ -756,8 +756,9 @@ public class WorldServer extends World {
ChunkProviderServer chunkproviderserver = this.getChunkProvider(); ChunkProviderServer chunkproviderserver = this.getChunkProvider();
if (!flag1) { if (!flag1) {
@ -140,7 +140,7 @@ index 2e697675..ccc12952 100644
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
} }
@@ -765,6 +766,7 @@ public class WorldServer extends World { @@ -766,6 +767,7 @@ public class WorldServer extends World {
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
} }
@ -148,7 +148,7 @@ index 2e697675..ccc12952 100644
timings.worldSaveChunks.startTiming(); // Paper timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.save(flag); chunkproviderserver.save(flag);
@@ -772,6 +774,7 @@ public class WorldServer extends World { @@ -773,6 +775,7 @@ public class WorldServer extends World {
} // Paper } // Paper
} }
@ -156,7 +156,7 @@ index 2e697675..ccc12952 100644
// CraftBukkit start - moved from MinecraftServer.saveChunks // CraftBukkit start - moved from MinecraftServer.saveChunks
// PAIL - rename // PAIL - rename
WorldServer worldserver1 = this; WorldServer worldserver1 = this;
@@ -781,6 +784,7 @@ public class WorldServer extends World { @@ -782,6 +785,7 @@ public class WorldServer extends World {
worlddata.c(this.server.getBossBattleCustomData().c()); worlddata.c(this.server.getBossBattleCustomData().c());
worldserver1.getDataManager().saveWorldData(worlddata, this.server.getPlayerList().r()); worldserver1.getDataManager().saveWorldData(worlddata, this.server.getPlayerList().r());
// CraftBukkit end // CraftBukkit end