Skip to content

Commit

Permalink
Fix rat status effects not actuating perfectly
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Apr 4, 2021
1 parent 3ce98c5 commit 391a041
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public void mobTick() {

if (this.age % 20 == 0 && this.isTamed() && this.getOwner() != null && !this.getOwner().getEquippedStack(EquipmentSlot.HEAD).isEmpty() && this.getOwner().getEquippedStack(EquipmentSlot.HEAD).getItem() == Mischief.RAT_MASK) {
this.getOwner().getActiveStatusEffects().forEach((statusEffect, statusEffectInstance) -> {
if (!this.hasStatusEffect(statusEffect) || (this.getStatusEffect(statusEffect) != null && this.getStatusEffect(statusEffect).getAmplifier() < statusEffectInstance.getAmplifier())) {
if (!this.hasStatusEffect(statusEffect) || (this.getStatusEffect(statusEffect) != null && this.getStatusEffect(statusEffect).getAmplifier() <= statusEffectInstance.getAmplifier())) {
this.addStatusEffect(new StatusEffectInstance(statusEffect, 60, statusEffectInstance.getAmplifier()));
}
});
Expand Down

0 comments on commit 391a041

Please sign in to comment.