Examples of EntityArrow


Examples of net.minecraft.entity.projectile.EntityArrow

  public boolean handle(World world, int x, int y, int z,
      ForgeDirection direction, ItemStack stack, EntityPlayer player,
      IStripesPipe pipe) {
    stack.stackSize--;

    EntityArrow entityArrow = new EntityArrow(world, player, 0);
    entityArrow.setPosition(x + 0.5d, y + 0.5d, z + 0.5d);
    entityArrow.setDamage(3);
    entityArrow.setKnockbackStrength(1);
    entityArrow.motionX = direction.offsetX * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
    entityArrow.motionY = direction.offsetY * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
    entityArrow.motionZ = direction.offsetZ * 1.8d + world.rand.nextGaussian() * 0.007499999832361937D;
    world.spawnEntityInWorld(entityArrow);

 
View Full Code Here

Examples of net.minecraft.entity.projectile.EntityArrow

        }
      }

      return battery.getEnergyStored() >= distance * 10;
    } else if (entity instanceof EntityArrow) {
      EntityArrow arrow = (EntityArrow) entity;
      return arrow.canBePickedUp == 1 && battery.getEnergyStored() >= distance * 10;
    }
    return false;
  }
View Full Code Here

Examples of net.minecraft.entity.projectile.EntityArrow

            } else if(item == Items.experience_bottle) return new EntityExpBottle(worldObj);
            else if(item == Items.potionitem) {
                EntityPotion potion = new EntityPotion(worldObj);
                potion.setPotionDamage(inventory[0].getItemDamage());
                return potion;
            } else if(item == Items.arrow) return new EntityArrow(worldObj);
            else if(item == Items.egg) return new EntityEgg(worldObj);
            // else if(itemID == Item.fireballCharge) return new
            // EntitySmallFireball(worldObj);
            else if(item == Items.snowball) return new EntitySnowball(worldObj);
            else if(item == Items.spawn_egg) return ItemMonsterPlacer.spawnCreature(worldObj, inventory[0].getItemDamage(), 0, 0, 0);
View Full Code Here

Examples of net.minecraft.server.v1_7_R4.EntityArrow

        super.remove();
    }

    public static Arrow createArrow(Location location) {
        CraftWorld world = (CraftWorld) location.getWorld();
        EntityArrow arrow = new FakeArrowEntity(world, location);
        return (Arrow) arrow.getBukkitEntity();
    }
View Full Code Here

Examples of net.minecraft.src.EntityArrow

        if (arrowCritical) {
          j1 += rand.nextInt(j1 / 2 + 2);
        }
        DamageSource damagesource = null;
        if (shootingEntity == null)
          damagesource = DamageSource.causeArrowDamage(new EntityArrow(worldObj), this);
        else
          damagesource = DamageSource.causeArrowDamage(new EntityArrow(worldObj),
              shootingEntity);
        if (movingobjectposition.entityHit.attackEntityFrom(damagesource, j1)) {
          if (movingobjectposition.entityHit instanceof EntityLiving) {
            ((EntityLiving) movingobjectposition.entityHit).arrowHitTempCounter++;
            this.collided = ((EntityLiving) movingobjectposition.entityHit);
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.