Add option to clear potion effects while knocked

This commit is contained in:
2026-01-20 10:09:16 +01:00
parent e59c049566
commit 846466d1bd
2 changed files with 21 additions and 3 deletions
@@ -21,6 +21,7 @@ public class Config {
public final ForgeConfigSpec.BooleanValue totemPreventsKnockdown;
public final ForgeConfigSpec.ConfigValue<List<? extends String>> mobExecutionAllowlist;
public final ForgeConfigSpec.ConfigValue<List<? extends String>> knockedPotionEffects;
public final ForgeConfigSpec.BooleanValue removeOtherPotionEffectsWhileKnocked;
public Common(ForgeConfigSpec.Builder builder) {
builder.push("general");
@@ -49,6 +50,10 @@ public class Config {
"Example: [\"minecraft:slowness,200,1\", \"minecraft:weakness,200,0,true,false,false\"]")
.defineListAllowEmpty("knockedPotionEffects", List.of(), o -> o instanceof String);
removeOtherPotionEffectsWhileKnocked = builder
.comment("If true, remove any potion effects not listed in knockedPotionEffects while knocked. Default: false.")
.define("removeOtherPotionEffectsWhileKnocked", false);
builder.pop().push("damage_behavior");
totemPreventsKnockdown = builder