Package vazkii.botania.api.mana

Examples of vazkii.botania.api.mana.IManaPool.recieveMana()


  @Override
  public void addMana(ItemStack stack, int mana) {
    IManaPool pool = getManaPool(stack);
    if(pool != null) {
      pool.recieveMana(mana);
      TileEntity tile = (TileEntity) pool;
      tile.getWorldObj().func_147453_f(tile.xCoord, tile.yCoord, tile.zCoord, tile.getWorldObj().getBlock(tile.xCoord, tile.yCoord, tile.zCoord));
    }
  }
View Full Code Here


          int manaInPool = pool.getCurrentMana();
          if(manaInPool > 0 && !isFull()) {
            int manaMissing = getMaxMana() - mana;
            int manaToRemove = Math.min(manaInPool, manaMissing);
            pool.recieveMana(-manaToRemove);
            recieveMana(manaToRemove);
          }
        }
      }
View Full Code Here

    if(linkedPool != null) {
      IManaPool pool = (IManaPool) linkedPool;
      int manaInPool = pool.getCurrentMana();
      int manaMissing = getMaxMana() - mana;
      int manaToRemove = Math.min(manaMissing, manaInPool);
      pool.recieveMana(-manaToRemove);
      addMana(manaToRemove);
    }

    if(acceptsRedstone()) {
      redstoneSignal = 0;
View Full Code Here

                if(tile instanceof IManaPool) {
                  IManaPool pool = (IManaPool) tile;

                  if(!item.worldObj.isRemote && pool.getCurrentMana() >= MANA_PER_TICK) {
                    pool.recieveMana(-MANA_PER_TICK);
                    item.worldObj.markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord);
                    incrementCraftingTime(item, time);
                    break getManaFromPools;
                  }
                }
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.