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:
@@ -8,6 +8,7 @@ import electroblob.wizardry.constants.SpellType;
|
||||
import electroblob.wizardry.constants.Tier;
|
||||
import electroblob.wizardry.entity.living.EntityWizard;
|
||||
import electroblob.wizardry.event.SpellCastEvent;
|
||||
import electroblob.wizardry.registry.WizardryAdvancementTriggers;
|
||||
import electroblob.wizardry.registry.WizardryItems;
|
||||
import electroblob.wizardry.registry.WizardryPotions;
|
||||
import electroblob.wizardry.registry.WizardrySounds;
|
||||
@@ -44,7 +45,7 @@ public class ArcaneJammer extends Spell {
|
||||
if(rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.ENTITY && WizardryUtilities.isLiving(rayTrace.entityHit)){
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)rayTrace.entityHit;
|
||||
if(entity instanceof EntityWizard) { AdvancementHelper.grantAdvancement(caster, EnumAdvancement.jam_wizard); }
|
||||
if(entity instanceof EntityWizard) WizardryAdvancementTriggers.jam_wizard.triggerFor(caster);
|
||||
|
||||
if(!world.isRemote){
|
||||
entity.addPotionEffect(new PotionEffect(WizardryPotions.arcane_jammer,
|
||||
|
||||
Reference in New Issue
Block a user