Improved console logs in case of particle explosion

This commit is contained in:
Unknown 2018-05-11 16:40:19 +02:00 committed by unknown
parent e1031cf759
commit 1c74aa8da5

View file

@ -119,8 +119,24 @@ public class Particle {
if (explosionStrength > 0.0F) {
final float amountFactor = Math.max(1.25F, amount / 1000.0F);
world.newExplosion(null, v3Position.x, v3Position.y, v3Position.z, explosionStrength * amountFactor, true, true);
WarpDrive.logger.info("Particle caused explosion at " + v3Position.x + " " + v3Position.y + " " + v3Position.z + " with strength " + explosionStrength * amountFactor);
WarpDrive.logger.info(String.format("Explosion in %s @ (%.1f %.1f %.1f) with strength %.3f due to %d mg of %s",
world.provider.getSaveFolder(),
v3Position.x, v3Position.y, v3Position.z,
explosionStrength * amountFactor,
amount,
this));
}
}
@Override
public String toString() {
return String.format("Particle %s (%s, RGB 0x%x %d, %d ticks, %.3f Sv, strength %.3f)",
registryName,
enumRarity,
color, colorIndex,
entityLifespan,
radiationLevel,
explosionStrength);
}
}