blob: 10e54d27ec0c29f4e06642d0df9068942127357f (
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.ItemStack;
import net.minecraft.village.MerchantRecipe;
public class ItemThiefGloves extends ItemBase
{
public ItemThiefGloves(int par1)
{
super(par1);
this.setCreativeTab(CreativeTabs.tabTools);
}
@Override
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase)
{
if (par3EntityLivingBase instanceof EntityVillager)
{
EntityVillager entityliving = (EntityVillager) par3EntityLivingBase;
MerchantRecipe recipe = null;
entityliving.dropItem(recipe.getItemToSell().itemID, recipe.getItemToSell().stackSize);
return true;
}
else
{
return super.itemInteractionForEntity(par1ItemStack, par2EntityPlayer, par3EntityLivingBase);
}
}
}
|