mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Option to toggle milk curing bad omen
This commit is contained in:
committed by
granny
parent
188c30fff8
commit
c9fbe555c0
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
|
||||
+++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
|
||||
@@ -20,6 +_,12 @@
|
||||
@Override
|
||||
// CraftBukkit start
|
||||
public boolean apply(Level level, ItemStack stack, LivingEntity entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) {
|
||||
+ // Purpur start - Option to toggle milk curing bad omen
|
||||
+ net.minecraft.world.effect.MobEffectInstance badOmen = entity.getEffect(net.minecraft.world.effect.MobEffects.BAD_OMEN);
|
||||
+ if (!level.purpurConfig.milkCuresBadOmen && stack.is(net.minecraft.world.item.Items.MILK_BUCKET) && badOmen != null) {
|
||||
+ return entity.removeAllEffects(cause) && entity.addEffect(badOmen);
|
||||
+ }
|
||||
+ // Purpur end - Option to toggle milk curing bad omen
|
||||
return entity.removeAllEffects(cause);
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -85,8 +85,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean disableDropsOnCrammingDeath = false;
|
||||
public boolean milkCuresBadOmen = true;
|
||||
private void miscGameplayMechanicsSettings() {
|
||||
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
||||
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
||||
}
|
||||
|
||||
public double minecartMaxSpeed = 0.4D;
|
||||
|
||||
Reference in New Issue
Block a user