Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
22 Zeilen
1.3 KiB
Diff
22 Zeilen
1.3 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 7a6fbd4be33e93c7f09b1ed146ae25fe6c6b503c..3b12030b49b1c539684d75ca3896eb498400ef99 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
|
|
@@ -295,8 +295,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
|
|
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
|
|
}
|
|
|
|
CompoundTag nbttagcompound = stack.getTag();
|