BloodMagic/BM_src/WayofTime/alchemicalWizardry/common/items/ScribeTool.java
Fenn e3644f2d2b Massive rework of configs, items and blocks.
I redone where the items/blocsks are stored and how the configs are
handled to clean up it and give space. You can change the config line to
AWWayofTime if you want to keep the compatibility with old configs. Now
you reference the blocks from the ModBlocks and Items from the ModItems.
2014-01-17 21:05:38 +00:00

53 lines
1.4 KiB
Java

package WayofTime.alchemicalWizardry.common.items;
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import java.util.List;
public class ScribeTool extends EnergyItems {
private int meta;
public ScribeTool(int id, int inkType)
{
super(id);
setMaxStackSize(1);
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
setMaxDamage(10);
setEnergyUsed(10);
this.meta = inkType;
}
@Override
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("The writing is on the wall...");
if (!(par1ItemStack.stackTagCompound == null))
{
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
}
}
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
if (par1ItemStack.getItemDamage() > 0)
{
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed());
}
return par1ItemStack;
}
public int getType()
{
return this.meta;
}
}