From 44a5402713c5b9ffe9fdafd9e88ff4f11354469b Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Wed, 24 Apr 2024 23:26:18 +0200 Subject: [PATCH] Restore original formatting for MC-252817 patch --- ...52817-green-map-markers-do-not-disappear.patch | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch index 4e1beefb21..002509c64a 100644 --- a/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch +++ b/patches/server/fix-MC-252817-green-map-markers-do-not-disappear.patch @@ -14,11 +14,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private void removeFramedMap(ItemStack stack) { - MapId mapid = this.getFramedMapId(); -- + MapId mapid = this.getFramedMapIdForItem(stack); // Paper - fix MC-252817 (green map markers do not disappear) + if (mapid != null) { MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level()); - @@ -0,0 +0,0 @@ public class ItemFrame extends HangingEntity { @Nullable @@ -26,14 +25,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - return (MapId) this.getItem().get(DataComponents.MAP_ID); + // Paper start + return this.getFramedMapIdForItem(this.getItem()); - } - ++ } ++ + @Nullable + public MapId getFramedMapIdForItem(ItemStack item) { + return (MapId) item.get(DataComponents.MAP_ID); -+ } -+ // Paper end -+ - public boolean hasFramedMap() { - return this.getItem().has(DataComponents.MAP_ID); ++ // Paper end } + + public boolean hasFramedMap() {