Skip to content

Commit

Permalink
Make the cursor limit option apply to banners (#9554)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr authored Aug 10, 2023
1 parent 4179b8f commit 9bc70e6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion patches/server/0614-Limit-item-frame-cursors-on-maps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Limit item frame cursors on maps


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 7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c..3b12030b49b1c539684d75ca3896eb498400ef99 100644
index 7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c..50713f03c783c63f93710d986d94af544be0615a 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
@@ -295,8 +295,10 @@ public class MapItemSavedData extends SavedData {
Expand All @@ -19,3 +19,12 @@ index 7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c..3b12030b49b1c539684d75ca3896eb49
}

CompoundTag nbttagcompound = stack.getTag();
@@ -478,7 +480,7 @@ public class MapItemSavedData extends SavedData {
return true;
}

- if (!this.isTrackedCountOverLimit(256)) {
+ if (!this.isTrackedCountOverLimit(((Level) world).paperConfig().maps.itemFrameCursorLimit)) { // Paper
this.bannerMarkers.put(mapiconbanner.getId(), mapiconbanner);
this.addDecoration(mapiconbanner.getDecoration(), world, mapiconbanner.getId(), d0, d1, 180.0D, mapiconbanner.getName());
return true;

0 comments on commit 9bc70e6

Please sign in to comment.