Paper 1.13.1 Update

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Bukkit Changes:
2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields
e0fc6572 SPIGOT-4309: Add "forced" display of particles
efeeab2f Add index to README.md for easier navigation
f502bc6f Update to Minecraft 1.13.1

CraftBukkit Changes:
d0bb0a1d Fix some tests randomly failing
997d378d Fix client stall in specific teleportation scenarios
b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields
2a271162 SPIGOT-4301: Fix more invalid enchants
5d0d83bb SPIGOT-4309: Add "forced" display of particles
a6772578 Add additional tests for CraftBlockData
ce1af0c3 Update to Minecraft 1.13.1

Spigot Changes:
2440e189 Rebuild patches
4ecffced Update to Minecraft 1.13.1
This commit is contained in:
Aikar
2018-08-26 14:11:49 -04:00
parent 338c730c10
commit 05dfa62d32
324 changed files with 1984 additions and 2579 deletions

View File

@@ -14,11 +14,11 @@ Fix this by differing entity add to world for all entities at the same time
the original entity is dead, overwrite it as the logic does for unloaod queued entities.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index bd31a7dcab..8b80830933 100644
index 7b6b8f4824..eed37198b0 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
this.world.b(this.tileEntities.values());
this.world.a(this.tileEntities.values());
List[] aentityslice = this.entitySlices; // Spigot
int i = aentityslice.length;
+ List<Entity> toAdd = new java.util.ArrayList<>(32); // Paper
@@ -31,20 +31,21 @@ index bd31a7dcab..8b80830933 100644
}
- // Paper end
- this.world.a((Collection) entityslice);
+ //this.world.a((Collection) entityslice); // Move down, add all entities at same time
- this.world.a(entityslice.stream().filter((entity) -> {
- return !(entity instanceof EntityHuman);
- }));
+ toAdd.addAll(entityslice);
+ // Paper end
}
+ this.world.addChunkEntities(toAdd); // Paper - add all at same time to avoid entities adding to world modifying slice state
+ this.world.addChunkEntities(toAdd.stream().filter((entity) -> !(entity instanceof EntityHuman))); // Paper - add all at same time to avoid entities adding to world modifying slice state
// CraftBukkit start
org.bukkit.Server server = this.world.getServer();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b0053e5e63..004c3ec474 100644
index 26007862ab..4ea31bc201 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
this.getChunkAt(i, j).a(entity);
@@ -52,25 +53,22 @@ index b0053e5e63..004c3ec474 100644
this.entityList.add(entity);
this.b(entity);
return true;
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
return i;
@@ -0,0 +0,0 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return j;
}
+ public void addChunkEntities(Collection<Entity> collection) { a(collection); } // Paper - OBFHELPER
public void a(Collection<Entity> collection) {
+ public void addChunkEntities(Stream<Entity> collection) { a(collection); } // Paper - OBFHELPER
public void a(Stream<Entity> stream) {
org.spigotmc.AsyncCatcher.catchOp( "entity world add"); // Spigot
// CraftBukkit start
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
- if (entity == null) {
stream.forEach((entity) -> {
+ if (entity == null || entity.dead || entity.valid) { // Paper - prevent adding already added or dead entities
continue;
}
+ return;
+ }
this.entityList.add(entity);
this.b(entity);
});
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6b5b2c8258..f5911fbf08 100644
index 6579387623..788ab40d0e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {