Some more particle tweaks

This commit is contained in:
Ellpeck 2015-12-16 21:10:28 +01:00
parent a15627644d
commit b5f6450d0a
3 changed files with 4 additions and 4 deletions

View file

@ -18,10 +18,10 @@ import net.minecraft.world.World;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class EntityColoredParticleFX extends EntityReddustFX{ public class EntityColoredParticleFX extends EntityReddustFX{
public EntityColoredParticleFX(World world, double x, double y, double z, float size, float r, float g, float b, int ageMulti){ public EntityColoredParticleFX(World world, double x, double y, double z, float size, float r, float g, float b, float ageMulti){
super(world, x, y, z, size, r, g, b); 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) //To work around Reddust particles resetting the color to red if it's 0 (which is really stupid to be honest)
this.particleRed = ((float)(Math.random()*0.20000000298023224D)+0.8F)*r*((float)Math.random()*0.4F+0.6F); this.particleRed = ((float)(Math.random()*0.20000000298023224D)+0.8F)*r*((float)Math.random()*0.4F+0.6F);
this.particleMaxAge = (int)(8.0D/(Math.random()*0.8D+0.2D))*ageMulti; this.particleMaxAge = (int)((8.0D/(Math.random()*0.8D+0.2D))*ageMulti);
} }
} }

View file

@ -93,7 +93,7 @@ public class PacketParticle implements IMessage{
} }
} }
public static void renderParticlesFromAToB(int startX, int startY, int startZ, int endX, int endY, int endZ, int particleAmount, float particleSize, float[] color, int ageMultiplier){ public static void renderParticlesFromAToB(int startX, int startY, int startZ, int endX, int endY, int endZ, int particleAmount, float particleSize, float[] color, float ageMultiplier){
World world = Minecraft.getMinecraft().theWorld; World world = Minecraft.getMinecraft().theWorld;
if(Minecraft.getMinecraft().thePlayer.getDistance(startX, startY, startZ) <= 64 || Minecraft.getMinecraft().thePlayer.getDistance(endX, endY, endZ) <= 64){ if(Minecraft.getMinecraft().thePlayer.getDistance(startX, startY, startZ) <= 64 || Minecraft.getMinecraft().thePlayer.getDistance(endX, endY, endZ) <= 64){

View file

@ -49,7 +49,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
if(network != null){ if(network != null){
for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){ for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){
if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){ if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){
PacketParticle.renderParticlesFromAToB(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ(), aPair.secondRelay.getX(), aPair.secondRelay.getY(), aPair.secondRelay.getZ(), ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 6, 0.6F, COLOR, 1); PacketParticle.renderParticlesFromAToB(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ(), aPair.secondRelay.getX(), aPair.secondRelay.getY(), aPair.secondRelay.getZ(), ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 6, 0.6F, COLOR, 0.6F);
} }
} }
} }