From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 10 Dec 2023 17:13:15 -0600 Subject: [PATCH] Do not log invalid items in HoverEvent and ItemFrame diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java index b2cc15da40aa7bbcfc234b4e147ed0e53f359efa..dbe9f81e298a931c3e0e5b879dc13b493b3fdb52 100644 --- a/src/main/java/net/minecraft/network/chat/HoverEvent.java +++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java @@ -280,7 +280,7 @@ public class HoverEvent { return DataResult.success(new HoverEvent.ItemStackInfo(ItemStack.of(compoundTag))); } catch (CommandSyntaxException var2) { return DataResult.error(() -> { - return "Failed to parse item tag: " + var2.getMessage(); + return null; }); } } diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java index 69912c5b300b67394dce3876d2d96872033cf156..ebc403ff31385a12e072fd6a419a7787ee76429e 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -436,7 +436,7 @@ public class ItemFrame extends HangingEntity { ItemStack itemstack = ItemStack.of(nbttagcompound1); if (itemstack.isEmpty()) { - ItemFrame.LOGGER.warn("Unable to load item from: {}", nbttagcompound1); + // Scissors - ignore invalid items } ItemStack itemstack1 = this.getItem();