Package org.spout.physics.collision.shape

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


      // Set the displayed block
      setDisplayedBlock(getType().getDefaultDisplayedBlock());
    }

    PhysicsComponent physics = getOwner().getPhysics();
    physics.activate(1f, new BoxShape(0.98f, 0.49f, 0.7f), false, true);

    // Add metadata for the shaking of the Minecart and the displayed Block
    MetadataComponent metadata = getOwner().add(MetadataComponent.class);
    metadata.addMeta(Metadata.TYPE_INT, 17, VanillaData.MINECART_SHAKE_FORCE);
    metadata.addMeta(Metadata.TYPE_INT, 18, VanillaData.MINECART_SHAKE_DIR);
View Full Code Here


    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.ENDERMAN));

    //Physics
    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(40);
View Full Code Here

  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new ItemEntityProtocol());
    PhysicsComponent physics = getOwner().getPhysics();
    physics.activate(1f, new BoxShape(0.27f, 0.27f, 0.27f), false, true);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(20);
    }

    // Add metadata for ItemStack contained
View Full Code Here

public abstract class AbstractChestBlock extends VanillaBlockMaterial implements Directional, Fuel {
  public static final float BURN_TIME = 15;

  public AbstractChestBlock(String name, int id, Class<? extends AbstractChest> componentType, String model) {
    super(name, id, model, new BoxShape(1, 1, 1), componentType);
  }
View Full Code Here

public class Cactus extends StackGrowingBase implements TimedCraftable {
  private final Set<BlockMaterial> deniedNeighbours = new HashSet<BlockMaterial>();

  public Cactus(String name, int id) {
    super(name, id, VanillaMaterialModels.CACTUS, new BoxShape(1, 1, 1));
    this.setHardness(0.4F).setResistance(2.0F).setTransparent();
    this.addDeniedNeighbour(VanillaMaterials.WEB, VanillaMaterials.STONE_PRESSURE_PLATE, VanillaMaterials.WOODEN_PRESSURE_PLATE);
  }
View Full Code Here

  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.CREEPER));
    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.GUNPOWDER, getRandom().nextInt(2))).addXpDrop((short) 5);
    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

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

public class BrewingStandBlock extends VanillaBlockMaterial {
  public BrewingStandBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.BREWING_STAND, new BoxShape(1, 1, 1), BrewingStand.class);
    this.setResistance(2.5F).setHardness(10.F).setOpacity(0).setOcclusion((short) 0, BlockFace.BOTTOM);
    this.getDrops().NOT_CREATIVE.addFlags(ToolTypeFlags.PICKAXE);
  }
View Full Code Here

public class JukeboxBlock extends VanillaBlockMaterial implements Fuel {
  public static final float BURN_TIME = 15;

  public JukeboxBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.JUKEBOX, new BoxShape(1, 1, 1), Jukebox.class);
    this.setHardness(2.0F).setResistance(30.0F);
  }
View Full Code Here

import org.spout.vanilla.material.block.redstone.RedstoneTarget;
import org.spout.vanilla.util.RedstoneUtil;

public class HopperBlock extends VanillaBlockMaterial implements RedstoneTarget {
  public HopperBlock(String name, int id) {
    super(name, id, VanillaMaterialModels.HOPPER, new BoxShape(1, 1, 1), Hopper.class);
    this.setHardness(3.5F).setResistance(15.0F).addMiningType(ToolType.PICKAXE).setMiningLevel(ToolLevel.WOOD);
  }
View Full Code Here

import org.spout.vanilla.material.block.redstone.RedstoneTarget;
import org.spout.vanilla.util.RedstoneUtil;

public class CommandBlockBlock extends VanillaBlockMaterial implements RedstoneTarget {
  public CommandBlockBlock(String name, int id) {
    super(name, id, null, new BoxShape(1, 1, 1), CommandBlock.class);
    this.setResistance(18000000.0F);
  }
View Full Code Here

TOP

Related Classes of org.spout.physics.collision.shape.BoxShape

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.