Package com.sijobe.spc.wrapper

Examples of com.sijobe.spc.wrapper.Coordinate


      return player.getPitch();
   }

   @Override
   public WorldVector getPosition() {
      Coordinate c = player.getPosition();
      return new WorldVector(getWorld(), c.getX(), c.getY(), c.getZ());
   }
View Full Code Here


      player.sendChatMessage(message);
   }

   @Override
   public void setPosition(Vector pos, float pitch, float yaw) {
      player.setPosition(new Coordinate(pos.getX(),pos.getY(),pos.getZ()));
      player.setPitch(pitch);
      player.setYaw(yaw);
   }
View Full Code Here

      }
      Player player = getSenderAsPlayer(sender);
      if (params.size() == 0) {
         player.getWorld().setSpawn(player.getPosition());
      } else {
         player.getWorld().setSpawn(new Coordinate((Integer)params.get(0),(Integer)params.get(1),(Integer)params.get(2)));
      }
      Coordinate spawn = player.getWorld().getSpawn();
      player.sendChatMessage("Spawn point set to "
               + FontColour.AQUA + spawn.getBlockX() + FontColour.WHITE + ","
               + FontColour.AQUA + spawn.getBlockY() + FontColour.WHITE + ","
               + FontColour.AQUA + spawn.getBlockZ()
      );
   }
View Full Code Here

    * @param player - The player that is making a path
    * @param data - Path data for player
    */
   private void makePath(Player player, int[] data) {
      if (data[0] >= 0) { // block
         Coordinate position = player.getPosition();
         int x = MathHelper.floor_double(position.getX());
         int y = MathHelper.floor_double(position.getY()); // used to take away 1
         int z = MathHelper.floor_double(position.getZ());
         if (x != data[3] || y != data[4] || z != data[5]) { // prevx, prevy, prevz
            int start = data[2] * -1 + 1; // size

            for (int i = start; i < data[2]; i++) {
               for (int j = -1; j < data[2]; j++) {
View Full Code Here

    * @param k - The Z position of the block
    * @param type - The type (ID) of the block
    */
   private void setBlock(Player player, int i, int j, int k, int type, int meta) {
      //player.getWorld().getMinecraftWorld().func_94575_c(i, j, k, type);
      player.getWorld().setBlockDataWithMeta(new Coordinate(i, j, k), type, meta);
   }
View Full Code Here

    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      Player player = super.getSenderAsPlayer(sender);
      Coordinate c = player.getPosition();
      player.setPosition(new Coordinate((Double)params.get(0), (Double)params.get(1), (Double)params.get(2)));
      sender.sendMessageToPlayer("Moved from " +
               FontColour.AQUA + c.getBlockX() + FontColour.WHITE + ", " +
               FontColour.AQUA + c.getBlockY() + FontColour.WHITE + ", " +
               FontColour.AQUA + c.getBlockZ() + FontColour.WHITE + " to " +
               FontColour.AQUA + player.getPosition().getBlockX() + FontColour.WHITE + ", " +
               FontColour.AQUA + player.getPosition().getBlockY() + FontColour.WHITE + ", " +
               FontColour.AQUA + player.getPosition().getBlockZ()
      );
   }
View Full Code Here

            }
            if(!killPets && entity instanceof EntityTameable) {
               continue;
            }
            boolean isPig = entity instanceof EntityPig;
            Coordinate entityPos = new Coordinate(entity.posX, entity.posY, entity.posZ);
            if(withLightning && !isPig) {
               world.useLightning(entityPos);
            }
            ((EntityLiving)entity).setEntityHealth(0);
            if(owner != null) {
View Full Code Here

    *
    * @param pos - The position of the coordinate
    * @return The matching coordinate object
    */
   private Coordinate getCoordinate(Vector pos) {
      return new Coordinate(pos.getX(), pos.getY(), pos.getZ());
   }
View Full Code Here

      int quantity = 1;
      if (params.size() > 1) {
         quantity = (Integer)params.get(1);
      }
      Player player = super.getSenderAsPlayer(sender);
      Coordinate coord = player.trace(128);
      if (coord == null) {
         coord = player.getPosition();
         coord = new Coordinate(coord.getX() + (Math.random() * 10) - 5, coord.getY(), coord.getZ() + (Math.random() * 10) - 5);
      }
      for (int i = 0; i < quantity; i++) {
         if (!Entity.spawnEntity(argument, coord, player.getWorld())) {
            throw new CommandException("Could not spawn entity named " + argument);
         }
View Full Code Here

    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      Player player = super.getSenderAsPlayer(sender);
      Coordinate coord = new Coordinate(player.getPosition().getBlockX(), player.getPosition().getBlockY() - 1, player.getPosition().getBlockZ());
      player.getWorld().setBlock(coord, BLOCK_GLASS);
   }
View Full Code Here

TOP

Related Classes of com.sijobe.spc.wrapper.Coordinate

Copyright © 2018 www.massapicom. 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.