mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-01 04:37:09 +00:00
33 lines
1.7 KiB
Diff
33 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Luna <lunahatesgogle@gmail.com>
|
|
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 80303f9466b8c7097151be313afc9a383693d18a..a5235e9035768a588af522af645fa136c9c897cf 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();
|