Skip to content

Commit

Permalink
Make hot-blooded drinking damage config dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
KreloX committed Jul 24, 2023
1 parent 18cccb9 commit 63263a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
@Config(modid = Metallurgy.MODID, name = "metallurgy_reforged/effects", category = "effect_tweaks")
public class EffectTweaksConfig {

@Config.Name("Hot-Blooded Drinking Damage")
@Config.Comment("Set to false to disable damage after drinking")
public static boolean enableIgnatiusDrinkDamage = true;

@Config.Name("Ethereal BlackList")
@Config.Comment("You can blacklist blocks that players cannot clip through.")
@Config.Comment("You can blacklist blocks that players cannot clip through")
public static String[] etheriumEffectArmorBlacklist = new String[]{"minecraft:bedrock"};


@Config.Name("Chaos Crit Damage Upper Bound")
@Config.Comment("Chaos Crit damage multiplier is a random number between 1.2 and this value")
@Config.RangeDouble(min = 1.2, max = 50)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package it.hurts.metallurgy_reforged.effect.armor;

import it.hurts.metallurgy_reforged.capabilities.effect.ProgressiveDataBundle;
import it.hurts.metallurgy_reforged.config.EffectTweaksConfig;
import it.hurts.metallurgy_reforged.effect.BaseMetallurgyEffect;
import it.hurts.metallurgy_reforged.effect.EnumEffectCategory;
import it.hurts.metallurgy_reforged.effect.IProgressiveEffect;
Expand Down Expand Up @@ -140,7 +141,7 @@ public void dealWaterDamage(LivingEvent.LivingUpdateEvent event)
public void drinkDamage(LivingEntityUseItemEvent.Finish event)
{
EntityLivingBase entity = event.getEntityLiving();
if (!canBeApplied(entity))
if (!EffectTweaksConfig.enableIgnatiusDrinkDamage || !canBeApplied(entity))
return;

EnumAction action = event.getItem().getItem().getItemUseAction(event.getItem());
Expand Down

0 comments on commit 63263a1

Please sign in to comment.