Package org.spout.api.inventory

Examples of org.spout.api.inventory.ItemStack


    super(name, id, null, type);
  }

  @Override
  public ItemStack getResult() {
    return new ItemStack(VanillaMaterials.COOKED_PORKCHOP, 1);
  }
View Full Code Here


    super(name, id, null, type);
  }

  @Override
  public ItemStack getResult() {
    return new ItemStack(VanillaMaterials.BAKED_POTATO, 1);
  }
View Full Code Here

    this.setHardness(2.0F).setResistance(30.0F).addMiningType(ToolType.PICKAXE).setMiningLevel(ToolLevel.WOOD);
  }

  @Override
  public ItemStack getResult() {
    return new ItemStack(VanillaMaterials.STONE, 1);
  }
View Full Code Here

    super(name, id, null, type);
  }

  @Override
  public ItemStack getResult() {
    return new ItemStack(VanillaMaterials.COOKED_CHICKEN, 1);
  }
View Full Code Here

    super(name, id, null, type);
  }

  @Override
  public ItemStack getResult() {
    return new ItemStack(VanillaMaterials.COOKED_FISH, 1);
  }
View Full Code Here

public class MagmaCube extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.MAGMA_CUBE));
    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.MAGMA_CREAM, getRandom().nextInt(1)));
    if (getAttachedCount() == 1) {
      int spawnHealth = 1;
      if (getSize() == 2) {
        spawnHealth = 4;
      } else if (getSize() == 4) {
View Full Code Here

  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.PIG));
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    dropComponent.addDrop(new ItemStack(VanillaMaterials.RAW_PORKCHOP, getRandom().nextInt(2) + 1));
    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));

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

  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.SPIDER));
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    Random random = getRandom();
    dropComponent.addDrop(new ItemStack(VanillaMaterials.STRING, random.nextInt(2)));
    dropComponent.addDrop(new ItemStack(VanillaMaterials.SPIDER_EYE, random.nextInt(1)));
    dropComponent.addXpDrop((short) 5);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(16);
    }
    Damage damage = getOwner().add(Damage.class);
View Full Code Here

  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.SQUID));
    Random random = getRandom();
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    dropComponent.addDrop(new ItemStack(Dye.INK_SAC, random.nextInt(2) + 1));
    dropComponent.addXpDrop((short) (getRandom().nextInt(3) + 1));
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(10);
    }
  }
View Full Code Here

    int data = args.popInteger("data");
    args.assertCompletelyParsed();

    PlayerInventory inventory = player.get(PlayerInventory.class);
    if (inventory != null) {
      inventory.add(new ItemStack(material, data, quantity));
      source.sendMessage(plugin.getPrefix() + ChatStyle.GREEN + "Gave "
          + ChatStyle.WHITE + player.getName() + " " + quantity + ChatStyle.GREEN + " of " + ChatStyle.WHITE
          + material.getDisplayName());
    } else {
      throw new CommandException(player.getName() + " doesn't have a inventory!");
View Full Code Here

TOP

Related Classes of org.spout.api.inventory.ItemStack

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.