mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 82792f883 [Auto] Updated Upstream (CraftBukkit) 899bc53b7 Updated Upstream (Bukkit/CraftBukkit) (#4779)
This commit is contained in:
@@ -13800,7 +13800,7 @@ index f01186988..26a8c4ffe 100644
|
||||
return this.j.d();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b19681031..0ac1bd39a 100644
|
||||
index 5b0b6edfa..2155fa1b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -55,12 +55,13 @@ import org.bukkit.event.server.MapInitializeEvent;
|
||||
@@ -14382,7 +14382,7 @@ index b19681031..0ac1bd39a 100644
|
||||
}
|
||||
|
||||
public void a(Entity entity, Entity entity1) {
|
||||
@@ -919,6 +1363,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -920,6 +1364,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
int i = MathHelper.floor(entity.locX() / 16.0D);
|
||||
int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior
|
||||
int k = MathHelper.floor(entity.locZ() / 16.0D);
|
||||
@@ -14395,7 +14395,7 @@ index b19681031..0ac1bd39a 100644
|
||||
|
||||
if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) {
|
||||
// Paper start - remove entity if its in a chunk more correctly.
|
||||
@@ -928,6 +1378,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -929,6 +1379,12 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -14408,7 +14408,7 @@ index b19681031..0ac1bd39a 100644
|
||||
if (entity.inChunk && this.isChunkLoaded(entity.chunkX, entity.chunkZ)) {
|
||||
this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY);
|
||||
}
|
||||
@@ -941,6 +1397,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -942,6 +1398,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
} else {
|
||||
this.getChunkAt(i, k).a(entity);
|
||||
}
|
||||
@@ -14420,7 +14420,7 @@ index b19681031..0ac1bd39a 100644
|
||||
}
|
||||
|
||||
this.getMethodProfiler().exit();
|
||||
@@ -1299,7 +1760,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1297,7 +1758,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
if (!(entity instanceof EntityPlayer)) {
|
||||
@@ -14429,7 +14429,7 @@ index b19681031..0ac1bd39a 100644
|
||||
throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException("Removing entity while ticking!")));
|
||||
}
|
||||
|
||||
@@ -1327,6 +1788,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1325,6 +1786,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
||||
public void unregisterEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot
|
||||
@@ -14437,7 +14437,7 @@ index b19681031..0ac1bd39a 100644
|
||||
// Paper start - fix entity registration issues
|
||||
if (entity instanceof EntityComplexPart) {
|
||||
// Usually this is a no-op for complex parts, and ID's should be removed, but go ahead and remove it anyways
|
||||
@@ -1393,17 +1855,108 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1391,17 +1853,108 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
this.getScoreboard().a(entity);
|
||||
// CraftBukkit start - SPIGOT-5278
|
||||
if (entity instanceof EntityDrowned) {
|
||||
@@ -14549,7 +14549,7 @@ index b19681031..0ac1bd39a 100644
|
||||
private void registerEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
// Paper start - don't double enqueue entity registration
|
||||
@@ -1414,7 +1967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1412,7 +1965,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -14558,7 +14558,7 @@ index b19681031..0ac1bd39a 100644
|
||||
if (!entity.isQueuedForRegister) { // Paper
|
||||
this.entitiesToAdd.add(entity);
|
||||
entity.isQueuedForRegister = true; // Paper
|
||||
@@ -1422,6 +1975,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1420,6 +1973,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
} else {
|
||||
entity.isQueuedForRegister = false; // Paper
|
||||
this.entitiesById.put(entity.getId(), entity);
|
||||
@@ -14566,7 +14566,7 @@ index b19681031..0ac1bd39a 100644
|
||||
if (entity instanceof EntityEnderDragon) {
|
||||
EntityComplexPart[] aentitycomplexpart = ((EntityEnderDragon) entity).eJ();
|
||||
int i = aentitycomplexpart.length;
|
||||
@@ -1430,6 +1984,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1428,6 +1982,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
EntityComplexPart entitycomplexpart = aentitycomplexpart[j];
|
||||
|
||||
this.entitiesById.put(entitycomplexpart.getId(), entitycomplexpart);
|
||||
@@ -14574,7 +14574,7 @@ index b19681031..0ac1bd39a 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,12 +2009,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1452,12 +2007,16 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
// this.getChunkProvider().addEntity(entity); // Paper - moved down below valid=true
|
||||
// CraftBukkit start - SPIGOT-5278
|
||||
if (entity instanceof EntityDrowned) {
|
||||
@@ -14594,7 +14594,7 @@ index b19681031..0ac1bd39a 100644
|
||||
}
|
||||
entity.valid = true; // CraftBukkit
|
||||
this.getChunkProvider().addEntity(entity); // Paper - from above to be below valid=true
|
||||
@@ -1475,7 +2034,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1473,7 +2032,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
public void removeEntity(Entity entity) {
|
||||
@@ -14603,7 +14603,7 @@ index b19681031..0ac1bd39a 100644
|
||||
throw (IllegalStateException) SystemUtils.c((Throwable) (new IllegalStateException("Removing entity while ticking!")));
|
||||
} else {
|
||||
this.removeEntityFromChunk(entity);
|
||||
@@ -1571,13 +2130,32 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1569,13 +2128,32 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
||||
@Override
|
||||
public void notify(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
|
||||
@@ -14637,7 +14637,7 @@ index b19681031..0ac1bd39a 100644
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
NavigationAbstract navigationabstract = (NavigationAbstract) iterator.next();
|
||||
@@ -1585,7 +2163,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1583,7 +2161,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
if (!navigationabstract.i()) {
|
||||
navigationabstract.b(blockposition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user