Examples of Potion


Examples of net.minecraft.potion.Potion

    gravitation = new BrewModPotion(LibBrewNames.MANASHOCK, 12000, new PotionEffect(ModPotions.gravitation.id, 1800, 0));
    cleansing = new BrewModPotion(LibBrewNames.CLEANSING, 16000, new PotionEffect(ModPotions.cleansing.id, 1200, 0));*/
  }

  public static void initTC() {
    Potion warpWardPotion = null;
    for(Potion potion : Potion.potionTypes)
      if(potion != null && potion.getName().equals("potion.warpward")) {
        warpWardPotion = potion;
        break;
      }
View Full Code Here

Examples of net.minecraft.potion.Potion

      return;
    }
   
    addStringToTooltip(EnumChatFormatting.LIGHT_PURPLE + String.format(StatCollector.translateToLocal("botaniamisc.brewOf"), StatCollector.translateToLocal(brew.getUnlocalizedName(stack))), list);
    for(PotionEffect effect : brew.getPotionEffects(stack)) {
      Potion potion = Potion.potionTypes[effect.getPotionID()];
      EnumChatFormatting format = potion.isBadEffect() ? EnumChatFormatting.RED : EnumChatFormatting.GRAY;
      addStringToTooltip(" " + format + StatCollector.translateToLocal(effect.getEffectName()) + (effect.getAmplifier() == 0 ? "" : (" " + StatCollector.translateToLocal("botania.roman" + (effect.getAmplifier() + 1)))), list);
    }
  }
View Full Code Here

Examples of net.minecraft.potion.Potion

  @Override
  public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
    Brew brew = getBrew(stack);
    for(PotionEffect effect : brew.getPotionEffects(stack)) {
      Potion potion = Potion.potionTypes[effect.getPotionID()];
      EnumChatFormatting format = potion.isBadEffect() ? EnumChatFormatting.RED : EnumChatFormatting.GRAY;
      list.add(format + StatCollector.translateToLocal(effect.getEffectName()) + (effect.getAmplifier() == 0 ? "" : (" " + StatCollector.translateToLocal("botania.roman" + (effect.getAmplifier() + 1)))) + EnumChatFormatting.GRAY + (potion.isInstant() ? "" : (" (" + Potion.getDurationString(effect) + ")")));
    }
  }
View Full Code Here

Examples of net.minecraft.potion.Potion

        }

        @Override
        protected void drawSlot(int slot, int x, int y, int mx, int my, float frame) {
            GL11.glColor4f(1, 1, 1, 1);
            Potion potion = validPotions.get(slot);
            PotionEffect effect = getEffect(potion.id);
            boolean blank = effect == null;
            if (effect == null)
                effect = new PotionEffect(potion.id, 1200, 0);
            int shade = selectedslot == slot ? 2 : blank ? 1 : 0;

            CCRenderState.changeTexture("textures/gui/container/enchanting_table.png");
            drawTexturedModalRect(x, y, 0, 166 + getSlotHeight(slot) * shade, width - 30, getSlotHeight(slot));
            drawTexturedModalRect(x + width - 30, y, width - 23, 166 + getSlotHeight(slot) * shade, 30, getSlotHeight(slot));

            if (potion.hasStatusIcon()) {
                CCRenderState.changeTexture("textures/gui/container/inventory.png");
                int icon = potion.getStatusIconIndex();
                drawTexturedModalRect(x + 1, y + 1, icon % 8 * 18, 198 + icon / 8 * 18, 18, 18);
            }

            String name = StatCollector.translateToLocal(potion.getName());
            String amp = effect.getAmplifier() > 0 ? " " + translateAmplifier(effect.getAmplifier()) : "";
            int textColour = shade == 0 ? 0x685e4a : shade == 1 ? 0x407f10 : 0xffff80;
            if (fontRenderer.getStringWidth(name + amp) < width - 20) {
                fontRenderer.drawString(name + amp, x + 20, y + 1, textColour);
            } else {
View Full Code Here

Examples of net.minecraft.potion.Potion

      int max = (advancedTooltips ? 8 : 3);
     
      for (int i = 0; i < Math.min(effectList.tagCount(), max); i++) {
        PotionEffect effect = PotionEffect.readCustomPotionEffectFromNBT(
            effectList.getCompoundTagAt(i));
        Potion potion = Potion.potionTypes[effect.getPotionID()];
        int duration = (int)(effect.getDuration() * handler.durationMultiplier());
       
        StringBuilder str = new StringBuilder()
          .append(potion.isBadEffect() ? EnumChatFormatting.RED : EnumChatFormatting.GRAY)
          .append(StatCollector.translateToLocal(effect.getEffectName()));
        if (effect.getAmplifier() > 0)
          str.append(" ").append(StatCollector.translateToLocal("potion.potency." + effect.getAmplifier()));
        str.append(" (").append(StringUtils.ticksToElapsedTime(duration)).append(")");
       
View Full Code Here

Examples of net.minecraft.potion.Potion

        if (effects != null)
          potionEffects.addAll(effects);
      }
   
    for (PotionEffect effect : potionEffects) {
      Potion potion = Potion.potionTypes[effect.getPotionID()];
      PotionEffect active = player.getActivePotionEffect(potion);
      effect = new SmallPotionEffect(effect, active);
      player.addPotionEffect(effect);
    }
   
View Full Code Here

Examples of net.minecraft.potion.Potion

  }
 
  @Override
  public void performEffect(EntityLivingBase entity) {
    int smallEffect = 6 * (getAmplifier() + 1) / ItemDrinkingHelmet.maxUses;
    Potion potion = Potion.potionTypes[getPotionID()];
    if (entity.isEntityUndead() ? (potion == Potion.heal) : (potion == Potion.harm))
      entity.attackEntityFrom(DamageSource.magic, smallEffect);
    else if (potion == Potion.heal) entity.heal(smallEffect);
    else super.performEffect(entity);
  }
View Full Code Here

Examples of net.minecraft.src.Potion

    if (PotionHelper.field_77925_n != null) {
      PotionHelper.field_77925_n.clear();
    }

    waterBottleColor = 3694022;
    Potion len$;

    for (Iterator arr$ = potions.iterator(); arr$.hasNext(); len$.liquidColor = len$.origColor) {
      len$ = (Potion)arr$.next();
    }
View Full Code Here

Examples of net.minecraft.src.Potion

  static void reloadPotionColors(Properties properties) {
    Iterator temp = potions.iterator();

    while (temp.hasNext()) {
      Potion potion = (Potion)temp.next();
      Colorizer.loadIntColor(potion.name, potion);
    }

    int[] temp1 = new int[] {waterBottleColor};
    Colorizer.loadIntColor("potion.water", temp1, 0);
View Full Code Here

Examples of org.bukkit.potion.Potion

        // World record winning stupidest necessary workaround for a Bukkit issue
        if ((item.getItemStack().getDurability() & 0x40) != 0
                && PotionType.getByDamageValue(item.getItemStack().getDurability() & 0xF).isInstant()) {
            item.getItemStack().setDurability((short)(item.getItemStack().getDurability() & ~0x40));
        }
        Potion pot = Potion.fromItemStack(item.getItemStack());
        if (pot == null || pot.getType() == null)
            return String.valueOf(item.getItemStack().getDurability());
        return pot.getType().name() + "," + pot.getLevel() + "," + pot.hasExtendedDuration() + "," + pot.isSplash();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.