Getting more spell stuff done
This commit is contained in:
parent
9d9d376e4a
commit
b34ff3c58e
78 changed files with 1133 additions and 159 deletions
|
@ -142,8 +142,8 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -139,8 +139,8 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -143,8 +143,8 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.xCoord);
|
||||
int posZ = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemComponents extends Item
|
||||
{
|
||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemComponents()
|
||||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
icons = new IIcon[ITEM_NAMES.length];
|
||||
|
||||
for (int i = 0; i < ITEM_NAMES.length; ++i)
|
||||
{
|
||||
icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseItem" + ITEM_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
|
||||
return ("" + "item.bloodMagicBaseItem." + ITEM_NAMES[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
{
|
||||
int j = MathHelper.clamp_int(meta, 0, ITEM_NAMES.length - 1);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < ITEM_NAMES.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue