Fixed bad NPE when using the WoS.

This commit is contained in:
WayofTime 2016-07-08 09:19:39 -04:00
parent 617b70bcf4
commit 46a35ac1fb
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
------------------------------------------------------
Version 2.0.2-50
------------------------------------------------------
- Fixed bad NPE when using the WoS. (Well, I guess all NPEs are technically bad, but I guess it depends on your perspective. That said, I don't think a changelog is the best place for a theoretical discussion about the rights and wrongs of errors, so I will stop now.)
------------------------------------------------------
Version 2.0.2-49
------------------------------------------------------

View file

@ -91,7 +91,8 @@ public class RitualWellOfSuffering extends Ritual
if (ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName()))
continue;
if (BloodMagicAPI.getEntitySacrificeValues().get(entity.getClass().getSimpleName()) <= 0)
String simpleClassName = entity.getClass().getSimpleName();
if (BloodMagicAPI.getEntitySacrificeValues().containsKey(simpleClassName) && BloodMagicAPI.getEntitySacrificeValues().get(simpleClassName) <= 0)
continue;
if (entity.isEntityAlive() && !(entity instanceof EntityPlayer))