Couple fixes to phantom particles

This commit is contained in:
Ellpeck 2015-12-16 20:49:35 +01:00
parent 6d0e88220b
commit 526b70dd1d
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ 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){
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)
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;
}
}

View file

@ -96,7 +96,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){
World world = Minecraft.getMinecraft().theWorld;
if(Minecraft.getMinecraft().thePlayer.getDistance(startX, startY, startZ) <= 64){
if(Minecraft.getMinecraft().thePlayer.getDistance(startX, startY, startZ) <= 64 || Minecraft.getMinecraft().thePlayer.getDistance(endX, endY, endZ) <= 64){
int difX = startX-endX;
int difY = startY-endY;
int difZ = startZ-endZ;

View file

@ -49,7 +49,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
if(network != null){
for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){
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 : 5, 0.75F, 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, 1);
}
}
}