Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ItemCuteEgg extends Item {
- public ItemCuteEgg () {
- super();
- maxStackSize = 1;
- setCreativeTab(CutenessTab.tabCuteness);
- setUnlocalizedName("cuteegg");
- setTextureName(Reference.MOD_ID + ":" + "cuteegg");
- }
- public EnumRarity getRarity(ItemStack par1ItemStack) {
- return EnumRarity.epic;
- }
- public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
- final EntityCutePet mob = new EntityCutePet (par2World);
- mob.setLocationAndAngles(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, par3EntityPlayer.rotationYaw, 0);
- mob.setTamed(true);
- mob.func_152115_b(par3EntityPlayer.getUniqueID().toString());
- mob.setCustomNameTag("Owner: " + par3EntityPlayer.getDisplayName());
- CutenessEntityUtil.spawnInWorld(par2World, mob);
- return par1ItemStack;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment