blob: c346df3fe6c8f940a9edff3354ab25eb24ce5ca4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package bspkrs.briefcasespeakers.item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Tuple;
public class ItemThiefGloves extends Item
{
public ItemThiefGloves(int par1)
{
super(par1);
this.setCreativeTab(CreativeTabs.tabTools);
}
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase)
{
if (par3EntityLivingBase instanceof EntityVillager)
{
EntityVillager entityliving = (EntityVillager)par3EntityLivingBase;
Tuple tuple = (Tuple)entityliving.villagerStockList.get(Integer.valueOf(1));
entityliving.dropItem(((Integer)tuple.getFirst()).intValue(), 1);
return true;
}
else
{
return super.itemInteractionForEntity(par1ItemStack, par2EntityPlayer, par3EntityLivingBase);
}
}
}
|