From 34e5f90edd6eff6264e4c1173c8de3c0c756f901 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sat, 27 Dec 2014 22:19:36 +0100 Subject: [PATCH] Prevent possible crash in bows --- .../java/tconstruct/library/weaponry/ProjectileWeapon.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java b/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java index 5ed98a9a..300471e7 100644 --- a/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java +++ b/src/main/java/tconstruct/library/weaponry/ProjectileWeapon.java @@ -88,6 +88,9 @@ public abstract class ProjectileWeapon extends ToolCore implements IAccuracy, IW /* Windup */ public int getWindupTime(ItemStack itemStack) { + if(!itemStack.hasTagCompound()) + return 1; + NBTTagCompound toolTag = itemStack.getTagCompound().getCompoundTag("InfiTool"); return toolTag.getInteger("DrawSpeed"); }