mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 05:30:23 -07:00
Use correct saved data key for maps
This commit is contained in:
parent
2948eb296d
commit
6c2b0378fe
@ -941,7 +941,7 @@
|
||||
+ // Paper start - Call missing map initialize event and set id
|
||||
+ final DimensionDataStorage storage = this.getServer().overworld().getDataStorage();
|
||||
+
|
||||
+ final Optional<net.minecraft.world.level.saveddata.SavedData> cacheEntry = storage.cache.get(mapId.key());
|
||||
+ final Optional<net.minecraft.world.level.saveddata.SavedData> cacheEntry = storage.cache.get(MapItemSavedData.type(mapId));
|
||||
+ if (cacheEntry == null) { // Cache did not contain, try to load and may init
|
||||
+ final MapItemSavedData mapData = storage.get(MapItemSavedData.type(mapId)); // get populates the cache
|
||||
+ if (mapData != null) { // map was read, init it and return
|
||||
|
Loading…
x
Reference in New Issue
Block a user