Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
7c2dc4b342
* finish implementing all adventure components in codecs * add some initial tests * Add round trip tests for text and translatable components * Add more round trip test data (score component is failing) * Add more round trip test data * Fix SCORE_COMPONENT_MAP_CODEC * Improve test failure messages * Add failure cases * Add a couple more test data * Make use of AdventureCodecs * Update patches after rebase * Squash changes into adventure patch * Fix AT formatting * update comment --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
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 6849429c3577f36eb699083375824ae5633f8d06..9c11d0af958ec47408d238d34d30750d29ecdd88 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -291,7 +291,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) {
|
|
@@ -309,7 +311,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);
|
|
|