fixed bleeding effect not working
package se.mickelus.tetra.effects;
+import net.minecraft.entity.LivingEntity;
import net.minecraft.potion.Effect;
import net.minecraft.potion.EffectInstance;
import net.minecraft.potion.EffectType;
+import net.minecraft.util.DamageSource;
public class BleedingEffect extends Effect {
public static BleedingEffect instance;
@@ -14,6 +16,16 @@ public class BleedingEffect extends Effect {
instance = this;
}
+ @Override
+ public void performEffect(LivingEntity entity, int amplifier) {
+ entity.attackEntityFrom(DamageSource.GENERIC, amplifier);
+ }
+
+ @Override
+ public boolean isReady(int duration, int amplifier) {
+ return duration % 10 == 0;
+ }
+
@Override
public boolean shouldRender(EffectInstance effect) {
return false;
