mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Restore original formatting for MC-252817 patch
This commit is contained in:
parent
060e370a08
commit
44a5402713
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user