Package org.bukkit

Examples of org.bukkit.Location.clone()


                                if (!materials.isEmpty()) {
                                    for (dMaterial material : materials) {
                                        if (material.matchesMaterialData(getBlock()
                                                .getLocation().clone().add(x,y,z).getBlock().getType().getNewData(getBlock()
                                                        .getLocation().clone().add(x,y,z).getBlock().getData()))) {
                                            if (l.clone().add(0,1,0).getBlock().getType() == Material.AIR
                                                    && l.clone().add(0,2,0).getBlock().getType() == Material.AIR
                                                    && l.getBlock().getType() != Material.AIR)
                                                found.add(new dLocation(getBlock().getLocation().clone().add(x + 0.5, y, z + 0.5 )));
                                        }
                                    }
View Full Code Here


                                    for (dMaterial material : materials) {
                                        if (material.matchesMaterialData(getBlock()
                                                .getLocation().clone().add(x,y,z).getBlock().getType().getNewData(getBlock()
                                                        .getLocation().clone().add(x,y,z).getBlock().getData()))) {
                                            if (l.clone().add(0,1,0).getBlock().getType() == Material.AIR
                                                    && l.clone().add(0,2,0).getBlock().getType() == Material.AIR
                                                    && l.getBlock().getType() != Material.AIR)
                                                found.add(new dLocation(getBlock().getLocation().clone().add(x + 0.5, y, z + 0.5 )));
                                        }
                                    }
                                }
View Full Code Here

                                                found.add(new dLocation(getBlock().getLocation().clone().add(x + 0.5, y, z + 0.5 )));
                                        }
                                    }
                                }
                                else {
                                    if (l.clone().add(0,1,0).getBlock().getType() == Material.AIR
                                            && l.clone().add(0,2,0).getBlock().getType() == Material.AIR
                                            && l.getBlock().getType() != Material.AIR) {
                                        found.add(new dLocation(getBlock().getLocation().clone().add(x + 0.5, y, z + 0.5 )));
                                    }
                                }
View Full Code Here

                                        }
                                    }
                                }
                                else {
                                    if (l.clone().add(0,1,0).getBlock().getType() == Material.AIR
                                            && l.clone().add(0,2,0).getBlock().getType() == Material.AIR
                                            && l.getBlock().getType() != Material.AIR) {
                                        found.add(new dLocation(getBlock().getLocation().clone().add(x + 0.5, y, z + 0.5 )));
                                    }
                                }
                            }
View Full Code Here

        nmsworld.addEntity(fishHook);
        from = npc.getBukkitEntity().getLocation();
        from = from.add(0,.33,0);
        to = fishingLocation;

        Vector test = to.clone().subtract(from).toVector();
        Double elev = test.getY();
        Double testAngle = launchAngle(from, to, v, elev, g);
        if (testAngle == null) return;
        Double hangtime = hangtime(testAngle, v, elev, g);
        Vector victor = to.clone().subtract(from).toVector();
View Full Code Here

        Vector test = to.clone().subtract(from).toVector();
        Double elev = test.getY();
        Double testAngle = launchAngle(from, to, v, elev, g);
        if (testAngle == null) return;
        Double hangtime = hangtime(testAngle, v, elev, g);
        Vector victor = to.clone().subtract(from).toVector();
        Double dist = Math.sqrt(Math.pow(victor.getX(), 2) + Math.pow(victor.getZ(), 2));
        elev = victor.getY();

        if (dist == 0)
            return;
View Full Code Here

        if (zone == null) {
          return;
        }
        Location tntPlace = new Location(loc.getWorld(), loc.getX(), Warzone.getZoneByLocation(loc).getVolume().getMaxY(), loc.getZ());
        loc.getWorld().spawnEntity(tntPlace, EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(-2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, 2)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, -2)), EntityType.PRIMED_TNT);
      }
    }
View Full Code Here

          return;
        }
        Location tntPlace = new Location(loc.getWorld(), loc.getX(), Warzone.getZoneByLocation(loc).getVolume().getMaxY(), loc.getZ());
        loc.getWorld().spawnEntity(tntPlace, EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(-2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, 2)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, -2)), EntityType.PRIMED_TNT);
      }
    }
  }
View Full Code Here

        }
        Location tntPlace = new Location(loc.getWorld(), loc.getX(), Warzone.getZoneByLocation(loc).getVolume().getMaxY(), loc.getZ());
        loc.getWorld().spawnEntity(tntPlace, EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(-2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, 2)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, -2)), EntityType.PRIMED_TNT);
      }
    }
  }
View Full Code Here

        Location tntPlace = new Location(loc.getWorld(), loc.getX(), Warzone.getZoneByLocation(loc).getVolume().getMaxY(), loc.getZ());
        loc.getWorld().spawnEntity(tntPlace, EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(-2, 0, 0)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, 2)), EntityType.PRIMED_TNT);
        loc.getWorld().spawnEntity(tntPlace.clone().add(new Vector(0, 0, -2)), EntityType.PRIMED_TNT);
      }
    }
  }

  @EventHandler
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.