package com.zpig333.runesofwizardry.item;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
public class ItemRunicStaff extends WizardryItem {
private final String name = "runic_staff";
public ItemRunicStaff(){
super();
this.setMaxDamage(50);
this.setFull3D();
this.setMaxStackSize(1);
}
@Override
public String getName(){
return name;
}
/* (non-Javadoc)
* @see net.minecraft.item.Item#addInformation(net.minecraft.item.ItemStack, net.minecraft.entity.player.EntityPlayer, java.util.List, boolean)
*/
@Override
public void addInformation(ItemStack stack, EntityPlayer playerIn,List<String> tooltip, boolean advanced) {
//tooltip.add("Unimplemented");
}
//the following methods are for rendering and may be temporary
@Override
public EnumAction getItemUseAction(ItemStack stack) {
return EnumAction.BLOCK;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
@Override
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand)
{
//XXX UPDATE
//playerIn.setItemInUse(itemStackIn, this.getMaxItemUseDuration(itemStackIn));
return ActionResult.newResult(EnumActionResult.SUCCESS, playerIn.getHeldItem(hand));
}
/**
* How long it takes to use or consume an item
*/
@Override
public int getMaxItemUseDuration(ItemStack stack)
{
return 72000;
}
@Override
public boolean hasContainerItem(ItemStack itemStack){
return true;
}
@Override
public ItemStack getContainerItem(ItemStack itemStack){
return itemStack.copy();
}
}