/* * Decompiled with CFR 0.152. */ package net.minecraft.world.effect; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectCategory; import net.minecraft.world.entity.LivingEntity; public class WitherMobEffect extends MobEffect { public static final int DAMAGE_INTERVAL = 40; protected WitherMobEffect(MobEffectCategory category, int color) { super(category, color); } @Override public boolean applyEffectTick(ServerLevel level, LivingEntity mob, int amplification) { mob.hurtServer(level, mob.damageSources().wither(), 1.0f); return true; } @Override public boolean shouldApplyEffectTickThisTick(int tickCount, int amplification) { int interval = 40 >> amplification; if (interval > 0) { return tickCount % interval == 0; } return true; } }