diff --git a/common/src/main/java/com/loohp/interactivechat/modules/ItemDisplay.java b/common/src/main/java/com/loohp/interactivechat/modules/ItemDisplay.java index 3f5e4848..85b563a9 100644 --- a/common/src/main/java/com/loohp/interactivechat/modules/ItemDisplay.java +++ b/common/src/main/java/com/loohp/interactivechat/modules/ItemDisplay.java @@ -185,7 +185,7 @@ public static Component createItemDisplay(OfflineICPlayer player, ItemStack item String itemJson = ItemNBTUtils.getNMSItemStackJson(item); ItemStack trimmedItem = null; - if (InteractiveChat.sendOriginalIfTooLong && itemJson.length() > InteractiveChat.itemTagMaxLength) { + if (useInventoryView(item) || (InteractiveChat.sendOriginalIfTooLong && itemJson.length() > InteractiveChat.itemTagMaxLength)) { trimmedItem = new ItemStack(item.getType()); trimmedItem.addUnsafeEnchantments(item.getEnchantments()); if (itemMeta != null && itemMeta.hasDisplayName()) { @@ -222,6 +222,8 @@ public static Component createItemDisplay(OfflineICPlayer player, ItemStack item showHover = false; } Map dataComponents = ItemNBTUtils.getNMSItemStackDataComponents(trimmedItem == null ? item : trimmedItem); + dataComponents.remove(Key.key("minecraft", "container")); + dataComponents.remove(Key.key("minecraft", "bundle_contents")); showItem = dataComponents.isEmpty() ? ShowItem.showItem(key, itemAmount) : ShowItem.showItem(key, itemAmount, dataComponents); } else { String tag = ItemNBTUtils.getNMSItemStackTag(trimmedItem == null ? item : trimmedItem);