Config to remove curse of binding with weakness

This commit is contained in:
Encode42
2025-01-12 12:11:13 -08:00
committed by granny
parent ce87a62878
commit 8bff021a40
3 changed files with 13 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/inventory/ArmorSlot.java
+++ b/net/minecraft/world/inventory/ArmorSlot.java
@@ -42,7 +_,7 @@
@Override
public boolean mayPickup(Player player) {
ItemStack item = this.getItem();
- return (item.isEmpty() || player.isCreative() || !EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE))
+ return (item.isEmpty() || player.isCreative() || (!EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE) || player.level().purpurConfig.playerRemoveBindingWithWeakness && player.hasEffect(net.minecraft.world.effect.MobEffects.WEAKNESS))) // Purpur - Config to remove curse of binding with weakness
&& super.mayPickup(player);
}