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
|
2022-05-06 17:52:14 +02:00
|
|
|
index 144ae8b70325ccb8121083223bc1da7338c39e18..aa84985596c0d20db1009e60184aabeaefdcb993 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
|
2022-05-06 17:52:14 +02:00
|
|
|
@@ -849,4 +849,9 @@ 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);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
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
|
2022-03-01 04:25:13 +01:00
|
|
|
index 4acbcafc158cf11af51d9518ba5b83aaa75f52a1..6a78374b6ab3198571df7e17023d371667ebb24b 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-11-24 22:30:53 +01:00
|
|
|
@@ -295,8 +295,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();
|