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() {