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

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