aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2023-10-04 16:25:26 +0100
committerShane Freeder <[email protected]>2023-10-04 16:25:26 +0100
commit5eec4ec3bfce1cf8405cb71253d6235da9d1e961 (patch)
treeeb99b792abb1186b164ebd5c45467eb9c95508b1 /patches
parentf36bb597399b9b9b632caa4f938c28ca137583f5 (diff)
downloadPaper-5eec4ec3bfce1cf8405cb71253d6235da9d1e961.tar.gz
Paper-5eec4ec3bfce1cf8405cb71253d6235da9d1e961.zip
Quick tweaks to logical flow of getMapData
Diffstat (limited to 'patches')
-rw-r--r--patches/server/1034-Fix-missing-map-initialize-event-call.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/1034-Fix-missing-map-initialize-event-call.patch b/patches/server/1034-Fix-missing-map-initialize-event-call.patch
index c31e783240..5f84bbfe02 100644
--- a/patches/server/1034-Fix-missing-map-initialize-event-call.patch
+++ b/patches/server/1034-Fix-missing-map-initialize-event-call.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix missing map initialize event call
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index f502b01b564bd33c449cbe621966ef4076a38cca..868951dc21aff541765b1f58f08cdf3c47446d25 100644
+index f502b01b564bd33c449cbe621966ef4076a38cca..51d282b524b5249438f7744f7f0b1cc27b76470e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2099,7 +2099,23 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -20,12 +20,12 @@ index f502b01b564bd33c449cbe621966ef4076a38cca..868951dc21aff541765b1f58f08cdf3c
+ if (existing == null && !storage.cache.containsKey(id)) {
+ final net.minecraft.world.level.saveddata.SavedData.Factory<MapItemSavedData> factory = MapItemSavedData.factory();
+ final MapItemSavedData map = storage.readSavedData(factory.deserializer(), factory.type(), id);
++ storage.cache.put(id, map);
+ if (map != null) {
+ map.id = id;
+ new MapInitializeEvent(map.mapView).callEvent();
++ return map;
+ }
-+
-+ storage.cache.put(id, map);
+ }
+
+ return existing instanceof MapItemSavedData data ? data : null;