2022-07-28 03:57:50 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Luna <lunahatesgogle@gmail.com>
|
|
|
|
Date: Sun, 20 Mar 2022 09:31:16 -0300
|
|
|
|
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 b50cd7a39c077dcbabdfea1b9290bf5b144d4384..d38562b518b28ba4617d39e4587c7fa72859ab11 100644
|
|
|
|
--- a/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
|
|
|
+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java
|
|
|
|
@@ -314,7 +314,7 @@ public class HoverEvent {
|
|
|
|
CompoundTag compoundTag = TagParser.parseTag(string);
|
|
|
|
return new HoverEvent.ItemStackInfo(item, i, compoundTag);
|
|
|
|
} catch (CommandSyntaxException var6) {
|
|
|
|
- HoverEvent.LOGGER.warn("Failed to parse tag: {}", string, var6);
|
|
|
|
+ // Scissors - Ignore invalid items
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -328,7 +328,7 @@ public class HoverEvent {
|
|
|
|
CompoundTag compoundTag = TagParser.parseTag(text.getString());
|
|
|
|
return new HoverEvent.ItemStackInfo(ItemStack.of(compoundTag));
|
|
|
|
} catch (CommandSyntaxException var2) {
|
|
|
|
- HoverEvent.LOGGER.warn("Failed to parse item tag: {}", text, var2);
|
|
|
|
+ // Scissors - Ignore invalid items
|
|
|
|
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
|
2022-11-12 23:00:46 +00:00
|
|
|
index b9cb39efe14a877ddedc5a5e4141ee5199ea8daf..1450a3ca71a73dd7c73cb9ba15ce98727b87dc20 100644
|
2022-07-28 03:57:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
2022-11-12 23:00:46 +00:00
|
|
|
@@ -427,7 +427,7 @@ public class ItemFrame extends HangingEntity {
|
2022-07-28 03:57:50 +00:00
|
|
|
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();
|