You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
Java
34 lines
1.0 KiB
Java
package com.zivilon.cinder_loe.potion;
|
|
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
|
|
import net.minecraft.potion.Potion;
|
|
import net.minecraft.potion.PotionEffect;
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
public class PotionHerbPoison extends Potion {
|
|
public PotionHerbPoison(int id, boolean isBadEffect, int liquidColor) {
|
|
super(id, isBadEffect, liquidColor);
|
|
}
|
|
|
|
@Override
|
|
public void performEffect(EntityLivingBase entity, int amplifier) {
|
|
}
|
|
|
|
@Override
|
|
public boolean isReady(int duration, int amplifier) {
|
|
return false;
|
|
}
|
|
|
|
public static boolean should_cancel_crit(EntityPlayer player) {
|
|
PotionEffect poison = player.getActivePotionEffect(LoEPotions.herbal_poisoning);
|
|
if (poison != null && poison.getAmplifier() >= 1) {
|
|
if (CinderLoE.DEBUG) System.out.println("Should cancel crit");
|
|
return true;
|
|
}
|
|
if (CinderLoE.DEBUG) System.out.println("Should not cancel crit");
|
|
return false;
|
|
}
|
|
}
|