mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
Fix duplicate mark map decorations dirty
This commit is contained in:
@@ -107,7 +107,7 @@ index cf78531b193ba56991ccb0c4f62844208e4a5706..d6cecc788be59676f0d011323bb5bdab
|
||||
itemstack.consume(1, player);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index b794c097039f6a3f812dd76df407587594d3ac49..20c1272b381e2eecc814e3547c3daff04c5319f8 100644
|
||||
index b794c097039f6a3f812dd76df407587594d3ac49..dacfac988b94a86f214dd530e08064cd6685afc8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -80,6 +80,16 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -127,15 +127,16 @@ index b794c097039f6a3f812dd76df407587594d3ac49..20c1272b381e2eecc814e3547c3daff0
|
||||
public boolean isExplorerMap; // Purpur
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -353,6 +363,7 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -352,7 +362,7 @@ public class MapItemSavedData extends SavedData {
|
||||
--this.trackedDecorationCount;
|
||||
}
|
||||
|
||||
if (mapicon != null) this.setDecorationsDirty(); // Paper - only mark dirty if a change occurs
|
||||
- if (mapicon != null) this.setDecorationsDirty(); // Paper - only mark dirty if a change occurs
|
||||
+ if (mapicon != null && mapicon.renderOnFrame()) this.dirtyFrameDecorations = true; // Paper
|
||||
}
|
||||
|
||||
public static void addTargetDecoration(ItemStack stack, BlockPos pos, String id, Holder<MapDecorationType> decorationType) {
|
||||
@@ -434,6 +445,7 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -434,6 +444,7 @@ public class MapItemSavedData extends SavedData {
|
||||
}
|
||||
|
||||
this.setDecorationsDirty();
|
||||
@@ -143,7 +144,7 @@ index b794c097039f6a3f812dd76df407587594d3ac49..20c1272b381e2eecc814e3547c3daff0
|
||||
}
|
||||
|
||||
}
|
||||
@@ -447,6 +459,20 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -447,6 +458,20 @@ public class MapItemSavedData extends SavedData {
|
||||
|
||||
public void setColorsDirty(int x, int z) {
|
||||
this.setDirty();
|
||||
@@ -164,7 +165,7 @@ index b794c097039f6a3f812dd76df407587594d3ac49..20c1272b381e2eecc814e3547c3daff0
|
||||
Iterator iterator = this.carriedBy.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -529,6 +555,7 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -529,6 +554,7 @@ public class MapItemSavedData extends SavedData {
|
||||
public void removedFromFrame(BlockPos pos, int id) {
|
||||
this.removeDecoration(MapItemSavedData.getFrameKey(id));
|
||||
this.frameMarkers.remove(MapFrame.frameId(pos));
|
||||
@@ -172,7 +173,7 @@ index b794c097039f6a3f812dd76df407587594d3ac49..20c1272b381e2eecc814e3547c3daff0
|
||||
}
|
||||
|
||||
public boolean updateColor(int x, int z, byte color) {
|
||||
@@ -590,6 +617,93 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -590,6 +616,93 @@ public class MapItemSavedData extends SavedData {
|
||||
return "frame-" + id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user