The great particle refactoring part 1: Introducing ParticleBuilder!
Adds ParticleBuilder to replace the particle spawning methods in the proxies, and changes all particle spawning to use the builder except for in the spell classes, which are to be reorganised first.
This commit is contained in:
@@ -1,34 +1,25 @@
|
||||
package electroblob.wizardry.client.particle;
|
||||
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleDust extends Particle {
|
||||
public class ParticleDust extends ParticleWizardry {
|
||||
|
||||
private final boolean shaded;
|
||||
|
||||
public ParticleDust(World par1World, double x, double y, double z, double par8, double par10, double par12, float r,
|
||||
float g, float b, boolean shaded){
|
||||
super(par1World, x, y, z, par8, par10, par12);
|
||||
this.particleRed = r;
|
||||
this.particleGreen = g;
|
||||
this.particleBlue = b;
|
||||
public ParticleDust(World world, double x, double y, double z){
|
||||
super(world, x, y, z);
|
||||
|
||||
this.setParticleTextureIndex(0);
|
||||
this.setSize(0.01F, 0.01F);
|
||||
|
||||
// Defaults
|
||||
this.particleScale *= this.rand.nextFloat() + 0.2F;
|
||||
this.motionX = par8;
|
||||
this.motionY = par10;
|
||||
this.motionZ = par12;
|
||||
this.particleMaxAge = (int)(16.0D / (Math.random() * 0.8D + 0.2D));
|
||||
this.shaded = shaded;
|
||||
this.setRBGColorF(1, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
@@ -39,10 +30,4 @@ public class ParticleDust extends Particle {
|
||||
this.setExpired();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender(float par1){
|
||||
return shaded ? super.getBrightnessForRender(par1) : 15728880;
|
||||
}
|
||||
/* @Override public float getBrightness(float par1) { return shaded ? super.getBrightness(par1) : 1.0F; } */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user