diff options
author | Nassim Jahnke <[email protected]> | 2021-08-02 10:00:31 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-02 10:00:31 +0200 |
commit | 8c28a33d4efe59e7c31bb3157061bb43d5d36475 (patch) | |
tree | b3b260d31991a6e09eef84977936a4e223c97814 /patches/server/0006-MC-Utils.patch | |
parent | a44f486694d82c26c11d21e06ddd61159850ec35 (diff) | |
download | Paper-8c28a33d4efe59e7c31bb3157061bb43d5d36475.tar.gz Paper-8c28a33d4efe59e7c31bb3157061bb43d5d36475.zip |
Don't not shuffle visible chunks (#6283)
Diffstat (limited to 'patches/server/0006-MC-Utils.patch')
-rw-r--r-- | patches/server/0006-MC-Utils.patch | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/patches/server/0006-MC-Utils.patch b/patches/server/0006-MC-Utils.patch index 04674e5481..f2bbd285cb 100644 --- a/patches/server/0006-MC-Utils.patch +++ b/patches/server/0006-MC-Utils.patch @@ -3079,7 +3079,7 @@ index e9d2034f0753670c2ce69cc93c7e98e89af65c87..2b62f4664f439808661d559dc99762bf @Override diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 9591f50922343283597bad6d9ac17c175d8ae230..8639ffa2347e3d5c44ab30de0aa98623f95d1fe7 100644 +index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401efca995293 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -44,6 +44,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana @@ -3299,21 +3299,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8639ffa2347e3d5c44ab30de0aa98623 @Nullable @Override public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) { -@@ -425,10 +621,9 @@ public class ServerChunkCache extends ChunkSource { - - this.lastSpawnState = spawnercreature_d; - this.level.getProfiler().pop(); -- List<ChunkHolder> list = Lists.newArrayList(this.chunkMap.getChunks()); -- -- Collections.shuffle(list); -- list.forEach((playerchunk) -> { -+ //List<PlayerChunk> list = Lists.newArrayList(this.playerChunkMap.f()); // Paper -+ //Collections.shuffle(list); // Paper -+ this.chunkMap.getChunks().forEach((playerchunk) -> { // Paper - no... just no... - Optional<LevelChunk> optional = ((Either) playerchunk.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left(); - - if (optional.isPresent()) { -@@ -453,7 +648,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -453,7 +649,7 @@ public class ServerChunkCache extends ChunkSource { } this.level.getProfiler().popPush("broadcast"); @@ -3447,7 +3433,7 @@ index e6d003701426a823768966d944384c69b9701967..3b09f76805053802bb779e227749d814 @Override public float getBukkitYaw() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 3a830166b65e81b970b0e9930bd79cb3e4eafc74..9d9d7990c49fd37c660efcb2c87a6c3495d648a6 100644 +index deac6d08082b3291e748af6394235b3d18790ff2..d0047fc5156f13c831ab4f23a429d567ed6a39ac 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -235,6 +235,7 @@ public abstract class Mob extends LivingEntity { |