mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 1e843b72 #510: Add NamespacedKey#fromString() to fetch from user input a4d18241 #581: Add methods to modify despawn delay for wandering villagers CraftBukkit Changes: 0cd8f19f #802: Add methods to modify despawn delay for wandering villagers d5c5d998 SPIGOT-6362: ConcurrentModificationException: null --> Server Crash 8c7d69fe SPIGOT-5228: Entities that are removed during chunk unloads are not properly removed from the chunk.
This commit is contained in:
parent
c51e3e6e51
commit
20e500fadc
5 changed files with 12 additions and 11 deletions
|
@ -202,7 +202,7 @@ diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/buk
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
--- a/src/main/java/org/bukkit/NamespacedKey.java
|
||||||
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
+++ b/src/main/java/org/bukkit/NamespacedKey.java
|
||||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* underscores, hyphens, and forward slashes.
|
* underscores, hyphens, and forward slashes.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeEntityFromChunk(Entity entity) {
|
private void removeEntityFromChunk(Entity entity) {
|
||||||
- IChunkAccess ichunkaccess = this.getChunkAt(entity.chunkX, entity.chunkZ, ChunkStatus.FULL, false);
|
- IChunkAccess ichunkaccess = chunkProvider.getChunkUnchecked(entity.chunkX, entity.chunkZ); // CraftBukkit - SPIGOT-5228: getChunkAt won't find the entity's chunk if it has already been unloaded (i.e. if it switched to state INACCESSIBLE).
|
||||||
+ Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways
|
+ Chunk ichunkaccess = entity.getCurrentChunk(); // Paper - getChunkAt(x,z,full,false) is broken by CraftBukkit as it won't return an unloading chunk. Use our current chunk reference as this points to what chunk they need to be removed from anyways
|
||||||
|
|
||||||
- if (ichunkaccess instanceof Chunk) {
|
- if (ichunkaccess instanceof Chunk) {
|
||||||
|
|
|
@ -3993,24 +3993,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+ public final boolean isEntityTickingReady() {
|
+ public final boolean isEntityTickingReady() {
|
||||||
+ return this.isEntityTickingReady;
|
+ return this.isEntityTickingReady;
|
||||||
}
|
+ }
|
||||||
|
+
|
||||||
+ public final boolean isTickingReady() {
|
+ public final boolean isTickingReady() {
|
||||||
+ return this.isTickingReady;
|
+ return this.isTickingReady;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public final boolean isFullChunkReady() {
|
+ public final boolean isFullChunkReady() {
|
||||||
+ return this.isFullChunkReady;
|
+ return this.isFullChunkReady;
|
||||||
+ }
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
- public Chunk getFullChunk() {
|
- public Chunk getFullChunk() {
|
||||||
+ public final Chunk getFullChunk() { // Paper - final for inline
|
+ public final Chunk getFullChunk() { // Paper - final for inline
|
||||||
if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks
|
if (!getChunkState(this.oldTicketLevel).isAtLeast(PlayerChunk.State.BORDER)) return null; // note: using oldTicketLevel for isLoaded checks
|
||||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> statusFuture = this.getStatusFutureUnchecked(ChunkStatus.FULL);
|
return this.getFullChunkUnchecked();
|
||||||
Either<IChunkAccess, PlayerChunk.Failure> either = (Either<IChunkAccess, PlayerChunk.Failure>) statusFuture.getNow(null);
|
}
|
||||||
return either == null ? null : (Chunk) either.left().orElse(null);
|
@@ -0,0 +0,0 @@ public class PlayerChunk {
|
||||||
|
return (either == null) ? null : (Chunk) either.left().orElse(null);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
+ // Paper start - "real" get full chunk immediately
|
+ // Paper start - "real" get full chunk immediately
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5b289e69146fd76766ce7f973821b05792d9a695
|
Subproject commit 1e843b72bbd67b7b5ec785eae260fb00a5b64292
|
|
@ -1 +1 @@
|
||||||
Subproject commit d97d91871d7b2003591d9a9d59ee9c2306d3178a
|
Subproject commit 0cd8f19fb90f92c9fef7a3d7896bb77e8c4785da
|
Loading…
Reference in a new issue