diff --git a/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java b/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java index 461b87cc..2c73e841 100644 --- a/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java +++ b/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java @@ -4,9 +4,7 @@ import net.minecraft.init.Items; import net.minecraft.util.StatCollector; import tconstruct.client.TProxyClient; import tconstruct.library.TConstructRegistry; -import tconstruct.weaponry.TinkerWeaponry; import tconstruct.weaponry.client.CrosshairType; -import tconstruct.util.Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; @@ -91,11 +89,9 @@ public abstract class ProjectileWeapon extends ToolCore implements IAccuracy, IW /* Windup */ public int getWindupTime(ItemStack itemStack) { NBTTagCompound toolTag = itemStack.getTagCompound().getCompoundTag("InfiTool"); - return (int)((float)toolTag.getInteger("DrawSpeed")*windupModifier(itemStack)); + return toolTag.getInteger("DrawSpeed"); } - protected float windupModifier(ItemStack itemStack) { return 1.0f; } - public float getWindupProgress(ItemStack itemStack, EntityPlayer player) { // what are you doing! diff --git a/src/main/java/tconstruct/weaponry/WeaponryHandler.java b/src/main/java/tconstruct/weaponry/WeaponryHandler.java index 1c2d4757..d17b5f5b 100644 --- a/src/main/java/tconstruct/weaponry/WeaponryHandler.java +++ b/src/main/java/tconstruct/weaponry/WeaponryHandler.java @@ -17,6 +17,8 @@ import tconstruct.library.crafting.ToolBuilder; import tconstruct.library.event.ToolBuildEvent; import tconstruct.library.event.ToolCraftEvent; import tconstruct.library.tools.*; +import tconstruct.weaponry.weapons.LongBow; +import tconstruct.weaponry.weapons.ShortBow; public class WeaponryHandler { // Provides ammo-items with the necessary NBT @@ -97,6 +99,7 @@ public class WeaponryHandler { return; NBTTagCompound tags = event.toolTag.getCompoundTag("InfiTool"); + ProjectileWeapon weapon = (ProjectileWeapon)event.tool; int drawSpeed = 0; float flightSpeed = 0; @@ -112,6 +115,13 @@ public class WeaponryHandler { drawSpeed = (int) ((top.drawspeed + bottom.drawspeed) / 2f * string.drawspeedModifier); flightSpeed = (top.flightSpeedMax + bottom.flightSpeedMax)/2 * string.flightSpeedModifier; + + // SHORT bows have a SHORTER windup because they're SHORT. hahahaha.... get it? + if(event.tool instanceof ShortBow) + drawSpeed *= 0.9; + // longbows have LONGER drawspeed. LOGIC! + if(event.tool instanceof LongBow) + drawSpeed *= 1.5f; } else if(event.tool instanceof Crossbow) { @@ -120,6 +130,10 @@ public class WeaponryHandler { drawSpeed = (int) ((float)top.drawspeed * string.drawspeedModifier); flightSpeed = (top.flightSpeedMax * string.flightSpeedModifier); + + // crossbows are more efficient the higher the base drawspeed is. So the higher the drawspeed, the more bonus you get + drawSpeed *= 2.5f; + drawSpeed -= drawSpeed*0.25f; } else return; diff --git a/src/main/java/tconstruct/weaponry/weapons/Crossbow.java b/src/main/java/tconstruct/weaponry/weapons/Crossbow.java index f40fd55d..11989d64 100644 --- a/src/main/java/tconstruct/weaponry/weapons/Crossbow.java +++ b/src/main/java/tconstruct/weaponry/weapons/Crossbow.java @@ -49,12 +49,6 @@ public class Crossbow extends ProjectileWeapon { return ItemStack.loadItemStackFromNBT(tags.getCompoundTag("LoadedItem")); } - @Override - public int getWindupTime(ItemStack itemStack) { - NBTTagCompound toolTag = itemStack.getTagCompound().getCompoundTag("InfiTool"); - return (int)((float)toolTag.getInteger("DrawSpeed") * 2.5f); - } - @Override public float getMinWindupProgress(ItemStack itemStack) { return 1.0f; diff --git a/src/main/java/tconstruct/weaponry/weapons/LongBow.java b/src/main/java/tconstruct/weaponry/weapons/LongBow.java index 03d99ab1..fda84eaa 100644 --- a/src/main/java/tconstruct/weaponry/weapons/LongBow.java +++ b/src/main/java/tconstruct/weaponry/weapons/LongBow.java @@ -31,11 +31,6 @@ public class LongBow extends BowBaseAmmo { return 1.7f; } - @Override - protected float windupModifier(ItemStack itemStack) { - return 1.5f; - } - @Override protected float projectileSpeedModifier(ItemStack itemStack) { return 1.5f; diff --git a/src/main/java/tconstruct/weaponry/weapons/ShortBow.java b/src/main/java/tconstruct/weaponry/weapons/ShortBow.java index 8716c80e..111684c2 100644 --- a/src/main/java/tconstruct/weaponry/weapons/ShortBow.java +++ b/src/main/java/tconstruct/weaponry/weapons/ShortBow.java @@ -15,11 +15,6 @@ public class ShortBow extends BowBaseAmmo { super(0, "Shortbow"); } - @Override - protected float windupModifier(ItemStack itemStack) { - return 0.9f; // SHORT bows have a SHORTER windup because they're SHORT. hahahaha.... get it? - } - @Override public float minAccuracy(ItemStack itemStack) { return 1;