mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@5583a3f1 Updated Upstream (Paper)
21 lines
1.4 KiB
Diff
21 lines
1.4 KiB
Diff
--- a/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/net/minecraft/server/level/ChunkMap.java
|
|
@@ -129,7 +_,7 @@
|
|
public final AtomicInteger tickingGenerated = new AtomicInteger(); // Paper - public
|
|
private final String storageName;
|
|
private final PlayerMap playerMap = new PlayerMap();
|
|
- public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap = new Int2ObjectOpenHashMap<>();
|
|
+ public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap = new it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap<>(); // DivineMC - vmp: use linked map for entity trackers for faster iteration
|
|
private final Long2ByteMap chunkTypeCache = new Long2ByteOpenHashMap();
|
|
// Paper - rewrite chunk system
|
|
public int serverViewDistance;
|
|
@@ -1232,7 +_,7 @@
|
|
flag = flag && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
|
|
// Paper end - Configurable entity tracking range by Y
|
|
// CraftBukkit start - respect vanish API
|
|
- if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { // Paper - only consider hits
|
|
+ if (flag && !player.getBukkitEntity().canSeeChunkMapUpdatePlayer(this.entity.getBukkitEntity())) { // Paper - only consider hits // DivineMC - optimize canSee checks
|
|
flag = false;
|
|
}
|
|
// CraftBukkit end
|