mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 00:07:56 +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) {
|
private void removeFramedMap(ItemStack stack) {
|
||||||
- MapId mapid = this.getFramedMapId();
|
- MapId mapid = this.getFramedMapId();
|
||||||
-
|
|
||||||
+ MapId mapid = this.getFramedMapIdForItem(stack); // Paper - fix MC-252817 (green map markers do not disappear)
|
+ MapId mapid = this.getFramedMapIdForItem(stack); // Paper - fix MC-252817 (green map markers do not disappear)
|
||||||
|
|
||||||
if (mapid != null) {
|
if (mapid != null) {
|
||||||
MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level());
|
MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level());
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class ItemFrame extends HangingEntity {
|
@@ -0,0 +0,0 @@ public class ItemFrame extends HangingEntity {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -26,14 +25,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
- return (MapId) this.getItem().get(DataComponents.MAP_ID);
|
- return (MapId) this.getItem().get(DataComponents.MAP_ID);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ return this.getFramedMapIdForItem(this.getItem());
|
+ return this.getFramedMapIdForItem(this.getItem());
|
||||||
}
|
+ }
|
||||||
|
+
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public MapId getFramedMapIdForItem(ItemStack item) {
|
+ public MapId getFramedMapIdForItem(ItemStack item) {
|
||||||
+ return (MapId) item.get(DataComponents.MAP_ID);
|
+ return (MapId) item.get(DataComponents.MAP_ID);
|
||||||
+ }
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
|
||||||
public boolean hasFramedMap() {
|
|
||||||
return this.getItem().has(DataComponents.MAP_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasFramedMap() {
|
||||||
|
Loading…
Reference in New Issue
Block a user