From d9fcf39f653a93c0665c91c50dedc33a82ab22b5 Mon Sep 17 00:00:00 2001 From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Thu, 9 Jun 2022 15:56:21 -0400 Subject: [PATCH] Remove locname (#7909) --- patches/server/0004-Paper-config-files.patch | 5 ++--- .../0664-Make-item-validations-configurable.patch | 10 +++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch index 2b94fbc2ad..088f72113f 100644 --- a/patches/server/0004-Paper-config-files.patch +++ b/patches/server/0004-Paper-config-files.patch @@ -404,10 +404,10 @@ index 0000000000000000000000000000000000000000..844275e8671c62633e370ae3d4e0738e +} diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..2d04305279108f2102ebb026998d391f017ba721 +index 0000000000000000000000000000000000000000..30633591ecd078997e7bb0dc937f8c5ddedaa3ab --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -@@ -0,0 +1,264 @@ +@@ -0,0 +1,263 @@ +package io.papermc.paper.configuration; + +import co.aikar.timings.MinecraftTimings; @@ -592,7 +592,6 @@ index 0000000000000000000000000000000000000000..2d04305279108f2102ebb026998d391f + + public class ItemValidation extends ConfigurationPart { + public int displayName = 8192; -+ public int locName = 8192; // TODO not used anymore, can we remove? + public int loreLine = 8192; + public Book book; + diff --git a/patches/server/0664-Make-item-validations-configurable.patch b/patches/server/0664-Make-item-validations-configurable.patch index 8a1a405f54..8c87e474af 100644 --- a/patches/server/0664-Make-item-validations-configurable.patch +++ b/patches/server/0664-Make-item-validations-configurable.patch @@ -32,10 +32,10 @@ index fefa4d83c5699be0b55794cd28d13d27b66ef108..d662cb0567884ec91c900f5c90ecb369 } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c475ddea1c995df1dfcaf4f491f341761a5f8802..c098003d5801b132d71adbaa9f85c41854c684e4 100644 +index c475ddea1c995df1dfcaf4f491f341761a5f8802..a8294bf057e03c5d866f6da31e6cdfa9edd3f146 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -357,18 +357,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -357,7 +357,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CompoundTag display = tag.getCompound(DISPLAY.NBT); if (display.contains(NAME.NBT)) { @@ -44,11 +44,7 @@ index c475ddea1c995df1dfcaf4f491f341761a5f8802..c098003d5801b132d71adbaa9f85c418 } if (display.contains(LOCNAME.NBT)) { -- this.locName = limit( display.getString(LOCNAME.NBT), 8192 ); // Spigot -+ this.locName = limit( display.getString(LOCNAME.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.locName ); // Spigot // Paper - make configurable - } - - if (display.contains(LORE.NBT)) { +@@ -368,7 +368,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { ListTag list = display.getList(LORE.NBT, CraftMagicNumbers.NBT.TAG_STRING); this.lore = new ArrayList(list.size()); for (int index = 0; index < list.size(); index++) {