Implement blast modifier support for all applicable constructs, plus misc construct-related cleanup and fixes
This commit is contained in:
@@ -15,14 +15,11 @@ import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EntityHealAura extends EntityMagicConstruct {
|
||||
|
||||
// TODO: Implement blast modifiers
|
||||
public class EntityHealAura extends EntityScaledConstruct {
|
||||
|
||||
public EntityHealAura(World world){
|
||||
super(world);
|
||||
this.height = 1.0f;
|
||||
this.width = 5.0f;
|
||||
setSize(Spells.healing_aura.getProperty(Spell.EFFECT_RADIUS).floatValue() * 2, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,7 +33,7 @@ public class EntityHealAura extends EntityMagicConstruct {
|
||||
|
||||
if(!this.world.isRemote){
|
||||
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(2.5, posX, posY, posZ, world);
|
||||
List<EntityLivingBase> targets = EntityUtils.getLivingWithinRadius(width/2, posX, posY, posZ, world);
|
||||
|
||||
for(EntityLivingBase target : targets){
|
||||
|
||||
@@ -69,8 +66,8 @@ public class EntityHealAura extends EntityMagicConstruct {
|
||||
}else{
|
||||
for(int i=1; i<3; i++){
|
||||
float brightness = 0.5f + (rand.nextFloat() * 0.5f);
|
||||
double radius = rand.nextDouble() * 2.0;
|
||||
float angle = rand.nextFloat() * (float)Math.PI * 2;;
|
||||
double radius = rand.nextDouble() * (width/2);
|
||||
float angle = rand.nextFloat() * (float)Math.PI * 2;
|
||||
ParticleBuilder.create(Type.SPARKLE)
|
||||
.pos(this.posX + radius * MathHelper.cos(angle), this.posY, this.posZ + radius * MathHelper.sin(angle))
|
||||
.vel(0, 0.05, 0)
|
||||
|
||||
Reference in New Issue
Block a user