I'm trying to make a potion of silence, but calling entity.setSilent(true) doesn't do anything :(
package net.magmabits.echoing_depths.util.effects;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectCategory;
public class SilenceEffect extends StatusEffect {
public SilenceEffect(StatusEffectCategory category, int color) {
super(category, color);
}
@Override
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
entity.setSilent(true);
}
@Override
public boolean canApplyUpdateEffect(int duration, int amplifier) {
return true;
}
}