Move the drawspeed calculation to the tool building, so the saved values are the actual values instead of calculating them every time

This commit is contained in:
Bernhard Bonigl committed 2014-10-28 21:10:48 +01:00
1 parent db7e4196db
commit ff7c6c17fc
5 files changed
+15 -21

No files matched your search

@@ -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!