Scissors/patches/server/0040-Mute-invalid-attributes.patch

36 lines
2.0 KiB
Diff
Raw Normal View History

2023-07-06 22:18:03 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
Date: Thu, 6 Jul 2023 23:01:12 +0100
Subject: [PATCH] Mute invalid attributes
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
2024-04-16 03:24:44 +00:00
index b99a080ab27e24d8131fda931ca70d6d271bb01c..f88b31d9bfc8b332230fa318ba2c1de14d5cc9be 100644
2023-07-06 22:18:03 +00:00
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
2024-04-16 03:24:44 +00:00
@@ -135,7 +135,10 @@ public class AttributeMap {
if (attributeInstance != null) {
attributeInstance.load(compoundTag);
2023-07-06 22:18:03 +00:00
}
2024-04-16 03:24:44 +00:00
- }, () -> LOGGER.warn("Ignoring unknown attribute '{}'", string));
+
+ }, () -> {
2023-07-06 22:18:03 +00:00
+ // LOGGER.warn("Ignoring unknown attribute '{}'", (Object)string); // Scissors - Mute invalid attributes
2024-04-16 03:24:44 +00:00
+ });
2023-07-06 22:18:03 +00:00
}
2024-04-16 03:24:44 +00:00
}
2023-07-06 22:18:03 +00:00
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeModifier.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeModifier.java
2024-04-16 03:24:44 +00:00
index a38e91552ead256bd8dd3b74794d742555681c2d..116af10e6e2467a3e3b0095c4968a79ebb4a19d6 100644
2023-07-06 22:18:03 +00:00
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeModifier.java
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeModifier.java
2024-04-16 03:24:44 +00:00
@@ -90,7 +90,7 @@ public class AttributeModifier {
2023-07-06 22:18:03 +00:00
AttributeModifier.Operation operation = AttributeModifier.Operation.fromValue(nbt.getInt("Operation"));
return new AttributeModifier(uUID, nbt.getString("Name"), nbt.getDouble("Amount"), operation);
} catch (Exception var3) {
2024-04-16 03:24:44 +00:00
- LOGGER.warn("Unable to create attribute: {}", var3.getMessage());
+ // LOGGER.warn("Unable to create attribute: {}", var3.getMessage()); // Scissors - Mute invalid attributes
2023-07-06 22:18:03 +00:00
return null;
}
}