Examples of Brew


Examples of com.prancingdonkey.domain.Brew

    }


    @Test
    public void testCanSubmitBrewDefinition() throws Exception {
        Brew brew = new Brew();
        muleContext.getClient().dispatch("jms://brews.definitions", brew, null);
        assertTrue(callbackLatch.await(15, TimeUnit.SECONDS));
    }
View Full Code Here

Examples of com.prancingdonkey.domain.Brew

        assertNotNull(response);
    }

    @Test
    public void testCanRouteBrews() throws Exception {
        muleContext.getClient().dispatch("vm://orders",new Brew(),null);
        MuleMessage response = muleContext.getClient().request("jms://brews.definitions", 15000);
        assertNotNull(response);
    }
View Full Code Here

Examples of com.prancingdonkey.model.Brew

    @Test
    public void testExpressionComponent() throws Exception
    {
        MuleClient muleClient = new MuleClient(muleContext);
       
        Brew payload = new Brew();

        MuleMessage result = muleClient.send("vm://process-stamp.in", payload, null);

        assertThat(result.getPayload(), is(not(instanceOf(NullPayload.class))));
        assertThat(((Brew)result.getPayload()).getProcessedTime(), is(notNullValue()));
View Full Code Here

Examples of com.prancingdonkey.model.Brew

    @Test
    public void testExpressionComponent() throws Exception
    {
        MuleClient muleClient = new MuleClient(muleContext);
       
        Brew payload = new Brew();

        MuleMessage result = muleClient.send("vm://external-process-stamp.in", payload, null);

        assertThat(result.getPayload(), is(not(instanceOf(NullPayload.class))));
        assertThat(((Brew)result.getPayload()).getProcessedTime(), is(notNullValue()));
View Full Code Here

Examples of vazkii.botania.api.brew.Brew

  @Override
  public int getColorFromItemStack(ItemStack stack, int pass) {
    if(pass == 0)
      return 0xFFFFFF;
   
    Brew brew = getBrew(stack);
    if(brew == BotaniaAPI.fallbackBrew)
      return 0xC6000E;
   
    Color color = new Color(brew.getColor(stack));
    int add = (int) (Math.sin((double) ClientTickHandler.ticksInGame * 0.2) * 24);
   
    int r = Math.max(0, Math.min(255, color.getRed() + add));
    int g = Math.max(0, Math.min(255, color.getGreen() + add));
    int b = Math.max(0, Math.min(255, color.getBlue() + add));
View Full Code Here

Examples of vazkii.botania.api.brew.Brew

 
  @Override
  public void addHiddenTooltip(ItemStack stack, EntityPlayer player, List list, boolean adv) {
    super.addHiddenTooltip(stack, player, list, adv);
   
    Brew brew = getBrew(stack);
    if(brew == BotaniaAPI.fallbackBrew) {
      addStringToTooltip(EnumChatFormatting.LIGHT_PURPLE + StatCollector.translateToLocal("botaniamisc.notInfused"), list);
      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 vazkii.botania.api.brew.Brew

    return BaubleType.AMULET;
  }

  @Override
  public void onWornTick(ItemStack stack, EntityLivingBase player) {
    Brew brew = getBrew(stack);
    if(brew != BotaniaAPI.fallbackBrew && player instanceof EntityPlayer && !player.worldObj.isRemote) {
      EntityPlayer eplayer = (EntityPlayer) player;
      PotionEffect effect = brew.getPotionEffects(stack).get(0);
      float cost = (float) brew.getManaCost(stack) / effect.getDuration() / (1 + effect.getAmplifier()) * 2.5F;
      boolean doRand = cost < 1;
      if(ManaItemHandler.requestManaExact(stack, eplayer, (int) Math.ceil(cost), false)) {
        PotionEffect currentEffect = player.getActivePotionEffect(Potion.potionTypes[effect.getPotionID()]);
        if(currentEffect == null || currentEffect.getDuration() < 3) {
          PotionEffect applyEffect = new PotionEffect(effect.getPotionID(), 80, effect.getAmplifier());
View Full Code Here

Examples of vazkii.botania.api.brew.Brew

    return String.format(StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name"), StatCollector.translateToLocal(getBrew(stack).getUnlocalizedName(stack)), EnumChatFormatting.BOLD + "" + getSwigsLeft(stack) + EnumChatFormatting.RESET);
  }

  @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 vazkii.botania.api.brew.Brew

    int width = gui.getWidth() - 30;
    int height = gui.getHeight();
    int x = gui.getLeft() + 16;
    int y = gui.getTop() + 12;
   
    Brew brew = recipe.getBrew();
    FontRenderer renderer = Minecraft.getMinecraft().fontRenderer;
    boolean unicode = renderer.getUnicodeFlag();
    renderer.setUnicodeFlag(true);
    String s = EnumChatFormatting.BOLD + String.format(StatCollector.translateToLocal("botaniamisc.brewOf"), StatCollector.translateToLocal(brew.getUnlocalizedName()));
    renderer.drawString(s, gui.getLeft() + gui.getWidth() / 2 - renderer.getStringWidth(s) / 2, y, 0x222222);
    renderer.setUnicodeFlag(unicode);
    PageText.renderText(x, y + 22, width, height, text);
   
    ItemStack book = Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem();
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.