Scissors/patches/server/0004-Fixes-log-spam.patch

46 lines
2.6 KiB
Diff
Raw Normal View History

2024-05-05 17:47:44 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
Date: Sun, 5 May 2024 12:31:13 -0500
Subject: [PATCH] Fixes log spam
2024-05-05 17:49:49 +00:00
diff --git a/src/main/java/net/minecraft/network/chat/HoverEvent.java b/src/main/java/net/minecraft/network/chat/HoverEvent.java
index d8de9ec38f5e5b10c177895728815d8659d0b601..d141a39f98f58c5d61e25cab89e742845ca8185b 100644
--- a/src/main/java/net/minecraft/network/chat/HoverEvent.java
+++ b/src/main/java/net/minecraft/network/chat/HoverEvent.java
@@ -271,7 +271,7 @@ public class HoverEvent {
DynamicOps<Tag> dynamicOps = (DynamicOps<Tag>)(ops != null ? ops.withParent(NbtOps.INSTANCE) : NbtOps.INSTANCE);
return ItemStack.CODEC.parse(dynamicOps, compoundTag).map(HoverEvent.ItemStackInfo::new);
} catch (CommandSyntaxException var4) {
- return DataResult.error(() -> "Failed to parse item tag: " + var4.getMessage());
+ return null;
}
}
}
2024-05-05 17:47:44 +00:00
diff --git a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
index ee972fa1a2bc023ed18eaceae21c8c8244754e6a..4f92d9c5850156c2349371d801a96a477f1af96c 100644
--- a/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
+++ b/src/main/java/net/minecraft/world/entity/AreaEffectCloud.java
@@ -385,7 +385,7 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
if (nbt.contains("Particle", 10)) {
ParticleTypes.CODEC.parse(registryops, nbt.get("Particle")).resultOrPartial((s) -> {
- AreaEffectCloud.LOGGER.warn("Failed to parse area effect cloud particle options: '{}'", s);
+ // Scissors - Don't log custom particle errors
}).ifPresent(this::setParticle);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index a46bf73c608641bf1f00fd55242de71a0f2ee06e..06a4a1cb9e46b3981629f1f8c4a0028c407ce234 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -603,7 +603,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
if (generation) entity.generation = true; // Paper - Don't fire sync event during generation
entity.load(nbt);
}, () -> {
- EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
+ // Scissors - Don't log invalid entities
});
}