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:
@@ -16,26 +16,13 @@ import net.minecraft.world.World;
|
||||
|
||||
public class EntityLightningSigil extends EntityMagicConstruct {
|
||||
|
||||
public EntityLightningSigil(World par1World){
|
||||
super(par1World);
|
||||
public EntityLightningSigil(World world){
|
||||
super(world);
|
||||
this.height = 0.2f;
|
||||
this.width = 2.0f;
|
||||
}
|
||||
|
||||
public EntityLightningSigil(World par1World, double x, double y, double z, EntityLivingBase caster,
|
||||
float damageMultiplier){
|
||||
super(par1World, x, y, z, caster, -1, damageMultiplier);
|
||||
this.height = 0.2f;
|
||||
this.width = 2.0f;
|
||||
}
|
||||
|
||||
// Overrides the original to stop the entity moving when it intersects stuff. The default arrow does this to allow
|
||||
// it to stick in blocks.
|
||||
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9){
|
||||
this.setPosition(par1, par3, par5);
|
||||
this.setRotation(par7, par8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
|
||||
super.onUpdate();
|
||||
@@ -56,10 +43,8 @@ public class EntityLightningSigil extends EntityMagicConstruct {
|
||||
double velZ = target.motionZ;
|
||||
|
||||
// Only works if target is actually damaged to account for hurtResistantTime
|
||||
if(target.attackEntityFrom(
|
||||
getCaster() != null ? MagicDamage.causeIndirectMagicDamage(this, getCaster(), DamageType.SHOCK)
|
||||
: DamageSource.MAGIC,
|
||||
6)){
|
||||
if(target.attackEntityFrom(getCaster() != null ? MagicDamage.causeIndirectMagicDamage(this, getCaster(),
|
||||
DamageType.SHOCK) : DamageSource.MAGIC, 6)){
|
||||
|
||||
// Removes knockback
|
||||
target.motionX = velX;
|
||||
@@ -125,13 +110,9 @@ public class EntityLightningSigil extends EntityMagicConstruct {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit(){
|
||||
protected void entityInit(){}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this entity should be rendered as on fire.
|
||||
*/
|
||||
@Override
|
||||
public boolean canRenderOnFire(){
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user