geforkt von Mirrors/Paper
90fe0d58a5
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 Bukkit Changes: 897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry 255b2aa1 SPIGOT-7080: Add World#locateNearestBiome ff984826 Remove javadoc.io doc links CraftBukkit Changes: 71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler 38c599f9d PR-1272: Only allow one entity in CraftItem instead of two f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld Spigot Changes: e0e223fe Remove javadoc.io doc links
36 Zeilen
1.8 KiB
Diff
36 Zeilen
1.8 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 b42c060a5d8d68b5773a8a5e38c59707a277d9bb..dcf245387f59ce730cb2cfb5fc0e837a20d3dfe5 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -296,7 +296,9 @@ public class ItemFrame extends HangingEntity {
|
|
// Paper end
|
|
|
|
private void removeFramedMap(ItemStack itemstack) {
|
|
- this.getFramedMapId().ifPresent((i) -> {
|
|
+ // Paper start - fix MC-252817 (green map markers do not disappear)
|
|
+ this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> {
|
|
+ // Paper end
|
|
MapItemSavedData worldmap = MapItem.getSavedData(i, this.level());
|
|
|
|
if (worldmap != null) {
|
|
@@ -314,7 +316,12 @@ public class ItemFrame extends HangingEntity {
|
|
|
|
public OptionalInt getFramedMapId() {
|
|
ItemStack itemstack = this.getItem();
|
|
+ // Paper start - fix MC-252817 (green map markers do not disappear)
|
|
+ return this.getFramedMapIdFromItem(itemstack);
|
|
+ }
|
|
|
|
+ public OptionalInt getFramedMapIdFromItem(ItemStack itemstack) {
|
|
+ // Paper end
|
|
if (itemstack.is(Items.FILLED_MAP)) {
|
|
Integer integer = MapItem.getMapId(itemstack);
|
|
|