Scissors/patches/unapplied/server/0050-Mute-invalid-attributes.patch

33 lines
1.9 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
2023-09-24 22:01:28 +00:00
index 7204b973c3ad9239e82355513f6d538107102e48..2463444778f19f937b18173798c04d9d9788a824 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
2023-09-24 22:01:28 +00:00
@@ -147,7 +147,7 @@ public class AttributeMap {
2023-07-06 22:18:03 +00:00
}
}, () -> {
- LOGGER.warn("Ignoring unknown attribute '{}'", (Object)string);
+ // LOGGER.warn("Ignoring unknown attribute '{}'", (Object)string); // Scissors - Mute invalid attributes
});
}
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
2023-09-24 22:01:28 +00:00
index a7380ce6dcbf64ad8a51dd047d178ae887518041..cb015941e5ea4618bd0964f4aa66a9f0fceb27a1 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
2023-09-24 22:01:28 +00:00
@@ -92,7 +92,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) {
- LOGGER.warn("Unable to create attribute: {}", (Object)var3.getMessage());
+ // LOGGER.warn("Unable to create attribute: {}", (Object)var3.getMessage()); // Scissors - Mute invalid attributes
return null;
}
}