diff --git a/patches/server/Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/Hide-unnecessary-itemmeta-from-clients.patch index fbccb53b43..e4cb7f99a4 100644 --- a/patches/server/Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/Hide-unnecessary-itemmeta-from-clients.patch @@ -63,12 +63,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + ++ final CompoundTag tag = copy.getTag(); + if (level.paperConfig().anticheat.obfuscation.items.hideItemmeta) { + // Some resource packs show different textures when there is more than one item. Since this shouldn't provide a big advantage, + // we'll tell the client if there's one or (more than) two items. + copy.setCount(copy.getCount() > 1 ? 2 : 1); + // We can't just strip out display, leather helmets still use the display.color tag. -+ final CompoundTag tag = copy.getTag(); + if (tag != null) { + if (tag.get("display") instanceof CompoundTag displayTag) { + displayTag.remove("Lore"); @@ -98,6 +98,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + tag.remove("generation"); + } + } ++ ++ if (level.paperConfig().anticheat.obfuscation.items.hideItemmetaWithVisualEffects && tag != null) { ++ // Lodestone compasses ++ tag.remove("LodestonePos"); ++ if (tag.contains("LodestoneDimension")) { ++ // The client shows the glint if either the position or the dimension is present, so we just wipe ++ // the position and fake the dimension ++ tag.putString("LodestoneDimension", "paper:paper"); ++ } ++ } ++ + return copy; + } + // Paper end diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index 24726191d7..798fe012c0 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -1515,6 +1515,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public class Items extends ConfigurationPart { + public boolean hideItemmeta = false; + public boolean hideDurability = false; ++ public boolean hideItemmetaWithVisualEffects = false; + } + } +