Package org.spoutcraft.api.material

Examples of org.spoutcraft.api.material.CustomItem


    this.setHasSubtypes(true);
  }

  @Override
  public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
    CustomItem customItem = MaterialData.getCustomItem(item.getItemDamage());
    if (customItem instanceof Food) {
      if (player.canEat(false)) {
        player.setItemInUse(item, 32);
      } else {
        player.setEating(true);
View Full Code Here


    return item;
  }

  @Override
  public EnumAction getItemUseAction(ItemStack item) {
    CustomItem customItem = MaterialData.getCustomItem(item.getItemDamage());
    if (customItem instanceof Food) {
      return EnumAction.eat;
    }
    return EnumAction.none;
  }
View Full Code Here

    // Bypass stupidity
    ItemStack var10;
    if (MaterialData.getCustomItems().length == 0) {
      var10 = new ItemStack(Item.flint);
    } else {
      CustomItem cItem = MaterialData.getCustomItems()[0];
      var10 = new ItemStack(cItem.getRawId(), 1, cItem.getRawData());
    }
    // End of stupidity
    itemRenderer.renderItemIntoGUI(this.fontRenderer, this.mc.getTextureManager(), var10, var7, var8);
    itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.getTextureManager(), var10, var7, var8);
    GL11.glDisable(GL11.GL_LIGHTING);
View Full Code Here

TOP

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

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.