mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 16:34:44 +01:00
6e71f41536
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 65247583f SPIGOT-7857: Improve ItemMeta block data deserialization 05d80500d SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta cebb58e9a SPIGOT-7804: Fix written book serialization efcdd5d38 SPIGOT-7794: Cancelling InventoryItemMoveEvent destroys items b568ba572 SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem f057cf449 Remove outdated build delay Spigot Changes: f6a48054 SPIGOT-7835: Fix issue with custom hopper settings bb63b137 Rebuild patches e1142b4d Rebuild patches
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: braindead <totsuka.sama@gmail.com>
|
|
Date: Sat, 5 Nov 2022 17:47:26 -0400
|
|
Subject: [PATCH] fix MC-252817 (green map markers do not disappear).
|
|
|
|
this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame.
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
index cb3de05dba7daa925b6fa7e0c7bbb8e3c53b51f4..6bf89686ce5cf700ac06ec1e38f53af745098fa3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -277,7 +277,7 @@ public class ItemFrame extends HangingEntity {
|
|
}
|
|
|
|
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());
|
|
@@ -305,7 +305,14 @@ public class ItemFrame extends HangingEntity {
|
|
|
|
@Nullable
|
|
public MapId getFramedMapId() {
|
|
- 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() {
|