diff options
Diffstat (limited to 'patches/server/0602-Limit-item-frame-cursors-on-maps.patch')
-rw-r--r-- | patches/server/0602-Limit-item-frame-cursors-on-maps.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/server/0602-Limit-item-frame-cursors-on-maps.patch b/patches/server/0602-Limit-item-frame-cursors-on-maps.patch new file mode 100644 index 0000000000..64dc46158b --- /dev/null +++ b/patches/server/0602-Limit-item-frame-cursors-on-maps.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Yive <[email protected]> +Date: Wed, 26 May 2021 15:09:33 -0700 +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 5992f450f01349ce49286c34b8af56737de01a45..e4c4948e076cd64686dfd16ae0568fafc1437140 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 +@@ -302,8 +302,10 @@ public class MapItemSavedData extends SavedData { + + MapFrame worldmapframe1 = new MapFrame(blockposition, entityitemframe.getDirection().get2DDataValue() * 90, entityitemframe.getId()); + ++ if (this.decorations.size() < player.level().paperConfig().maps.itemFrameCursorLimit) { // Paper + this.addDecoration(MapDecoration.Type.FRAME, player.level(), "frame-" + entityitemframe.getId(), (double) blockposition.getX(), (double) blockposition.getZ(), (double) (entityitemframe.getDirection().get2DDataValue() * 90), (Component) null); + this.frameMarkers.put(worldmapframe1.getId(), worldmapframe1); ++ } // Paper + } + + CompoundTag nbttagcompound = stack.getTag(); +@@ -485,7 +487,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; |