mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
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:
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!
|
||||
|
||||
Reference in new issue
Block a user