2015-12-16 20:40:52 +01:00
|
|
|
/*
|
2016-08-02 13:08:22 +02:00
|
|
|
* This file ("ParticleColored.java") is part of the Actually Additions mod for Minecraft.
|
2015-12-16 20:40:52 +01:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-12-16 20:40:52 +01:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-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
|
|
|
|
2016-05-19 20:05:12 +02:00
|
|
|
import net.minecraft.client.particle.ParticleRedstone;
|
2015-12-16 20:40:52 +01:00
|
|
|
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)
|
2016-05-19 20:05:12 +02:00
|
|
|
public class ParticleColored extends ParticleRedstone{
|
2015-12-16 20:40:52 +01:00
|
|
|
|
2016-05-19 20:05:12 +02:00
|
|
|
public ParticleColored(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)
|
2016-08-03 04:01:47 +02:00
|
|
|
this.particleRed = ((float)(Math.random()*0.2)+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
|
|
|
}
|
|
|
|
}
|