diff --git a/patches/server/0086-Use-linked-map-for-entity-trackers.patch b/patches/server/0086-Use-linked-map-for-entity-trackers.patch new file mode 100644 index 0000000..52fe677 --- /dev/null +++ b/patches/server/0086-Use-linked-map-for-entity-trackers.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MartijnMuijsers +Date: Thu, 1 Dec 2022 14:40:03 +0100 +Subject: [PATCH] Use linked map for entity trackers + +License: MIT (https://opensource.org/licenses/MIT) + +This patch is based on the following mixin: +"com/ishland/vmp/mixins/entitytracker/MixinThreadedAnvilChunkStorage.java" +By: ishland +As part of: VMP (https://github.com/RelativityMC/VMP-fabric) +Licensed under: MIT (https://opensource.org/licenses/MIT) + +diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java +index de844a1fefa9d4d0da6db105565cbb37f52de8c4..5bc4f3f18bd4527a8110d0b7bfb424ea1b14e5d5 100644 +--- a/src/main/java/net/minecraft/server/level/ChunkMap.java ++++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +@@ -14,6 +14,7 @@ import com.mojang.datafixers.util.Either; + import com.mojang.logging.LogUtils; + import com.mojang.serialization.DataResult; + import com.mojang.serialization.JsonOps; ++import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap; + import it.unimi.dsi.fastutil.ints.Int2ObjectMap; + import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; + import it.unimi.dsi.fastutil.longs.Long2ByteMap; +@@ -291,7 +292,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + // Paper - rewrite chunk system + this.tickingGenerated = new AtomicInteger(); + this.playerMap = new PlayerMap(); +- this.entityMap = new Int2ObjectOpenHashMap(); ++ this.entityMap = new Int2ObjectLinkedOpenHashMap(); // Gale - VMP - use linked map for entity trackers - provides faster iteration + this.chunkTypeCache = new Long2ByteOpenHashMap(); + this.chunkSaveCooldowns = new Long2LongOpenHashMap(); + this.unloadQueue = Queues.newConcurrentLinkedQueue(); diff --git a/patches/server/0086-Optimize-noise-generation.patch b/patches/server/0087-Optimize-noise-generation.patch similarity index 100% rename from patches/server/0086-Optimize-noise-generation.patch rename to patches/server/0087-Optimize-noise-generation.patch diff --git a/patches/server/0087-Ignore-durability-change-equipment-updates.patch b/patches/server/0088-Ignore-durability-change-equipment-updates.patch similarity index 100% rename from patches/server/0087-Ignore-durability-change-equipment-updates.patch rename to patches/server/0088-Ignore-durability-change-equipment-updates.patch diff --git a/patches/server/0088-Hide-flames-on-entities-with-fire-resistance.patch b/patches/server/0089-Hide-flames-on-entities-with-fire-resistance.patch similarity index 100% rename from patches/server/0088-Hide-flames-on-entities-with-fire-resistance.patch rename to patches/server/0089-Hide-flames-on-entities-with-fire-resistance.patch diff --git a/patches/server/0089-Skip-cloning-advancement-criteria.patch b/patches/server/0090-Skip-cloning-advancement-criteria.patch similarity index 100% rename from patches/server/0089-Skip-cloning-advancement-criteria.patch rename to patches/server/0090-Skip-cloning-advancement-criteria.patch diff --git a/patches/server/0090-Player-canSee-by-entity-UUID.patch b/patches/server/0091-Player-canSee-by-entity-UUID.patch similarity index 100% rename from patches/server/0090-Player-canSee-by-entity-UUID.patch rename to patches/server/0091-Player-canSee-by-entity-UUID.patch diff --git a/patches/server/0091-Spread-out-sending-all-player-info.patch b/patches/server/0092-Spread-out-sending-all-player-info.patch similarity index 100% rename from patches/server/0091-Spread-out-sending-all-player-info.patch rename to patches/server/0092-Spread-out-sending-all-player-info.patch diff --git a/patches/server/0092-Optimize-player-list-for-sending-player-info.patch b/patches/server/0093-Optimize-player-list-for-sending-player-info.patch similarity index 100% rename from patches/server/0092-Optimize-player-list-for-sending-player-info.patch rename to patches/server/0093-Optimize-player-list-for-sending-player-info.patch diff --git a/patches/server/0093-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/patches/server/0094-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch similarity index 100% rename from patches/server/0093-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch rename to patches/server/0094-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch diff --git a/patches/server/0094-Send-multiple-keep-alive-packets.patch b/patches/server/0095-Send-multiple-keep-alive-packets.patch similarity index 100% rename from patches/server/0094-Send-multiple-keep-alive-packets.patch rename to patches/server/0095-Send-multiple-keep-alive-packets.patch diff --git a/patches/server/0095-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0096-Prevent-entities-random-strolling-into-non-ticking-c.patch similarity index 100% rename from patches/server/0095-Prevent-entities-random-strolling-into-non-ticking-c.patch rename to patches/server/0096-Prevent-entities-random-strolling-into-non-ticking-c.patch diff --git a/patches/server/0096-Specific-interval-TPS-API.patch b/patches/server/0097-Specific-interval-TPS-API.patch similarity index 100% rename from patches/server/0096-Specific-interval-TPS-API.patch rename to patches/server/0097-Specific-interval-TPS-API.patch diff --git a/patches/server/0097-5-second-TPS-average.patch b/patches/server/0098-5-second-TPS-average.patch similarity index 100% rename from patches/server/0097-5-second-TPS-average.patch rename to patches/server/0098-5-second-TPS-average.patch diff --git a/patches/server/0098-Measure-last-tick-time.patch b/patches/server/0099-Measure-last-tick-time.patch similarity index 100% rename from patches/server/0098-Measure-last-tick-time.patch rename to patches/server/0099-Measure-last-tick-time.patch diff --git a/patches/server/0099-Last-tick-time-API.patch b/patches/server/0100-Last-tick-time-API.patch similarity index 100% rename from patches/server/0099-Last-tick-time-API.patch rename to patches/server/0100-Last-tick-time-API.patch diff --git a/patches/server/0100-Show-last-tick-time-in-tps-command.patch b/patches/server/0101-Show-last-tick-time-in-tps-command.patch similarity index 100% rename from patches/server/0100-Show-last-tick-time-in-tps-command.patch rename to patches/server/0101-Show-last-tick-time-in-tps-command.patch diff --git a/patches/server/0101-Increase-time-statistics-in-intervals.patch b/patches/server/0102-Increase-time-statistics-in-intervals.patch similarity index 100% rename from patches/server/0101-Increase-time-statistics-in-intervals.patch rename to patches/server/0102-Increase-time-statistics-in-intervals.patch diff --git a/patches/server/0102-For-collision-check-has-physics-before-same-vehicle.patch b/patches/server/0103-For-collision-check-has-physics-before-same-vehicle.patch similarity index 100% rename from patches/server/0102-For-collision-check-has-physics-before-same-vehicle.patch rename to patches/server/0103-For-collision-check-has-physics-before-same-vehicle.patch diff --git a/patches/server/0103-Skip-negligible-planar-movement-multiplication.patch b/patches/server/0104-Skip-negligible-planar-movement-multiplication.patch similarity index 100% rename from patches/server/0103-Skip-negligible-planar-movement-multiplication.patch rename to patches/server/0104-Skip-negligible-planar-movement-multiplication.patch diff --git a/patches/server/0104-Variable-main-thread-task-delay.patch b/patches/server/0105-Variable-main-thread-task-delay.patch similarity index 100% rename from patches/server/0104-Variable-main-thread-task-delay.patch rename to patches/server/0105-Variable-main-thread-task-delay.patch diff --git a/patches/server/0105-Reduce-RandomSource-instances.patch b/patches/server/0106-Reduce-RandomSource-instances.patch similarity index 100% rename from patches/server/0105-Reduce-RandomSource-instances.patch rename to patches/server/0106-Reduce-RandomSource-instances.patch diff --git a/patches/server/0106-CPU-cores-estimation.patch b/patches/server/0107-CPU-cores-estimation.patch similarity index 100% rename from patches/server/0106-CPU-cores-estimation.patch rename to patches/server/0107-CPU-cores-estimation.patch diff --git a/patches/server/0107-Add-centralized-AsyncExecutor.patch b/patches/server/0108-Add-centralized-AsyncExecutor.patch similarity index 100% rename from patches/server/0107-Add-centralized-AsyncExecutor.patch rename to patches/server/0108-Add-centralized-AsyncExecutor.patch diff --git a/patches/server/0108-Remove-Paper-async-executor.patch b/patches/server/0109-Remove-Paper-async-executor.patch similarity index 100% rename from patches/server/0108-Remove-Paper-async-executor.patch rename to patches/server/0109-Remove-Paper-async-executor.patch diff --git a/patches/server/0109-Remove-Paper-cleaner-executor.patch b/patches/server/0110-Remove-Paper-cleaner-executor.patch similarity index 100% rename from patches/server/0109-Remove-Paper-cleaner-executor.patch rename to patches/server/0110-Remove-Paper-cleaner-executor.patch diff --git a/patches/server/0110-Remove-background-executor.patch b/patches/server/0111-Remove-background-executor.patch similarity index 100% rename from patches/server/0110-Remove-background-executor.patch rename to patches/server/0111-Remove-background-executor.patch diff --git a/patches/server/0111-Remove-bootstrap-executor.patch b/patches/server/0112-Remove-bootstrap-executor.patch similarity index 100% rename from patches/server/0111-Remove-bootstrap-executor.patch rename to patches/server/0112-Remove-bootstrap-executor.patch diff --git a/patches/server/0112-Remove-world-upgrade-executors.patch b/patches/server/0113-Remove-world-upgrade-executors.patch similarity index 100% rename from patches/server/0112-Remove-world-upgrade-executors.patch rename to patches/server/0113-Remove-world-upgrade-executors.patch diff --git a/patches/server/0113-Remove-tab-complete-executor.patch b/patches/server/0114-Remove-tab-complete-executor.patch similarity index 100% rename from patches/server/0113-Remove-tab-complete-executor.patch rename to patches/server/0114-Remove-tab-complete-executor.patch diff --git a/patches/server/0114-Remove-text-filter-executor.patch b/patches/server/0115-Remove-text-filter-executor.patch similarity index 100% rename from patches/server/0114-Remove-text-filter-executor.patch rename to patches/server/0115-Remove-text-filter-executor.patch