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
@@ -6,6 +6,7 @@ import electroblob.wizardry.advancement.AdvancementHelper.EnumAdvancement;
import electroblob.wizardry.constants.Element;
import electroblob.wizardry.constants.SpellType;
import electroblob.wizardry.constants.Tier;
import electroblob.wizardry.registry.WizardryAdvancementTriggers;
import electroblob.wizardry.registry.WizardryBlocks;
import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.registry.WizardrySounds;
@@ -53,7 +54,7 @@ public class IceStatue extends Spell {
// Stops the entity looking red while frozen and the resulting z-fighting
target.hurtTime = 0;
if(target instanceof EntityBlaze) { AdvancementHelper.grantAdvancement(caster, EnumAdvancement.freeze_blaze); }
if(target instanceof EntityBlaze) WizardryAdvancementTriggers.freeze_blaze.triggerFor(caster);
// Short mobs such as spiders and pigs
if((target.height < 1.2 || target.isChild()) && WizardryUtilities.canBlockBeReplaced(world, pos)){