mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Config to remove curse of binding with weakness
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -398,6 +398,7 @@ public class PurpurWorldConfig {
|
||||
public int playerBurpDelay = 10;
|
||||
public boolean playerBurpWhenFull = false;
|
||||
public boolean playerRidableInWater = false;
|
||||
public boolean playerRemoveBindingWithWeakness = false;
|
||||
private void playerSettings() {
|
||||
if (PurpurConfig.version < 19) {
|
||||
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
|
||||
@@ -421,6 +422,7 @@ public class PurpurWorldConfig {
|
||||
playerBurpDelay = getInt("gameplay-mechanics.player.burp-delay", playerBurpDelay);
|
||||
playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull);
|
||||
playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
|
||||
playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness);
|
||||
}
|
||||
|
||||
public boolean silkTouchEnabled = false;
|
||||
|
||||
Reference in New Issue
Block a user