Skip to content

Commit

Permalink
Shortbows give less slowdown while aiming
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 21, 2014
1 parent 8161d2b commit a44919a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/tconstruct/weaponry/weapons/ShortBow.java
@@ -1,5 +1,8 @@
package tconstruct.weaponry.weapons;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.entity.EntityPlayerSP;
import tconstruct.weaponry.TinkerWeaponry;
import tconstruct.weaponry.ammo.ArrowAmmo;
import tconstruct.library.weaponry.BowBaseAmmo;
Expand Down Expand Up @@ -100,4 +103,22 @@ public Item getAccessoryItem ()
{
return TinkerWeaponry.partBowLimb;
}

@Override
@SideOnly(Side.CLIENT)
public void onUpdate (ItemStack stack, World world, Entity entity, int par4, boolean par5)
{
// shortbows are smaller and more mobile than longbows
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.5F;
player.movementInput.moveStrafe *= 1.5F;
}
}
}
}

0 comments on commit a44919a

Please sign in to comment.