Scissors/patches/server/0048-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-12-11 18:50:06 +00:00
index 1b0db545f93b51368c2d384dd1ba45b93d9eff87..5c3633aa6a256a197502c8139cbf61c2f493bda7 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-12-11 18:50:06 +00:00
@@ -86,7 +86,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;
}
}