Buggy code:
public class ItemSentientSword extends ItemSword implements IMultiWillTool , IDemonWillWeapon , IMeshProvider { public static int [ ] soulBracket = new int [ ] { 16 , 60 , 200 , 400 , 1000 } ; public static double [ ] defaultDamageAdded = new double [ ] { 1 , 1.5 , 2 , 2.5 , 3 } ; public static double [ ] destructiveDamageAdded = new double [ ] { 1.5 , 2.25 , 3 , 3.75 , 4.5 } ; public static double [ ] vengefulDamageAdded = new double [ ] { 0 , 0.5 , 1 , 1.5 , 2 } ; public static double [ ] steadfastDamageAdded = new double [ ] { 0 , 0.5 , 1 , 1.5 , 2 } ; public static double [ ] soulDrainPerSwing = new double [ ] { 0.05 , 0.1 , 0.2 , 0.4 , 0.75 } ; public static double [ ] soulDrop = new double [ ] { 2 , 4 , 7 , 10 , 13 } ; public static double [ ] staticDrop = new double [ ] { 1 , 1 , 2 , 3 , 3 } ; public static double [ ] healthBonus = new double [ ] { 0 , 0 , 0 , 0 , 0 } ; public static double [ ] vengefulAttackSpeed = new double [ ] { - 2.1 , - 2 , - 1.8 , - 1.7 , - 1.6 } ; public static double [ ] destructiveAttackSpeed = new double [ ] { - 2.6 , - 2.7 , - 2.8 , - 2.9 , - 3 } ; public static int [ ] absorptionTime = new int [ ] { 200 , 300 , 400 , 500 , 600 } ; public static double maxAbsorptionHearts = 10 ; public static int [ ] poisonTime = new int [ ] { 25 , 50 , 60 , 80 , 100 } ; public static int [ ] poisonLevel = new int [ ] { 0 , 0 , 0 , 1 , 1 } ; public static double [ ] movementSpeed = new double [ ] { 0.05 , 0.1 , 0.15 , 0.2 , 0.25 } ; public ItemSentientSword ( ) { } public void recalculatePowers ( ItemStack stack , World world , EntityPlayer player ) { EnumDemonWillType type = PlayerDemonWillHandler . getLargestWillType ( player ) ; double soulsRemaining = PlayerDemonWillHandler . getTotalDemonWill ( type , player ) ; this . setCurrentType ( stack , ( soulsRemaining > 0 ? type : EnumDemonWillType . DEFAULT ) ) ; int level = getLevel ( stack , soulsRemaining ) ; double drain = ( level >= 0 ) ? ItemSentientSword . soulDrainPerSwing [ level ] : 0 ; double extraDamage = getExtraDamage ( type , level ) ; setDrainOfActivatedSword ( stack , drain ) ; setDamageOfActivatedSword ( stack , ( 5 + extraDamage ) ) ; setStaticDropOfActivatedSword ( stack , ( level >= 0 ? ItemSentientSword . staticDrop [ level ] : 1 ) ) ; setDropOfActivatedSword ( stack , ( level >= 0 ? ItemSentientSword . soulDrop [ level ] : 0 ) ) ; <START_BUG> setAttackSpeedOfSword ( stack , ( level >= 0 ? getAttackSpeed ( type , level ) : 0 ) ) ; <END_BUG> setHealthBonusOfSword ( stack , ( level >= 0 ? getHealthBonus ( type , level ) : 0 ) ) ; setSpeedOfSword ( stack , ( level >= 0 ? getMovementSpeed ( type , level ) : 0 ) ) ; } public double getExtraDamage ( EnumDemonWillType type , int willBracket ) { } public double getAttackSpeed ( EnumDemonWillType type , int willBracket ) { } public double getHealthBonus ( EnumDemonWillType type , int willBracket ) { } public double getMovementSpeed ( EnumDemonWillType type , int willBracket ) { } public void applyEffectToEntity ( EnumDemonWillType type , int willBracket , EntityLivingBase target , EntityPlayer attacker ) { } @ Override public boolean hitEntity ( ItemStack stack , EntityLivingBase target , EntityLivingBase attacker ) { } @ Override public EnumDemonWillType getCurrentType ( ItemStack stack ) { } public void setCurrentType ( ItemStack stack , EnumDemonWillType type ) { } @ Override public ActionResult < ItemStack > onItemRightClick ( ItemStack stack , World world , EntityPlayer player , EnumHand hand ) { } @ Override public boolean shouldCauseReequipAnimation ( ItemStack oldStack , ItemStack newStack , boolean slotChanged ) { } private int getLevel ( ItemStack stack , double soulsRemaining ) { } @ Override @ SideOnly ( Side . CLIENT ) public void addInformation ( ItemStack stack , EntityPlayer player , List < String > tooltip , boolean advanced ) { } @ Override public boolean onLeftClickEntity ( ItemStack stack , EntityPlayer player , Entity entity ) { } @ Override @ SideOnly ( Side . CLIENT ) public ItemMeshDefinition getMeshDefinition ( ) { } @ Nullable @ Override public ResourceLocation getCustomLocation ( ) { } @ Override public List < String > getVariants ( ) { } @ Override public List < ItemStack > getRandomDemonWillDrop ( EntityLivingBase killedEntity , EntityLivingBase attackingEntity , ItemStack stack , int looting ) { } @ Override public Multimap < String , AttributeModifier > getAttributeModifiers ( EntityEquipmentSlot slot , ItemStack stack ) { } public double getDamageOfActivatedSword ( ItemStack stack ) { } public void setDamageOfActivatedSword ( ItemStack stack , double damage ) { } public double getDrainOfActivatedSword ( ItemStack stack ) { } public void setDrainOfActivatedSword ( ItemStack stack , double drain ) { } public double getStaticDropOfActivatedSword ( ItemStack stack ) { } public void setStaticDropOfActivatedSword ( ItemStack stack , double drop ) { } public double getDropOfActivatedSword ( ItemStack stack ) { } public void setDropOfActivatedSword ( ItemStack stack , double drop ) { } public double getHealthBonusOfSword ( ItemStack stack ) { } public void setHealthBonusOfSword ( ItemStack stack , double hp ) { } public double getAttackSpeedOfSword ( ItemStack stack ) { }

Fix:
setAttackSpeedOfSword ( stack , ( level >= 0 ? getAttackSpeed ( type , level ) : - 2.4 ) ) ;