mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
89d51d5f29
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
31 lines
2.0 KiB
Diff
31 lines
2.0 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 0ca0808c5eeeba969c048b422af37a273217ff52..ed57ce12d4d1cc632431a654cad648a8015402b1 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
|
|
@@ -299,8 +299,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(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 - Limit item frame cursors on maps
|
|
}
|
|
|
|
CompoundTag nbttagcompound = stack.getTag();
|
|
@@ -482,7 +484,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, mapiconbanner.getName());
|
|
return true;
|