2022-07-27 23:57:50 -04: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
|
2022-12-11 00:26:17 -05:00
|
|
|
index c0633f9553fb5aa52e8ffc863159521d09cb3bd5..7449a024265c42f28a6c9a1ed8d8f4b9e3096aac 100644
|
2022-07-27 23:57:50 -04:00
|
|
|
--- 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
|
2023-07-18 17:01:00 -04:00
|
|
|
index dcf245387f59ce730cb2cfb5fc0e837a20d3dfe5..ff9c5fe2c73c9a98f7fee9ad72fede88152851e6 100644
|
2022-07-27 23:57:50 -04:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
2023-07-18 17:01:00 -04:00
|
|
|
@@ -439,7 +439,7 @@ public class ItemFrame extends HangingEntity {
|
2022-07-27 23:57:50 -04: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();
|