Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
Showing only changes of commit 6c2b0378fe - Show all commits

View File

@@ -941,7 +941,7 @@
+ // Paper start - Call missing map initialize event and set id + // Paper start - Call missing map initialize event and set id
+ final DimensionDataStorage storage = this.getServer().overworld().getDataStorage(); + 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 + 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 + final MapItemSavedData mapData = storage.get(MapItemSavedData.type(mapId)); // get populates the cache
+ if (mapData != null) { // map was read, init it and return + if (mapData != null) { // map was read, init it and return