From 6630e50efdd1aeeeb547ac506a2c7591923ba51a Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sun, 3 Apr 2016 21:46:23 -0400 Subject: [PATCH] Fixed the Sentient Sword so that it would use the default will type if it didn't have enough will. --- changelog.txt | 1 + .../java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 00acf41a..92f2b590 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Version 2.0.0-31 - Strong Legs increases jump height. Pro tip: hold shift to bypass this jump boost. - Soft Fall decreases all fall damage, up to 100% at level 5. - Added increase in speed for Routing nodes inside of a chunk with Demon Aura +- Fixed OutOfBoundsException in the Sentient Sword when you didn't have enough Will. ------------------------------------------------------ Version 2.0.0-30 diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java index 33badf66..5bcd593a 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientSword.java @@ -80,7 +80,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM { EnumDemonWillType type = PlayerDemonWillHandler.getLargestWillType(player); double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(type, player); - this.setCurrentType(stack, type); + this.setCurrentType(stack, soulsRemaining > 0 ? type : EnumDemonWillType.DEFAULT); int level = getLevel(stack, soulsRemaining); double drain = level >= 0 ? soulDrainPerSwing[level] : 0;