Change whitelist/blacklist storage from strings to resourcelocations to bring it in line with the registry system

This commit is contained in:
Electroblob
2018-06-03 22:17:57 +01:00
parent 4e6780a3cf
commit 5ba92e5de5
5 changed files with 25 additions and 39 deletions
@@ -2,7 +2,6 @@ package electroblob.wizardry.spell;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.constants.Element;
@@ -146,8 +145,8 @@ public class MindControl extends Spell {
/** Returns true if the given entity can be mind controlled (i.e. is not a player, npc, evil wizard or boss). */
public static boolean canControl(EntityLivingBase target){
return target instanceof EntityLiving && target.isNonBoss() && !(target instanceof INpc)
&& !(target instanceof EntityEvilWizard) && !Arrays.asList(Wizardry.settings.summonedCreatureTargetsBlacklist)
.contains(EntityList.getKey(entity.getClass()).toString().toLowerCase(Locale.ROOT));
&& !(target instanceof EntityEvilWizard) && !Arrays.asList(Wizardry.settings.mindControlTargetsBlacklist)
.contains(EntityList.getKey(target.getClass()));
}
/**