From 1c74aa8da5d25bc1d8d913ccd28038ab24b64835 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 11 May 2018 16:40:19 +0200 Subject: [PATCH] Improved console logs in case of particle explosion --- src/main/java/cr0s/warpdrive/api/Particle.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/api/Particle.java b/src/main/java/cr0s/warpdrive/api/Particle.java index 6472ac49..f5f1763c 100644 --- a/src/main/java/cr0s/warpdrive/api/Particle.java +++ b/src/main/java/cr0s/warpdrive/api/Particle.java @@ -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); + } }