More more compile fixes
This commit is contained in:
parent
b432863793
commit
ca25aa1859
12 changed files with 47 additions and 27 deletions
|
@ -21,14 +21,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start - Call missing map initialize event and set id
|
||||
+ final DimensionDataStorage storage = this.getServer().overworld().getDataStorage();
|
||||
+
|
||||
+ final net.minecraft.world.level.saveddata.SavedData existing = storage.cache.get(id);
|
||||
+ if (existing == null && !storage.cache.containsKey(id)) {
|
||||
+ final net.minecraft.world.level.saveddata.SavedData existing = storage.cache.get(id.key());
|
||||
+ if (existing == null && !storage.cache.containsKey(id.key())) {
|
||||
+ final MapItemSavedData worldmap = (MapItemSavedData) this.getServer().overworld().getDataStorage().get(MapItemSavedData.factory(), id.key());
|
||||
+ storage.cache.put(id, map);
|
||||
+ if (map != null) {
|
||||
+ map.id = id;
|
||||
+ new MapInitializeEvent(map.mapView).callEvent();
|
||||
+ return map;
|
||||
+ storage.cache.put(id.key(), worldmap);
|
||||
+ if (worldmap != null) {
|
||||
+ worldmap.id = id;
|
||||
+ new MapInitializeEvent(worldmap.mapView).callEvent();
|
||||
+ return worldmap;
|
||||
+ }
|
||||
+ } else if (existing instanceof MapItemSavedData mapItemSavedData) {
|
||||
+ mapItemSavedData.id = id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue