2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Yive <admin@yive.me>
|
|
|
|
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
|
2023-08-10 15:22:40 +02:00
|
|
|
index 7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c..50713f03c783c63f93710d986d94af544be0615a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
2023-06-08 03:13:54 +02:00
|
|
|
@@ -295,8 +295,10 @@ public class MapItemSavedData extends SavedData {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
MapFrame worldmapframe1 = new MapFrame(blockposition, entityitemframe.getDirection().get2DDataValue() * 90, entityitemframe.getId());
|
|
|
|
|
2023-06-08 03:13:54 +02:00
|
|
|
+ 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);
|
2021-06-11 14:02:28 +02:00
|
|
|
this.frameMarkers.put(worldmapframe1.getId(), worldmapframe1);
|
2023-06-08 03:13:54 +02:00
|
|
|
+ } // Paper
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CompoundTag nbttagcompound = stack.getTag();
|
2023-08-10 15:22:40 +02:00
|
|
|
@@ -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;
|