Examples of BoxShape


Examples of org.spout.physics.collision.shape.BoxShape

import org.spout.vanilla.data.resources.VanillaMaterialModels;
import org.spout.vanilla.material.VanillaBlockMaterial;

public class MonsterSpawnerBlock extends VanillaBlockMaterial {
  public MonsterSpawnerBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.MONSTER_SPAWNER, new BoxShape(1, 1, 1), MonsterSpawner.class);
    this.setHardness(5.0F).setResistance(25.0F).setTransparent();
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

public class DropperBlock extends VanillaBlockMaterial implements Directional, RedstoneTarget {
  public static final BlockFaces BTEWNS = new BlockFaces(BlockFace.BOTTOM, BlockFace.TOP, BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH);

  public DropperBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.DROPPER, new BoxShape(1, 1, 1), Dropper.class);
    this.setHardness(3.5F).setResistance(17.5F);
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

  public static final FlowerPotBlock DEAD_BUSH = new FlowerPotBlock("Dead Bush Flower Pot", 10, VanillaMaterials.DEAD_BUSH, VanillaMaterialModels.FLOWER_POT_DEAD_BUSH);
  public static final FlowerPotBlock FERN = new FlowerPotBlock("Fern Flower Pot", 11, VanillaMaterials.FERN, VanillaMaterialModels.FLOWER_POT_FERN);
  private final BlockMaterial flowerMaterial;

  private FlowerPotBlock(String name, String model) {
    super((short) 0xF, name, 140, model, new BoxShape(1f, 1f, 1f));
    setHardness(0.0f).setResistance(0.0f).setTransparent();
    this.flowerMaterial = null;
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

    setHardness(0.0f).setResistance(0.0f).setTransparent();
    this.flowerMaterial = null;
  }

  private FlowerPotBlock(String name, int data, BlockMaterial flowerMaterial, String model) {
    super(name, 140, data, EMPTY, model, new BoxShape(1f, 1f, 1f));
    setHardness(0.0f).setResistance(0.0f).setTransparent();
    this.flowerMaterial = flowerMaterial;
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

public class NoteBlockBlock extends VanillaBlockMaterial implements Fuel, RedstoneTarget {
  public static final float BURN_TIME = 15;

  public NoteBlockBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.NOTE_BLOCK, new BoxShape(1, 1, 1), NoteBlock.class);
    this.setHardness(0.8F).setResistance(4.0F);
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

    getOwner().add(EntityInventory.class);
    getOwner().add(EntityItemCollector.class);

    //Physics
    PhysicsComponent physics = getOwner().getPhysics();
    physics.activate(2f, new BoxShape(1f, 2f, 1f), false, true);
    physics.setFriction(10f);
    physics.setRestitution(0f);

    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    dropComponent.addDrop(new ItemStack(VanillaMaterials.ARROW, random.nextInt(2)));
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.ROTTEN_FLESH, getRandom().nextInt(2))).addXpDrop((short) 5);
    getOwner().add(EntityInventory.class);
    getOwner().add(EntityItemCollector.class);

    PhysicsComponent physics = getOwner().getPhysics();
    physics.activate(2f, new BoxShape(1f, 2f, 1f), false, true);
    physics.setFriction(10f);
    physics.setRestitution(0f);

    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(20);
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

import org.spout.vanilla.material.block.attachable.GroundAttachable;
import org.spout.vanilla.util.MinecartTrackLogic;

public abstract class RailBase extends GroundAttachable {
  public RailBase(String name, int id) {
    super(name, id, null, new BoxShape(1f, 0.125f, 1.0f));
    this.setLiquidObstacle(false).setHardness(0.7F).setResistance(3.5F).setTransparent();
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

import org.spout.vanilla.util.PlayerUtil;
import org.spout.vanilla.util.RedstoneUtil;

public abstract class DoorBlock extends GroundAttachable implements Directional, Openable, RedstoneTarget {
  public DoorBlock(String name, int id, String model) {
    super(name, id, model, new BoxShape(0.2f, 2, 0.15f));
  }
View Full Code Here

Examples of org.spout.physics.collision.shape.BoxShape

    this((short) 0, name, id, model);
    setOpaque();
  }

  public Solid(short dataMask, String name, int id, String model) {
    super(dataMask, name, id, model, new BoxShape(1, 1, 1));
    setOpaque();
  }
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.