From a9dae1b0d4281f52304b71575e1f0218eec9ebfb Mon Sep 17 00:00:00 2001 From: WayofTime Date: Sun, 31 Jan 2016 13:56:55 -0500 Subject: [PATCH] Fixed the demon will so that you can actually pick it up when you have no gem. Fix #587 --- changelog.txt | 1 + .../WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index fb4270ea..73f7daf4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Version 2.0.0-14 - FMLInterModComs.sendMessage("BloodMagic", "sacrificeValue", "ClassName;Value") - FMLInterModComs.sendMessage("BloodMagic", "greenGroveBlacklist", "domain:name") - Fixed the bound sword so that it now drops weak blood shards. +- Fixed the demon will so that you can actually pick it up! ------------------------------------------------------ Version 2.0.0-13 diff --git a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java index 53c789ca..d59cafa0 100644 --- a/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java +++ b/src/main/java/WayofTime/bloodmagic/api/soul/PlayerDemonWillHandler.java @@ -46,6 +46,7 @@ public class PlayerDemonWillHandler { ItemStack[] inventory = player.inventory.mainInventory; + boolean hasGem = false; for (int i = 0; i < inventory.length; i++) { ItemStack stack = inventory[i]; @@ -53,6 +54,7 @@ public class PlayerDemonWillHandler { if (stack.getItem() instanceof IDemonWillGem) { + hasGem = true; if (((IDemonWillGem) stack.getItem()).getWill(stack) < ((IDemonWillGem) stack.getItem()).getMaxWill(stack)) { return false; @@ -61,7 +63,7 @@ public class PlayerDemonWillHandler } } - return true; + return hasGem; } /**