2023-04-28 19:50:48 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Luna <lunahatesgogle@gmail.com>
|
|
|
|
Date: Fri, 28 Apr 2023 16:34:15 -0300
|
|
|
|
Subject: [PATCH] Limit map decoration count
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2023-06-09 00:58:46 +00:00
|
|
|
index 3b12030b49b1c539684d75ca3896eb498400ef99..a1f042e5329343489cf30e436a8f553d39e5a6e4 100644
|
2023-04-28 19:50:48 +00: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
|
2023-06-09 00:58:46 +00:00
|
|
|
@@ -354,6 +354,12 @@ public class MapItemSavedData extends SavedData {
|
2023-04-28 19:50:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void addDecoration(MapDecoration.Type type, @Nullable LevelAccessor world, String key, double x, double z, double rotation, @Nullable Component text) {
|
|
|
|
+ // Scissors start - Limit decoration count
|
|
|
|
+ if (this.decorations.size() > 32) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Scissors end
|
|
|
|
+
|
|
|
|
int i = 1 << this.scale;
|
|
|
|
float f = (float) (x - (double) this.centerX) / (float) i;
|
|
|
|
float f1 = (float) (z - (double) this.centerZ) / (float) i;
|