Package org.spout.api.geo

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


    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

  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

      //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

    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.