nullcheck obtained entity entries (#1206, 1207)

No idea what's going on here but aight
This commit is contained in:
Nicholas Ignoffo 2018-02-06 17:04:04 -08:00
parent 27e41e2e77
commit 8be8cc30b9
4 changed files with 5 additions and 3 deletions

View file

@ -104,7 +104,7 @@ public class RitualForsakenSoul extends Ritual {
for (EntityLivingBase entity : entities) {
EntityEntry entityEntry = EntityRegistry.getEntry(entity.getClass());
if (BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(entityEntry.getRegistryName()))
if (entityEntry == null || BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(entityEntry.getRegistryName()))
continue;
if (entity.isEntityAlive() && !(entity instanceof EntityPlayer)) {

View file

@ -79,7 +79,7 @@ public class RitualWellOfSuffering extends Ritual {
for (EntityLivingBase entity : entities) {
EntityEntry entityEntry = EntityRegistry.getEntry(entity.getClass());
if (BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(entityEntry.getRegistryName()))
if (entityEntry == null || BloodMagicAPI.INSTANCE.getBlacklist().getSacrifice().contains(entityEntry.getRegistryName()))
continue;
int lifeEssenceRatio = BloodMagicAPI.INSTANCE.getSacrificialValues().getOrDefault(entityEntry.getRegistryName(), SACRIFICE_AMOUNT);