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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-16 08:25:38 +02:00
|
|
|
index b89ff2b404d0ffd5d0602f82576c0dc684ab2243..a2151292bc3e573fdb6f2e97124655bce5d5c1a1 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-16 08:25:38 +02:00
|
|
|
@@ -776,5 +776,10 @@ public class PaperWorldConfig {
|
2021-06-11 14:02:28 +02:00
|
|
|
private void allowUsingSignsInsideSpawnProtection() {
|
|
|
|
allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int mapItemFrameCursorLimit = 128;
|
|
|
|
+ private void mapItemFrameCursorLimit() {
|
|
|
|
+ mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit);
|
|
|
|
+ }
|
|
|
|
}
|
2021-06-15 04:59:31 +02:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
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
|
2021-06-16 06:12:06 +02:00
|
|
|
index e90cb274ae07a259b90ec2badf35980ba684c5b1..ec4c0ebc1067fea9833f93bbbada69446aeee670 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
|
2021-06-16 06:12:06 +02:00
|
|
|
@@ -296,8 +296,12 @@ public class MapItemSavedData extends SavedData {
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
MapFrame worldmapframe1 = new MapFrame(blockposition, entityitemframe.getDirection().get2DDataValue() * 90, entityitemframe.getId());
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ if (this.decorations.size() < player.level.paperConfig.mapItemFrameCursorLimit) {
|
|
|
|
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 end
|
|
|
|
}
|
|
|
|
|
|
|
|
CompoundTag nbttagcompound = stack.getTag();
|