Particle tweaks and fixes
This commit is contained in:
@@ -67,7 +67,7 @@ public class EntityForcefield extends EntityMagicConstruct {
|
||||
.pos(this.posX + radius * Math.cos(yaw) * Math.cos(pitch), this.posY + 3 + radius * Math.sin(pitch),
|
||||
this.posZ + radius * Math.sin(yaw) * Math.cos(pitch))
|
||||
.lifetime(48 + this.rand.nextInt(12))
|
||||
.colour(brightness, brightness, 1.0f);
|
||||
.colour(brightness, brightness, 1.0f).spawn(world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class EntityDart extends EntityMagicArrow {
|
||||
@Override
|
||||
public void tickInAir(){
|
||||
if(this.world.isRemote){
|
||||
ParticleBuilder.create(Type.LEAF).pos(this.posX, this.posY, this.posZ).lifetime(10 + rand.nextInt(5));
|
||||
ParticleBuilder.create(Type.LEAF, this).lifetime(10 + rand.nextInt(5)).spawn(world);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class EntityIceLance extends EntityMagicArrow {
|
||||
if(this.world.isRemote){
|
||||
for(int j = 0; j < 10; j++){
|
||||
ParticleBuilder.create(Type.ICE, this.rand, this.posX, this.posY, this.posZ, 0.5, true)
|
||||
.lifetime(20 + rand.nextInt(10)).spawn(world);
|
||||
.lifetime(20 + rand.nextInt(10)).gravity(true).spawn(world);
|
||||
}
|
||||
}
|
||||
// Parameters for sound: sound event name, volume, pitch.
|
||||
|
||||
@@ -85,7 +85,7 @@ public class LightningRay extends SpellRay {
|
||||
}else{
|
||||
// Particle effect
|
||||
for(int i=0; i<5; i++){
|
||||
ParticleBuilder.create(Type.SPARK, target);
|
||||
ParticleBuilder.create(Type.SPARK, target).spawn(world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class LightningWeb extends SpellRay {
|
||||
}else{
|
||||
// Particle effect
|
||||
for(int i=0; i<5; i++){
|
||||
ParticleBuilder.create(Type.SPARK, target);
|
||||
ParticleBuilder.create(Type.SPARK, target).spawn(world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,11 @@ public final class ParticleBuilder {
|
||||
particle.multipleParticleScaleBy(scale);
|
||||
if(!Double.isNaN(vx) && !Double.isNaN(vy) && !Double.isNaN(vz)) particle.setVelocity(vx, vy, vz);
|
||||
if(r >= 0 && g >= 0 && b >= 0) particle.setRBGColorF(r, g, b);
|
||||
if(fr >= 0 && fg >= 0 && fb >= 0) particle.setFadeColour(fr, fg, fb);
|
||||
if(fr >= 0 && fg >= 0 && fb >= 0){
|
||||
particle.setFadeColour(fr, fg, fb);
|
||||
}else{
|
||||
particle.setFadeColour(r, g, b); // If fade colour was unspecified, it defaults to the main colour
|
||||
}
|
||||
if(lifetime >= 0) particle.setLifetime(lifetime);
|
||||
particle.setGravity(gravity);
|
||||
particle.setShaded(shaded);
|
||||
|
||||
Reference in New Issue
Block a user