Guest User

Untitled

a guest
Oct 19th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. public class ItemCuteEgg extends Item {
  2.  
  3.     public ItemCuteEgg () {
  4.         super();
  5.         maxStackSize = 1;
  6.         setCreativeTab(CutenessTab.tabCuteness);
  7.         setUnlocalizedName("cuteegg");
  8.         setTextureName(Reference.MOD_ID + ":" + "cuteegg");
  9.     }
  10.  
  11.     public EnumRarity getRarity(ItemStack par1ItemStack) {
  12.         return EnumRarity.epic;
  13.     }
  14.  
  15.     public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
  16.  
  17.         final EntityCutePet mob = new EntityCutePet (par2World);
  18.         mob.setLocationAndAngles(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw, 0);
  19.         mob.setTamed(true);
  20.         mob.func_152115_b(par3EntityPlayer.getUniqueID().toString());
  21.         mob.setCustomNameTag("Owner: " + par3EntityPlayer.getDisplayName());
  22.         CutenessEntityUtil.spawnInWorld(par2World, mob);
  23.  
  24.         return par1ItemStack;
  25.  
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment