diff --git a/patches/server/Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch index 56a52de2d5..e754012f51 100644 --- a/patches/server/Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch +++ b/patches/server/Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.checkAttributeList(); for (Map.Entry entry : this.attributeModifiers.entries()) { - Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); -+ Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()) && entry.getKey() == attribute, "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper - attribute modifiers with same namespaced key but on different attributes are fine ++ Preconditions.checkArgument(!(entry.getValue().getKey().equals(modifier.getKey()) && entry.getKey() == attribute), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper - attribute modifiers with same namespaced key but on different attributes are fine } return this.attributeModifiers.put(attribute, modifier); } diff --git a/patches/server/General-ItemMeta-fixes.patch b/patches/server/General-ItemMeta-fixes.patch index bf6e3c7701..f09f3aaf92 100644 --- a/patches/server/General-ItemMeta-fixes.patch +++ b/patches/server/General-ItemMeta-fixes.patch @@ -982,7 +982,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.checkAttributeList(); + if (this.attributeModifiers != null) { // Paper for (Map.Entry entry : this.attributeModifiers.entries()) { - Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()) && entry.getKey() == attribute, "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper - attribute modifiers with same namespaced key but on different attributes are fine + Preconditions.checkArgument(!(entry.getValue().getKey().equals(modifier.getKey()) && entry.getKey() == attribute), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper - attribute modifiers with same namespaced key but on different attributes are fine } + } // Paper + this.checkAttributeList(); // Paper - moved down