geforkt von Mirrors/Paper
Quick tweaks to logical flow of getMapData
Dieser Commit ist enthalten in:
Ursprung
a09f1713bf
Commit
13884a0748
@ -20,12 +20,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ 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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren