Package org.spout.vanilla.component.entity.substance

Examples of org.spout.vanilla.component.entity.substance.Tnt


  @Override
  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);
  }
View Full Code Here


    Block facingBlock = block.translate(this.getFacing(block));
    if (item.getMaterial().equals(VanillaMaterials.TNT)) {
      //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

TOP

Related Classes of org.spout.vanilla.component.entity.substance.Tnt

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.