Initial comment to start using Blood Utils' book

This commit is contained in:
WayofTime 2014-11-03 18:05:28 -05:00
parent d1fa088923
commit 51346b5638
90 changed files with 2272 additions and 21 deletions

View file

@ -0,0 +1,50 @@
package WayofTime.alchemicalWizardry.common.book;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
public class ItemBMBook extends Item
{
public ItemBMBook()
{
super();
setMaxStackSize(1);
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
}
@Override
public void registerIcons(IIconRegister ir)
{
itemIcon = ir.registerIcon("AlchemicalWizardry" + ":" + "guide");
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
player.openGui(AlchemicalWizardry.instance, 2, world, (int)player.posX, (int)player.posY, (int)player.posZ);
return stack;
}
@Override
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5)
{
super.onUpdate(stack, world, entity, par4, par5);
if(!stack.hasTagCompound())
stack.setTagCompound(new NBTTagCompound());
}
@Override
public void onCreated(ItemStack stack, World world, EntityPlayer player)
{
super.onCreated(stack, world, player);
if(!stack.hasTagCompound())
stack.setTagCompound(new NBTTagCompound());
}
}