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
|
2024-06-14 01:32:45 +02:00
|
|
|
index d6a0a882331226c3ae4ced09e449eb7931740f8f..a43544704109f21bab230dd9bf0401e28f878582 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
|
2024-06-14 01:32:45 +02:00
|
|
|
@@ -322,8 +322,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());
|
|
|
|
|
2024-01-19 13:22:30 +01:00
|
|
|
+ if (this.decorations.size() < player.level().paperConfig().maps.itemFrameCursorLimit) { // Paper - Limit item frame cursors on maps
|
2024-06-14 01:32:45 +02:00
|
|
|
this.addDecoration(MapDecorationTypes.FRAME, player.level(), MapItemSavedData.getFrameKey(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);
|
2024-01-19 13:22:30 +01:00
|
|
|
+ } // Paper - Limit item frame cursors on maps
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
2024-04-24 16:29:12 +02:00
|
|
|
MapDecorations mapdecorations = (MapDecorations) stack.getOrDefault(DataComponents.MAP_DECORATIONS, MapDecorations.EMPTY);
|
2024-06-14 01:32:45 +02:00
|
|
|
@@ -488,7 +490,7 @@ public class MapItemSavedData extends SavedData {
|
2023-08-10 15:22:40 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (!this.isTrackedCountOverLimit(256)) {
|
2024-01-19 13:22:30 +01:00
|
|
|
+ if (!this.isTrackedCountOverLimit(((Level) world).paperConfig().maps.itemFrameCursorLimit)) { // Paper - Limit item frame cursors on maps
|
2023-08-10 15:22:40 +02:00
|
|
|
this.bannerMarkers.put(mapiconbanner.getId(), mapiconbanner);
|
2024-04-24 16:29:12 +02:00
|
|
|
this.addDecoration(mapiconbanner.getDecoration(), world, mapiconbanner.getId(), d0, d1, 180.0D, (Component) mapiconbanner.name().orElse(null)); // CraftBukkit - decompile error
|
2023-08-10 15:22:40 +02:00
|
|
|
return true;
|