Examples of spawnEntity()


Examples of org.bukkit.World.spawnEntity()

        if (player.getItemInHand().getType() == Material.FISHING_ROD) {
            player.setItemInHand(null);
        }

        Creature kraken = (Creature) world.spawnEntity(player.getEyeLocation(), (Misc.getRandom().nextInt(100) == 0 ? EntityType.CHICKEN : EntityType.SQUID));
        kraken.setCustomName(AdvancedConfig.getInstance().getKrakenName());

        if (!kraken.isValid()) {
            int attackInterval = AdvancedConfig.getInstance().getKrakenAttackInterval() * Misc.TICK_CONVERSION_FACTOR;
            new KrakenAttackTask(kraken, player, player.getLocation()).runTaskTimer(mcMMO.p, attackInterval, attackInterval);
View Full Code Here

Examples of org.bukkit.World.spawnEntity()

        if (Config.Debug())
          Config.logWarn("Player was riding a \"" + ride.toString() + "\".");
        if (ride instanceof Boat)
        {  // boats currently glitch on client when teleported, so crappy workaround is to remove it and spawn a new one
          ride.remove();
          ride = world.spawnEntity(rideLoc, EntityType.BOAT);
        }
        else
        {
          ride.setVelocity(new Vector(0, 0, 0));
          ride.teleport(rideLoc, TeleportCause.PLUGIN);
View Full Code Here

Examples of org.spout.api.geo.World.spawnEntity()

    Entity e = world.createEntity(paintingType.getCenter(against, block.getPosition()), Painting.class);
    Painting painting = e.add(Painting.class);
    painting.setType(paintingType);
    painting.setFace(against);
    world.spawnEntity(e);
  }
}
View Full Code Here

Examples of org.spout.api.geo.World.spawnEntity()

    World world = block.getWorld();
    Point pos = block.getPosition();
    Entity e = world.createEntity(new Point(world, pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()), ItemFrame.class);
    ItemFrame frame = e.add(ItemFrame.class);
    frame.setOrientation(face);
    world.spawnEntity(e);
  }
}
View Full Code Here

Examples of org.spout.api.geo.World.spawnEntity()

  public void onIgnite(Block block, Cause<?> cause) {
    // spawn a primed TntBlock
    Point pos = block.getPosition();
    World world = pos.getWorld();
    Tnt tnt = world.createEntity(pos, Tnt.class).add(Tnt.class);
    world.spawnEntity(tnt.getOwner());
    block.setMaterial(VanillaMaterials.AIR, cause);
  }

  @Override
  public void onUpdate(BlockMaterial oldMaterial, Block block) {
View Full Code Here

Examples of org.spout.api.geo.World.spawnEntity()

      //Place Activated TNT entity at direction of Dispenser
      if (facingBlock.getMaterial().getShape() != null) {
        World world = facingBlock.getWorld();
        Tnt tnt = world.createEntity(facingBlock.getPosition(), Tnt.class).add(Tnt.class);
        tnt.getOwner().getPhysics().force(new Vector3f(0.5D, 0.5D, 0.5D));
        world.spawnEntity(tnt.getOwner());
        slot.addAmount(-1);
        return true;
      }
    } else if (item.getMaterial() instanceof SpawnEgg) {
      if (facingBlock.getMaterial().getShape() != null) {
View Full Code Here

Examples of org.spout.api.geo.World.spawnEntity()

    MetadataComponent metadata = entity.get(MetadataComponent.class);
    if (metadata != null) {
      metadata.setParameters(message.getParameters());
    }

    w.spawnEntity(entity);
    System.out.println(message.toString());
  }
}
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.