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: ffecc4e2 Revert "Optimize entity list iteration requiring entities be in" 0a4286cc Prevent Fire from loading chunks 07915ea1 Add Player Client Options API (#2883) bc48a317 Optimize entity list iteration requiring entities be in loaded chunks 88092fef Optimize ChunkProviderServer's chunk level checking helper methods 01e8ce8d Forced Watchdog Crash support and Improve Async Shutdown fdb8fe78 Be less strict with vanilla teleport command limits
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 182f093696b3a8b995c6b910146a30d0a7a9ad13 Mon Sep 17 00:00:00 2001
|
||||
From 53087de6d5f2560a6a338cefcdf24cc346195c34 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 f741a034e8..d5b4861c45 100644
|
||||
index ba6bdc40a7..e490423d8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -646,11 +646,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -656,11 +656,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 f741a034e8..d5b4861c45 100644
|
||||
// CraftBukkit end
|
||||
|
||||
this.world.getMethodProfiler().enter("naturalSpawnCount");
|
||||
@@ -676,15 +677,17 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -686,15 +687,17 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
this.world.getMethodProfiler().exit();
|
||||
@@ -58,7 +58,7 @@ index f741a034e8..d5b4861c45 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();
|
||||
|
||||
@@ -704,40 +707,11 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -714,40 +717,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
|
||||
|
||||
Reference in New Issue
Block a user