Skip to content

Commit

Permalink
feat: remove the ability of mob effects to influence the hostility of…
Browse files Browse the repository at this point in the history
… Flesh Blobs spawned via the cradle
  • Loading branch information
Elenterius committed Oct 14, 2023
1 parent 1137763 commit 11fcd4d
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ class MobEffectTribute implements ITribute {

private static final Set<MobEffect> LIFE_ENERGY_MODIFIER = Set.of(MobEffects.HEAL, MobEffects.REGENERATION, MobEffects.HEALTH_BOOST);
private static final Set<MobEffect> DISEASE_MODIFIER = Set.of(MobEffects.HUNGER, MobEffects.WITHER, MobEffects.POISON, MobEffects.CONFUSION, ModMobEffects.CORROSIVE.get());
private static final Set<MobEffect> 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) {
Expand Down Expand Up @@ -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
Expand All @@ -107,7 +96,7 @@ public int diseaseModifier() {

@Override
public int hostileModifier() {
return hostileModifier;
return 0;
}

@Override
Expand Down

0 comments on commit 11fcd4d

Please sign in to comment.