mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 20:22:36 +00:00
Shortbows give less slowdown while aiming
This commit is contained in:
1 parent
8161d2b493
commit
a44919a2f2
1 file changed
+21
@@ -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;
|
||||
@@ -100,4 +103,22 @@ public class ShortBow extends BowBaseAmmo {
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user