From 11fcd4d33821cd487fcb4c16d760a4c501e8b40e Mon Sep 17 00:00:00 2001 From: Elenterius Date: Sun, 15 Oct 2023 00:36:52 +0200 Subject: [PATCH] feat: remove the ability of mob effects to influence the hostility of Flesh Blobs spawned via the cradle --- .../biomancy/block/cradle/MobEffectTribute.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/github/elenterius/biomancy/block/cradle/MobEffectTribute.java b/src/main/java/com/github/elenterius/biomancy/block/cradle/MobEffectTribute.java index f5df57faf..484c5c597 100644 --- a/src/main/java/com/github/elenterius/biomancy/block/cradle/MobEffectTribute.java +++ b/src/main/java/com/github/elenterius/biomancy/block/cradle/MobEffectTribute.java @@ -29,10 +29,9 @@ class MobEffectTribute implements ITribute { private static final Set LIFE_ENERGY_MODIFIER = Set.of(MobEffects.HEAL, MobEffects.REGENERATION, MobEffects.HEALTH_BOOST); private static final Set DISEASE_MODIFIER = Set.of(MobEffects.HUNGER, MobEffects.WITHER, MobEffects.POISON, MobEffects.CONFUSION, ModMobEffects.CORROSIVE.get()); - private static final Set HOSTILE_MODIFIER = Set.of(MobEffects.DAMAGE_BOOST, MobEffects.JUMP, MobEffects.DAMAGE_RESISTANCE, MobEffects.FIRE_RESISTANCE, MobEffects.MOVEMENT_SPEED); + private float lifeEnergy = 0; private int diseaseModifier = 0; - private int hostileModifier = 0; private int successModifier = 0; static MobEffectTribute from(ItemStack stack) { @@ -68,21 +67,11 @@ else if (DISEASE_MODIFIER.contains(effect)) { int level = instance.getAmplifier() + 1; diseaseModifier += Math.round(level * 15 * chance); } - else if (HOSTILE_MODIFIER.contains(effect)) { - int level = instance.getAmplifier() + 1; - hostileModifier += Math.round(level * 10 * chance); - } else if (effect == MobEffects.LUCK) { int level = instance.getAmplifier() + 1; successModifier += Math.round(level * 50 * chance); } - if (effect.isBeneficial()) { - hostileModifier -= 10; - } - else { - hostileModifier += 10; - } } @Override @@ -107,7 +96,7 @@ public int diseaseModifier() { @Override public int hostileModifier() { - return hostileModifier; + return 0; } @Override