Examples of consumeAllVis()


Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

    target.y += 0.5;

    List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(target.x - range, target.y - range, target.z - range, target.x + range, target.y + range, target.z + range));

    if (!entities.isEmpty() && wand.consumeAllVis(stack, player, getVisCost(), true, false)) {
      for (EntityItem item : entities) {
        MiscHelper.setEntityMotionFromVector(item, target, 0.3333F);
        ThaumicTinkerer.tcProxy.sparkle((float) item.posX, (float) item.posY, (float) item.posZ, 0);
      }
    }
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

            float z = (float) (mop.blockZ + Math.random());
            ThaumicTinkerer.tcProxy.burst(world, x, y, z, 0.2F);
          }
          world.playSoundAtEntity(player, "thaumcraft:wand", 0.5F, 1F);
        }
      } else if (!blacklist.contains(block) && !ThaumcraftApi.portableHoleBlackList.contains(block) && block != null && block.getBlockHardness(world, mop.blockX, mop.blockY, mop.blockZ) != -1F && wand.consumeAllVis(itemstack, player, getCost(tile), true, false)) {
        if (!world.isRemote) {
          world.removeTileEntity(mop.blockX, mop.blockY, mop.blockZ);
          world.setBlock(mop.blockX, mop.blockY, mop.blockZ, Blocks.air, 0, 1 | 2);
          storePickedBlock(itemstack, block, (short) meta, tile);
        }
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

  }

  @Override
  public void onUsingFocusTick(ItemStack stack, EntityPlayer p, int time) {
    ItemWandCasting wand = (ItemWandCasting) stack.getItem();
    if (!wand.consumeAllVis(stack, p, visUsage, false, false) || !p.shouldHeal())
      return;

    int potency = EnchantmentHelper.getEnchantmentLevel(Config.enchPotency.effectId, wand.getFocusItem(stack));

    if (!playerHealData.containsKey(p.getGameProfile().getName()))
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

    ThaumicTinkerer.tcProxy.sparkle((float) p.posX + p.worldObj.rand.nextFloat() - 0.5F, (float) p.posY + p.worldObj.rand.nextFloat(), (float) p.posZ + p.worldObj.rand.nextFloat() - 0.5F, 0);

    if (progress >= 30 - potency * 10 / 3) {
      playerHealData.put(p.getGameProfile().getName(), 0);

      wand.consumeAllVis(stack, p, visUsage, true, false);
      p.heal(1);
      p.worldObj.playSoundAtEntity(p, "thaumcraft:wand", 0.5F, 1F);
    }
  }

View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

    }

    @Override
    public void onUsingFocusTick(ItemStack stack, EntityPlayer p, int time) {
        ItemWandCasting wand = (ItemWandCasting) stack.getItem();
        if (!wand.consumeAllVis(stack, p, visUsage, false, false))
            return;

        MovingObjectPosition pos = BlockUtils.getTargetBlock(p.worldObj, p, false);

        if (pos != null) {
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

                            if (!p.worldObj.isRemote) {
                                p.worldObj.setBlock(pos.blockX, pos.blockY, pos.blockZ, Block.getBlockFromItem(result.getItem()), result.getItemDamage(), 1 | 2);
                                p.worldObj.playSoundAtEntity(p, "fire.ignite", 0.6F, 1F);
                                p.worldObj.playSoundAtEntity(p, "fire.fire", 1F, 1F);

                                wand.consumeAllVis(stack, p, visUsage, true, false);
                                playerData.remove(p.getGameProfile().getName());
                                decremented = false;
                            }

                            for (int i = 0; i < 25; i++) {
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

    if (Loader.isModLoaded("EnderStorage")) {
      return EnderStorageFunctions.onFocusRightClick(stack, world, p, pos);
    }
    ItemWandCasting wand = (ItemWandCasting) stack.getItem();

    if (wand.consumeAllVis(stack, p, visUsage, true, false)) {
      p.displayGUIChest(p.getInventoryEnderChest());
      world.playSoundAtEntity(p, "mob.endermen.portal", 1F, 1F);
    }

    return stack;
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

  @Override
  public void onUsingFocusTick(ItemStack stack, EntityPlayer p, int ticks) {
    ItemWandCasting wand = (ItemWandCasting) stack.getItem();

    if (wand.consumeAllVis(stack, p, getVisCost(), true, false))
      protectFromProjectiles(p);
  }

  public static void protectFromProjectiles(EntityPlayer p) {
    List<Entity> projectiles = p.worldObj.getEntitiesWithinAABB(IProjectile.class, AxisAlignedBB.getBoundingBox(p.posX - 4, p.posY - 4, p.posZ - 4, p.posX + 3, p.posY + 3, p.posZ + 3));
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

  public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer p, MovingObjectPosition movingobjectposition) {
    ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
    if (!ConfigHandler.enableFlight) {
      return itemstack;
    }
    if (wand.consumeAllVis(itemstack, p, getVisCost(), true, false)) {
      Vec3 vec = p.getLookVec();
      double force = 1 / 1.5 * (1 + EnchantmentHelper.getEnchantmentLevel(Config.enchPotency.effectId, wand.getFocusItem(itemstack)) * 0.2);
      p.motionX = vec.xCoord * force;
      p.motionY = vec.yCoord * force;
      p.motionZ = vec.zCoord * force;
 
View Full Code Here

Examples of thaumcraft.common.items.wands.ItemWandCasting.consumeAllVis()

        if (dim == paramEntityPlayer.dimension) {
          int x = ItemSkyPearl.getX(stackToCount);
          int y = ItemSkyPearl.getY(stackToCount);
          int z = ItemSkyPearl.getZ(stackToCount);

          if (wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), false, false) && TileWarpGate.teleportPlayer(paramEntityPlayer, new ChunkCoordinates(x, y, z)))
            wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), true, false);
        }
      }

      paramEntityPlayer.clearItemInUse();
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.