add Immune to magic damage config option (#887)
* added more config * Update src/main/java/electroblob/wizardry/Settings.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1371,6 +1371,18 @@ public final class Settings {
|
||||
}
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToMagic", new String[]{},
|
||||
"List of names of entities that are immune to magic, in addition to the defaults. Add mod creatures to this list if you want them to be immune to magic damage and they aren't already. SoundLoopSpellEntity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_magic");
|
||||
property.setRequiresMcRestart(true);
|
||||
// Wizardry.proxy.setToEntityNameEntry(property);
|
||||
// Converts all strings in the list to lower case, to ignore case sensitivity, and trims them.
|
||||
for(int i = 0; i < property.getStringList().length; i++){
|
||||
property.getStringList()[i] = property.getStringList()[i].toLowerCase(Locale.ROOT).trim();
|
||||
MagicDamage.addEntityImmunity(EntityList.getClass(new ResourceLocation(property.getStringList()[i])),
|
||||
DamageType.MAGIC);
|
||||
}
|
||||
propOrder.add(property.getName());
|
||||
property = config.get(RESISTANCES_CATEGORY, "mobsImmuneToWither", new String[]{},
|
||||
"List of names of entities that are immune to wither effects, in addition to the defaults. Add mod creatures to this list if you want them to be immune to withering magic and they aren't already. SoundLoopSpellEntity names are not case sensitive. For mod entities, prefix with the mod ID (e.g. " + Wizardry.MODID + ":wizard).");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".mobs_immune_to_wither");
|
||||
|
||||
Reference in New Issue
Block a user