mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-21 15:59:26 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1e7dd72 Remove 'fix Vanilla Minecart speed' patch (#10068) PaperMC/Paper@e7e1c8a Fix and add new scoreboard API (#10037) PaperMC/Paper@49f9f6f Add Registry#getKey (#10066) PaperMC/Paper@4adca3d Update to adventure 4.15 (#10045) PaperMC/Paper@ff7b9b0 Increase default custom payload channel size limit (#10006) PaperMC/Paper@1cda66e Hotfix Entity isInRain reobf issue PaperMC/Paper@61768e0 [ci skip] Remove no longer needed mappings change PaperMC/Paper@e035fd7 Updated Upstream (Bukkit/CraftBukkit/Spigot) PaperMC/Paper@c215ce1 [ci skip] cleanup patch diff from last commit PaperMC/Paper@4fdda9e Keep newlines in outdated client/server message (#10042) PaperMC/Paper@f483b38 fix NPE on EntityTeleportEvent getTo (#10016) PaperMC/Paper@dc62150 Catch async usage of playsound (#10021) PaperMC/Paper@0d6a0c3 Fix command block async message (again) (#10082) PaperMC/Paper@d1f507f Don't fire 2 game events for certain cauldron interactions (#8904) PaperMC/Paper@a401585 Fix campfire recipes not always outputting full result (#8754) PaperMC/Paper@88d28d6 Fix long loading screen when refreshing skins (#10026) PaperMC/Paper@c081104 Add experience points api (#9688) PaperMC/Paper@8221b08 Fix global sound event gamerule not being respected (#8727) PaperMC/Paper@3c0d6aa Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085) PaperMC/Paper@2c3ccb8 Add drops to shear events (#5678) PaperMC/Paper@b2ffb1b Add PlayerShieldDisableEvent (#9177) PaperMC/Paper@2951732 Add HiddenPotionEffect API (#9910) PaperMC/Paper@e4ab50d Properly disallow async Player#chat (#8123) PaperMC/Paper@5e978d3 Fix Folia scheduler tasks not canceling when plugin disable (#10091) PaperMC/Paper@e56e53f Fix some component bugs in login disconnect packet (#10090) PaperMC/Paper@3484ae9 Call entity_die game event after event cancel check (#10096) PaperMC/Paper@0ae58c0 cleanup player death event adventure logic (#10095) PaperMC/Paper@1281f4f Make region/lock shift accessors per world PaperMC/Paper@983377b Correctly check if bucket dispenses will succeed for event (#10109) PaperMC/Paper@58e120b [ci skip] Remove extraneous diff added in 1.20.3 update (#10101) PaperMC/Paper@816bacc Call EntityChangeBlockEvent for cake eating (#10105) PaperMC/Paper@692db0c fix CustomModelData being removed (#10113) PaperMC/Paper@509876d Keep fully frozen entities fully activated (#10103) PaperMC/Paper@1fa48d1 include relative flags in PlayerTeleportEvent (#8190) PaperMC/Paper@ae001ae Fix untrack event not being called for all 'untracks' (#10110) PaperMC/Paper@259bc76 Pass system properties to maven repo session (#10117) PaperMC/Paper@b2a6d57 Validate ResourceLocation in NBT reading PaperMC/Paper@7eaff48 [ci skip] Replace some magic values with constant references PaperMC/Paper@19a6202 Fix experience & improvements to block events (#8067) PaperMC/Paper@8379027 Fix cmd permission levels for command blocks (#7404) PaperMC/Paper@a93acc4 Fix EntityChangePoseEvent being called during worldgen (#10120) PaperMC/Paper@25a99b1 Fix BlockDestroyEvents effectBlock not being set (#10131) PaperMC/Paper@a58e29d Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) PaperMC/Paper@570cfb4 Validate missed resource location parsing PaperMC/Paper@e46276e Fixup NamespacedKey parsing PaperMC/Paper@f1c5f01 [ci skip] Fix typo PaperMC/Paper@07b956e Fix tests by disabling them
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
|
|
Date: Thu, 3 Aug 2023 12:54:52 +0100
|
|
Subject: [PATCH] Use Optimised TrackedEntityMap
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
index f3d4f8ba3bc148e28cab1a4d3def805081391ecc..24e0eaf25b2b366fd0e63a530c90f233c11d1bca 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
@@ -251,7 +251,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 me.samsuik.sakura.utils.collections.TrackedEntityChunkMap(); // Sakura - optimised tracked entity map
|
|
this.chunkTypeCache = new Long2ByteOpenHashMap();
|
|
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
|
|
this.unloadQueue = Queues.newConcurrentLinkedQueue();
|