Advertisement
Guest User

Untitled

a guest
Nov 28th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. package kalmondo.tutorial.common.item;
  2. import cpw.mods.fml.common.Side;
  3. import cpw.mods.fml.common.asm.SideOnly;
  4. import net.minecraft.src.CreativeTabs;
  5. import net.minecraft.src.Item;
  6. public class ItemRuby extends Item {
  7. public ItemRuby(int par1) {
  8. super(par1); //Returns super constructor: par1 is ID
  9. setTextureFile("/TutorialGFX/Items.png"); //Sets the item texture file
  10. setItemName("kalmondoItemRuby"); //Sets the incode name of the item, make sure it doesn't clash with other items, weird stuff happens
  11. setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
  12. }
  13.  
  14. @SideOnly(Side.CLIENT) //Marks a method as client side only, typically for graphics and rendering
  15. public int getItemIconFromDamage(int i){
  16. return 0; //The first icon on the spritesheet
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement