mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: f29c7ebd Improve async login (#3189) 9fd36824 Fix Citizens Player NPC tracking issue - Fixes #3186 0e72de1c Fix Player Tracking issue during join process. f26362af Load Spawn Chunks Asynchronously and Spiral Out 54f762e2 Load Chunks for Login Asynchronously f2d1b6e5 Clean up duplicate PlayerInitialSpawnEvent c2d022d7 Fix Longstanding Broken behavior of PlayerJoinEvent d0a348b9 Broadcast join messages to console 1ef687a4 Don't crash if player is attempted to be removed from untracked chunk. c11668ac Make sure the chunk conversion task is executed immediately 26fb7cc3 Fix Chunk Post Processing deadlock risk
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 53087de6d5f2560a6a338cefcdf24cc346195c34 Mon Sep 17 00:00:00 2001
|
||||
From 8a5c3bee5c877ec56a7a53faeb4acbedb7ae75dd Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 2 Apr 2020 00:28:06 -0500
|
||||
Subject: [PATCH] Optimize Chunk Ticks
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Optimize Chunk Ticks
|
||||
3 files changed, 51 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index ba6bdc40a7..e490423d8d 100644
|
||||
index fd84807a5b..1fae431469 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -656,11 +656,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -735,11 +735,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED);
|
||||
BlockPosition blockposition = this.world.getSpawn();
|
||||
// CraftBukkit start - Other mob type spawn tick rate
|
||||
@@ -31,7 +31,7 @@ index ba6bdc40a7..e490423d8d 100644
|
||||
// CraftBukkit end
|
||||
|
||||
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
||||
@@ -686,15 +687,17 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -765,15 +766,17 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
this.world.getMethodProfiler().exit();
|
||||
@@ -58,7 +58,7 @@ index ba6bdc40a7..e490423d8d 100644
|
||||
final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping
|
||||
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||
|
||||
@@ -714,40 +717,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -793,40 +796,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
|
||||
this.world.getMethodProfiler().enter("spawner");
|
||||
this.world.timings.mobSpawn.startTiming(); // Spigot
|
||||
@@ -135,10 +135,10 @@ index 3ed7fa324f..7f236585db 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index c38d31fafe..b7b358c59f 100644
|
||||
index 8b2eed1051..8d70cacee9 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1371,28 +1371,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1374,28 +1374,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
|
||||
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair, boolean reducedRange) {
|
||||
|
||||
Reference in New Issue
Block a user