Spell hierarchisation and refactoring, plus miscellaneous renaming and minor refactoring

- Adds new generic spell superclasses which aim to group spells such that duplicate code is eliminated, and functions standardised, as much as possible.
- Removes numerous spell classes which are no longer required as a result of this change, and replaces them with instances of the relevant generic spell classes.
- Changes the remaining spell classes to fit with the new system, mostly by having them extend the generic spell classes.
- Completes the transfer of particle spawning to the ParticleBuilder system.
This commit is contained in:
Electroblob
2018-06-20 22:25:54 +01:00
parent b6400c72a7
commit 29261082f1
222 changed files with 4412 additions and 9016 deletions
@@ -25,12 +25,9 @@ public class EntityIceWraith extends EntityBlazeMinion {
/** The version from EntityLivingBase is only used in onLivingUpdate, so it can safely be copied. */
private int jumpTicks;
/** Creates a new ice wraith in the given world. */
public EntityIceWraith(World world){
super(world);
}
public EntityIceWraith(World world, double x, double y, double z, EntityLivingBase caster, int lifetime){
super(world, x, y, z, caster, lifetime);
this.isImmuneToFire = false;
}
@@ -204,32 +201,24 @@ public class EntityIceWraith extends EntityBlazeMinion {
this.setMutexBits(3);
}
/**
* Returns whether the EntityAIBase should begin execution.
*/
@Override
public boolean shouldExecute(){
EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();
return entitylivingbase != null && entitylivingbase.isEntityAlive();
}
/**
* Execute a one shot task or start executing a continuous task
*/
@Override
public void startExecuting(){
this.attackStep = 0;
}
/**
* Resets the task
*/
@Override
public void resetTask(){
// This might be called setOnFire, but what it really controls is whether the wraith is in attack mode.
this.blaze.setOnFire(false);
}
/**
* Updates the task
*/
@Override
public void updateTask(){
--this.attackTime;
EntityLivingBase entitylivingbase = this.blaze.getAttackTarget();