|
|
|
@ -2,12 +2,21 @@ package com.zivilon.cinder_loe.potion;
|
|
|
|
|
|
|
|
|
|
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
|
|
import com.zivilon.cinder_loe.CinderLoE;
|
|
|
|
|
|
|
|
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
|
|
import net.minecraft.client.gui.Gui;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.Tessellator;
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
|
|
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
|
|
|
|
public class PotionHerbPoison extends Potion {
|
|
|
|
public class PotionHerbPoison extends Potion {
|
|
|
|
|
|
|
|
public static ResourceLocation OVERDOSE_ICON = new ResourceLocation("cinder_loe", "misc/overdose.png");
|
|
|
|
|
|
|
|
|
|
|
|
public PotionHerbPoison(int id, boolean isBadEffect, int liquidColor) {
|
|
|
|
public PotionHerbPoison(int id, boolean isBadEffect, int liquidColor) {
|
|
|
|
super(id, isBadEffect, liquidColor);
|
|
|
|
super(id, isBadEffect, liquidColor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -22,7 +31,7 @@ public class PotionHerbPoison extends Potion {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean should_cancel_crit(EntityPlayer player) {
|
|
|
|
public static boolean should_cancel_crit(EntityPlayer player) {
|
|
|
|
PotionEffect poison = player.getActivePotionEffect(LoEPotions.herbal_poisoning);
|
|
|
|
PotionEffect poison = player.getActivePotionEffect(LoEPotions.overdose);
|
|
|
|
if (poison != null && poison.getAmplifier() >= 1) {
|
|
|
|
if (poison != null && poison.getAmplifier() >= 1) {
|
|
|
|
if (CinderLoE.DEBUG) System.out.println("Should cancel crit");
|
|
|
|
if (CinderLoE.DEBUG) System.out.println("Should cancel crit");
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
@ -30,4 +39,13 @@ public class PotionHerbPoison extends Potion {
|
|
|
|
if (CinderLoE.DEBUG) System.out.println("Should not cancel crit");
|
|
|
|
if (CinderLoE.DEBUG) System.out.println("Should not cancel crit");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void renderInventoryEffect(int x, int y, PotionEffect effect, Minecraft mc) {
|
|
|
|
|
|
|
|
// Currently not implemented
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean hasStatusIcon() {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|