Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
31 Zeilen
2.1 KiB
Diff
31 Zeilen
2.1 KiB
Diff
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
|
|
index a89f0b652c515efbc24ffc9af47fa65082946e54..2d5e7380e8a14cbc01ba48cd05deccc0c7f53430 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
|
|
@@ -326,8 +326,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 - Limit item frame cursors on maps
|
|
this.addDecoration(MapDecorationTypes.FRAME, player.level(), MapItemSavedData.getFrameKey(entityitemframe.getId()), (double) blockposition.getX(), (double) blockposition.getZ(), (double) (entityitemframe.getDirection().get2DDataValue() * 90), (Component) null);
|
|
this.frameMarkers.put(worldmapframe1.getId(), worldmapframe1);
|
|
+ } // Paper - Limit item frame cursors on maps
|
|
}
|
|
|
|
MapDecorations mapdecorations = (MapDecorations) stack.getOrDefault(DataComponents.MAP_DECORATIONS, MapDecorations.EMPTY);
|
|
@@ -520,7 +522,7 @@ public class MapItemSavedData extends SavedData {
|
|
return true;
|
|
}
|
|
|
|
- if (!this.isTrackedCountOverLimit(256)) {
|
|
+ if (!this.isTrackedCountOverLimit(((Level) world).paperConfig().maps.itemFrameCursorLimit)) { // Paper - Limit item frame cursors on maps
|
|
this.bannerMarkers.put(mapiconbanner.getId(), mapiconbanner);
|
|
this.addDecoration(mapiconbanner.getDecoration(), world, mapiconbanner.getId(), d0, d1, 180.0D, (Component) mapiconbanner.name().orElse(null)); // CraftBukkit - decompile error
|
|
return true;
|