Search in sources :

Example 1 with PharmacologyEffect

use of minechem.potion.PharmacologyEffect in project Minechem by iopleke.

the class MoleculeItem method addInformation.

@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
    list.add("\u00A79" + getFormulaWithSubscript(itemstack));
    RadiationEnum radioactivity = RadiationInfo.getRadioactivity(itemstack);
    String radioactivityColor = radioactivity.getColour();
    String radioactiveName = MinechemUtil.getLocalString("element.property." + radioactivity.name(), true);
    String timeLeft = "";
    if (RadiationInfo.getRadioactivity(itemstack) != RadiationEnum.stable && itemstack.getTagCompound() != null) {
        long worldTime = player.worldObj.getTotalWorldTime();
        timeLeft = TimeHelper.getTimeFromTicks(RadiationInfo.getRadioactivity(itemstack).getLife() - (worldTime - itemstack.getTagCompound().getLong("decayStart")));
    }
    list.add(radioactivityColor + radioactiveName + (timeLeft.equals("") ? "" : " (" + timeLeft + ")"));
    list.add(getRoomState(itemstack));
    MoleculeEnum molecule = MoleculeEnum.getById(itemstack.getItemDamage());
    if (PharmacologyEffectRegistry.hasEffect(molecule) && Settings.displayMoleculeEffects) {
        if (PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack), 1) != null) {
            // Polytool Detail
            if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
                for (PharmacologyEffect effect : PharmacologyEffectRegistry.getEffects(molecule)) {
                    list.add(effect.getColour() + effect.toString());
                }
            } else {
                list.add(EnumColour.DARK_GREEN + MinechemUtil.getLocalString("effect.information", true));
            }
        }
    }
}
Also used : RadiationEnum(minechem.radiation.RadiationEnum) PharmacologyEffect(minechem.potion.PharmacologyEffect) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 2 with PharmacologyEffect

use of minechem.potion.PharmacologyEffect in project Minechem by iopleke.

the class Chemicals method addFoodEffect.

@ZenMethod
public static void addFoodEffect(IIngredient ingredient, int level, double saturation) {
    PharmacologyEffect effect = new PharmacologyEffect.Food(level, (float) saturation);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 3 with PharmacologyEffect

use of minechem.potion.PharmacologyEffect in project Minechem by iopleke.

the class Chemicals method addCureEffect.

@ZenMethod
public static void addCureEffect(IIngredient ingredient, String string) {
    PharmacologyEffect effect = new PharmacologyEffect.Cure(string);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 4 with PharmacologyEffect

use of minechem.potion.PharmacologyEffect in project Minechem by iopleke.

the class Chemicals method addBurnEffect.

@ZenMethod
public static void addBurnEffect(IIngredient ingredient, int time) {
    PharmacologyEffect effect = new PharmacologyEffect.Burn(time);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 5 with PharmacologyEffect

use of minechem.potion.PharmacologyEffect in project Minechem by iopleke.

the class Chemicals method addPotionEffect.

@ZenMethod
public static void addPotionEffect(IIngredient ingredient, String potion, int time, int level) {
    PharmacologyEffect effect = new PharmacologyEffect.Potion(potion, level, time);
    addEffect(ingredient, effect);
}
Also used : PharmacologyEffect(minechem.potion.PharmacologyEffect) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Aggregations

PharmacologyEffect (minechem.potion.PharmacologyEffect)7 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)6 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 RadiationEnum (minechem.radiation.RadiationEnum)1