Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
dcc290167f
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: dea9ce0a SPIGOT-7198: Add Sittable interface to Camel CraftBukkit Changes: eecb4c0dc SPIGOT-7196: Exception loading alternate worlds 0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel 676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg e85280e02 Handle missing SpawnEggs in MetaSpawnEgg Spigot Changes: d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
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 db60d29b051bad8d115b333e6c72287860a73123..428523feaa4f30260e32ba03937e88200246c693 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -284,7 +284,9 @@ public class ItemFrame extends HangingEntity {
|
|
}
|
|
|
|
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) {
|
|
@@ -302,7 +304,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);
|
|
|