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
@@ -3,7 +3,6 @@ package electroblob.wizardry.entity.living;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import com.google.common.base.Predicate;
@@ -118,10 +117,10 @@ public class EntityEvilWizard extends EntityMob implements ISpellCaster, IEntity
|| (entity instanceof ISummonedCreature || entity instanceof EntityWizard
// ... or in the whitelist ...
|| Arrays.asList(Wizardry.settings.summonedCreatureTargetsWhitelist)
.contains(EntityList.getKey(entity.getClass()).toString().toLowerCase(Locale.ROOT)))
.contains(EntityList.getKey(entity.getClass())))
// ... and isn't in the blacklist ...
&& !Arrays.asList(Wizardry.settings.summonedCreatureTargetsBlacklist)
.contains(EntityList.getKey(entity.getClass()).toString().toLowerCase(Locale.ROOT))){
.contains(EntityList.getKey(entity.getClass()))){
// ... it can be attacked.
return true;
}