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
@@ -14,30 +14,14 @@ import net.minecraft.world.World;
public class EntityDarknessOrb extends EntityMagicProjectile {
public EntityDarknessOrb(World par1World){
super(par1World);
}
public EntityDarknessOrb(World par1World, EntityLivingBase par2EntityLivingBase){
super(par1World, par2EntityLivingBase);
}
public EntityDarknessOrb(World par1World, EntityLivingBase par2EntityLivingBase, float damageMultiplier){
super(par1World, par2EntityLivingBase, damageMultiplier);
}
public EntityDarknessOrb(World par1World, double par2, double par4, double par6){
super(par1World, par2, par4, par6);
public EntityDarknessOrb(World world){
super(world);
}
@Override
protected float getSpeed(){
return 0.5F;
}
@Override
protected void onImpact(RayTraceResult RayTraceResult){
Entity target = RayTraceResult.entityHit;
protected void onImpact(RayTraceResult rayTrace){
Entity target = rayTrace.entityHit;
if(target != null && !MagicDamage.isEntityImmune(DamageType.WITHER, target)){
float damage = 8 * damageMultiplier;
@@ -79,10 +63,8 @@ public class EntityDarknessOrb extends EntityMagicProjectile {
this.motionZ /= 0.99;
}
/**
* Gets the amount of gravity to apply to the thrown entity with each tick.
*/
protected float getGravityVelocity(){
return 0.0F;
@Override
public boolean hasNoGravity(){
return true;
}
}