Examples of Arrow


Examples of com.mojang.minecraft.item.Arrow

                  if(Keyboard.getEventKey() == 63) {
                     this.raining = !this.raining;
                  }

                  if(Keyboard.getEventKey() == 15 && this.gamemode instanceof SurvivalGameMode && this.player.arrows > 0) {
                     this.level.addEntity(new Arrow(this.level, this.player, this.player.x, this.player.y, this.player.z, this.player.yRot, this.player.xRot, 1.2F));
                     --this.player.arrows;
                  }

                  if(Keyboard.getEventKey() == this.settings.buildKey.key) {
                     this.gamemode.openInventory();
View Full Code Here

Examples of com.mojang.minecraft.item.Arrow

      var5.damage = 8;
      this.ai = var5;
   }

   public void shootArrow(Level var1) {
      var1.addEntity(new Arrow(var1, this, this.x, this.y, this.z, this.yRot + 180.0F + (float)(Math.random() * 45.0D - 22.5D), this.xRot - (float)(Math.random() * 45.0D - 10.0D), 1.0F));
   }
View Full Code Here

Examples of com.mojang.minecraft.item.Arrow

   static void shootRandomArrow(Skeleton var0) {
      var0 = var0;
      int var1 = (int)((Math.random() + Math.random()) * 3.0D + 4.0D);

      for(int var2 = 0; var2 < var1; ++var2) {
         var0.level.addEntity(new Arrow(var0.level, var0.level.getPlayer(), var0.x, var0.y - 0.2F, var0.z, (float)Math.random() * 360.0F, -((float)Math.random()) * 60.0F, 0.4F));
      }

   }
View Full Code Here

Examples of org.bukkit.entity.Arrow

    // check if projectile
    if (cause == DamageCause.PROJECTILE){
      // check if arrow
      if (killer instanceof Arrow){
        Arrow arrow = (Arrow) killer;
        if (arrow.getShooter() instanceof Player){
          // player shot the arrow
          message = replacements(config.getString("deathShotByPlayer"), victim).replaceAll("%killer%", Nicknames.getNick(((Player) arrow.getShooter()).getName()));
        } else if (arrow.getShooter() instanceof Skeleton) {
          // skeleton shot the arrow
          message = replacements(config.getString("deathShotBySkeleton"), victim).replaceAll("%killer%", Utils.userFriendlyNames(arrow.getShooter().getType().getName()));
        } else {
          // something else shot the arrow, e.g. dispenser
          message = replacements(config.getString("deathShotByOther"), victim);
        }
      }
View Full Code Here

Examples of org.bukkit.entity.Arrow

                    processTamingCombat(target, master, wolf, event);
                }
            }
        }
        else if (entityType == EntityType.ARROW) {
            Arrow arrow = (Arrow) damager;
            ProjectileSource projectileSource = arrow.getShooter();

            if (projectileSource != null && projectileSource instanceof Player && SkillType.ARCHERY.shouldProcess(target)) {
                Player player = (Player) projectileSource;

                if (!Misc.isNPCEntity(player) && SkillType.ARCHERY.getPermissions(player)) {
View Full Code Here

Examples of org.bukkit.entity.Arrow

    public boolean doAction(Dispenser dis, ItemStack item, Vector velocity, BlockDispenseEvent event) {

        org.bukkit.material.Dispenser disp = (org.bukkit.material.Dispenser) dis.getData();
        BlockFace face = disp.getFacing();
        Location location = dis.getBlock().getRelative(face).getLocation().add(0.5, 0.5, 0.5);
        Arrow a = dis.getWorld().spawnArrow(location, velocity, 1.0f, 0.0f);
        a.setFireTicks(5000);
        return true;
    }
View Full Code Here

Examples of org.bukkit.entity.Arrow

    public void shoot() {

        Player shooter = manned ? getShootingPlayer() : null;
        if(shooter != null) {
            Arrow ar = area.getWorld().spawnArrow(BlockUtil.getBlockCentre(area.getCenter() == null ? area.getCenter().getBlock() : getBackBlock()).add(0, 1, 0), shooter.getLocation().getDirection().normalize(), speed, 0);
            ar.setShooter(shooter);
            ar.setTicksLived(2500);
        } else {
            for (Entity ent : area.getEntitiesInArea()) {
                if(!(ent instanceof LivingEntity)) continue;
                boolean hasFound = false;
                for(EntityType type : types) {
                    if(type.is(ent)) {
                        hasFound = true;
                        break;
                    }
                }

                if (hasFound) {
                    double yOff = ((LivingEntity) ent).getEyeHeight();
                    Location k = LocationUtil.getCenterOfBlock(LocationUtil.getNextFreeSpace(getBackBlock(), BlockFace.UP));
                    Arrow ar = area.getWorld().spawnArrow(k, ent.getLocation().add(0, yOff, 0).subtract(k.clone().add(0.5,0.5,0.5)).toVector().normalize(), speed, 0);
                    if(!((LivingEntity)ent).hasLineOfSight(ar)) {
                        ar.remove();
                        continue;
                    }
                    break;
                }
            }
View Full Code Here

Examples of org.bukkit.entity.Arrow

      if (null != damager && ed.getDamager() instanceof Arrow)
      {
        AutoRefPlayer apl = match.getPlayer(damager);
        if (apl != null) apl.incrementShotsHit();

        Arrow arrow = (Arrow) ed.getDamager();
        if (arrow.getShooter().getType() == EntityType.PLAYER)
        {
          AutoRefPlayer shooter = match.getPlayer((Player) arrow.getShooter());
          Location shotFrom = shotArrows.get(arrow);

          if (shooter != null && shotFrom != null)
            shooter.setFurthestShot(arrow.getLocation().distance(shotFrom));
        }
      }

      // spectators cannot cause damage to any entity
      if (match.getCurrentState().inProgress() &&
View Full Code Here

Examples of org.kite9.diagram.adl.Arrow

  @Kite9Item
  public Diagram simpleDiagramWithArrow() {
    Glyph hf = new Glyph("harrison_ford","Actor","Harrison Ford", null, null);
    Glyph rs = new Glyph("ridley_scott", "Director", "Ridley Scott", null, null);
    Arrow ww = new Arrow("worked_with", "worked with");
   
    new Link(ww, hf);
    new Link(ww, rs);
   
    Diagram d1 = new Diagram("my_diagram", listOf(hf, rs, ww), null);
View Full Code Here

Examples of org.kite9.diagram.adl.Arrow

 
  @Kite9Item
  public Diagram simpleDiagramWithArrow2() {
    Glyph hf = new Glyph("harrison_ford","Actor","Harrison Ford", null, null);
    Glyph rs = new Glyph("ridley_scott", "Director", "Ridley Scott", null, null);
    Arrow ww = new Arrow("worked_with", "worked with");
   
    new Link(ww, hf, LinkEndStyle.ARROW, null, LinkEndStyle.ARROW, null);
    new Link(ww, rs, null, new TextLine("label 1"), null, new TextLine("label 2"));
   
    Diagram d1 = new Diagram("my_diagram", listOf(hf, rs, ww), null);
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.