2015-12-16 20:40:52 +01:00
|
|
|
/*
|
|
|
|
* This file ("EntityColoredParticleFX.java") is part of the Actually Additions Mod for Minecraft.
|
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-01-03 16:05:51 +01:00
|
|
|
* http://ellpeck.de/actaddlicense/
|
2015-12-16 20:40:52 +01:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-01-03 16:05:51 +01:00
|
|
|
* © 2016 Ellpeck
|
2015-12-16 20:40:52 +01:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.misc;
|
2015-12-16 20:40:52 +01:00
|
|
|
|
|
|
|
import net.minecraft.client.particle.EntityReddustFX;
|
|
|
|
import net.minecraft.world.World;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
2015-12-16 20:40:52 +01:00
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public class EntityColoredParticleFX extends EntityReddustFX{
|
|
|
|
|
2015-12-16 21:10:28 +01:00
|
|
|
public EntityColoredParticleFX(World world, double x, double y, double z, float size, float r, float g, float b, float ageMulti){
|
2015-12-16 20:40:52 +01:00
|
|
|
super(world, x, y, z, size, r, g, b);
|
|
|
|
//To work around Reddust particles resetting the color to red if it's 0 (which is really stupid to be honest)
|
2015-12-16 20:49:35 +01:00
|
|
|
this.particleRed = ((float)(Math.random()*0.20000000298023224D)+0.8F)*r*((float)Math.random()*0.4F+0.6F);
|
2015-12-16 21:10:28 +01:00
|
|
|
this.particleMaxAge = (int)((8.0D/(Math.random()*0.8D+0.2D))*ageMulti);
|
2015-12-16 20:40:52 +01:00
|
|
|
}
|
|
|
|
}
|