Skip to content

Commit fd22888

Browse files
committed
Get MapData from server data storage
The old patch sources the map data, like vanilla 1.21.11, from the overworld storage. This is no longer the case in 26.1 and hence reading the map data from the overworld data storage while writing to the server storage breaks map rendering.
1 parent c20b090 commit fd22888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paper-server/patches/sources/net/minecraft/server/level/ServerLevel.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@
968968
public @Nullable MapItemSavedData getMapData(final MapId id) {
969969
- return this.getServer().getDataStorage().get(MapItemSavedData.type(id));
970970
+ // Paper start - Call missing map initialize event and set id
971-
+ final SavedDataStorage storage = this.getServer().overworld().getDataStorage();
971+
+ final SavedDataStorage storage = this.getServer().getDataStorage();
972972
+
973973
+ final Optional<net.minecraft.world.level.saveddata.SavedData> cacheEntry = storage.cache.get(MapItemSavedData.type(id));
974974
+ if (cacheEntry == null) { // Cache did not contain, try to load and may init

0 commit comments

Comments
 (0)