Basic arrows

This commit is contained in:
mDiyo committed 2013-07-10 04:39:53 -07:00
1 parent b40106b3e9
commit cdeece329a
165 files changed
+3511 -518

No files matched your search

@@ -1,14 +1,21 @@
package mods.tinker.tconstruct.items.tools;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.library.tools.BowBase;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class Shortbow extends BowBase
{
public Shortbow(int itemID)
{
super(itemID);
this.setUnlocalizedName("InfiTool.Shortbow");
}
@Override
@@ -65,4 +72,20 @@ public class Shortbow extends BowBase
return new String[] { "weapon", "ranged", "bow" };
}
@Override
@SideOnly(Side.CLIENT)
public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5)
{
super.onUpdate(stack, world, entity, par4, par5);
if (entity instanceof EntityPlayerSP)
{
EntityPlayerSP player = (EntityPlayerSP) entity;
ItemStack usingItem = player.getItemInUse();
if (usingItem != null && usingItem.getItem() == this)
{
player.movementInput.moveForward *= 1.3F;
player.movementInput.moveStrafe *= 1.3F;
}
}
}
}