Package org.spoutcraft.api.material

Examples of org.spoutcraft.api.material.Material


    output.writeShort(data);
    output.writeString(name);
  }

  public void run(int PlayerId) {
    Material material = MaterialData.getOrCreateMaterial(id, data);
    if (material == null) {
      material = MaterialData.getCustomItem(data);
    }
    if (name.equals("[resetall]")) {
      MaterialData.reset();
    }
    if (material != null) {
      if (name.equals("[reset]")) {
        material.setName(material.getNotchianName());
      } else {
        material.setName(name);
      }
    } else {
      //System.out.println("Tried to set item name to [" + name + "] for unknown material (" + id + ", " + data + ")");
    }
  }
View Full Code Here


    } else {
      list = new ArrayList<String>();
    }

    if (itemstack.itemID == MaterialData.flint.getRawId()) {
      Material item = MaterialData.getMaterial(is.getTypeId(), is.getDurability());
      String custom = item != null ? String.format(item.getName(), String.valueOf(is.getDurability())) : null;
      if (custom != null && is.getTypeId() != Item.potion.itemID) {
        if (list.size() > 0) {
          list.set(0, custom);
        } else {
          list.add(custom);
View Full Code Here

      data[i] = shape[i];
    }
    for (char c : ingred.keySet()) {
      data[i] = c;
      i++;
      Material mdata = ingred.get(c);

      int id = mdata.getRawId();
      int dmg = mdata.getRawData();

      data[i] = new net.minecraft.src.ItemStack(id, 1, dmg);
      i++;
    }
    int id = this.getResult().getTypeId();
View Full Code Here

TOP

Related Classes of org.spoutcraft.api.material.Material

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.