-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not override enchantments of the
stored_enchantments
component (#…
…973)
- Loading branch information
1 parent
7c6475b
commit 36c0cb2
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
patches/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
--- a/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java | ||
+++ b/net/minecraft/advancements/critereon/ItemEnchantmentsPredicate.java | ||
@@ -23,6 +_,11 @@ | ||
return this.enchantments; | ||
} | ||
@@ -48,6 +_,11 @@ | ||
super(p_333967_); | ||
} | ||
|
||
+ @Override // NEO: use getAllEnchantments for enchantments | ||
+ public boolean matches(ItemStack p_333958_) { | ||
+ return matches(p_333958_, p_333958_.getAllEnchantments()); | ||
+ } | ||
+ @Override // Neo: use getAllEnchantments for enchantments | ||
+ public boolean matches(ItemStack p_333958_) { | ||
+ return matches(p_333958_, p_333958_.getAllEnchantments()); | ||
+ } | ||
+ | ||
public boolean matches(ItemStack p_333811_, ItemEnchantments p_334059_) { | ||
for (EnchantmentPredicate enchantmentpredicate : this.enchantments) { | ||
if (!enchantmentpredicate.containedIn(p_334059_)) { | ||
@Override | ||
public DataComponentType<ItemEnchantments> componentType() { | ||
return DataComponents.ENCHANTMENTS; |