Replace Achievements with Advancements

- Advancements are now in JSON files, converted by the included migration script.
- WizardryAdvancementTrigger is a generic achievement trigger that can be reused throughout the code to trigger custom advancements not covered by the JSON conditions.
- Plus some other small and obvious fixes.
This commit is contained in:
Philipp Rustemeier
2018-03-14 19:12:13 +01:00
parent 62c2a9e9b8
commit 612bbdb64d
48 changed files with 706 additions and 723 deletions
@@ -7,6 +7,7 @@ import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.SpellType;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.entity.living.EntityMagicSlime;
import electroblob.wizardry.registry.WizardryAdvancementTriggers;
import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.registry.WizardrySounds;
import electroblob.wizardry.util.SpellModifiers;
@@ -49,7 +50,7 @@ public class Slime extends Spell {
this.getNameForTranslationFormatted()));
}else if(!(target instanceof EntityMagicSlime)){
if(target instanceof EntitySkeleton) { AdvancementHelper.grantAdvancement(caster, EnumAdvancement.slime_skeleton); }
if(target instanceof EntitySkeleton) WizardryAdvancementTriggers.slime_skeleton.triggerFor(caster);
if(!world.isRemote){
EntityMagicSlime slime = new EntityMagicSlime(world, caster, target,