mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-18 03:06:11 +00:00
42 lines
2.2 KiB
Diff
42 lines
2.2 KiB
Diff
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 67feb4e688d049e9f74f0deabb1ec583336a29be..63dbbc0f027ab66d183f81d6a8e0f9e0b85ea562 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
|
|
index f134a2e68d50fba021b19fac4c75fb35d0e252c6..5e79ce09bf8ba48eb7f5dfdcf1511a2964c3281d 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -396,7 +396,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();
|