mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 02:59:42 +00:00
CNPC+ Debug Command for Energy Projectiles + Compile Fixes
This commit is contained in:
1 parent
744ffc5ab7
commit
d8bc3d4177
16 files changed
+438
-32
No files matched your search
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyLightningData;
|
||||
import kamkeel.npcs.util.CNPCDebug;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@@ -57,6 +58,17 @@ public class EntityEnergyExplosion extends EntityEnergyAbility {
|
||||
float eased = 1.0f - (1.0f - progress) * (1.0f - progress);
|
||||
this.renderRadius = maxRadius * eased;
|
||||
|
||||
// Debug logging
|
||||
{
|
||||
boolean isClient = worldObj.isRemote;
|
||||
if (isClient ? CNPCDebug.isClientEnabled("energy") : CNPCDebug.isServerEnabled("energy")) {
|
||||
CNPCDebug.log("energy", isClient, String.format(
|
||||
"[Explosion id=%d tick=%d] pos=(%.2f,%.2f,%.2f) renderRadius=%.2f maxRadius=%.2f progress=%.2f",
|
||||
getEntityId(), ticksExisted, posX, posY, posZ,
|
||||
renderRadius, maxRadius, getLifeProgress(0f)));
|
||||
}
|
||||
}
|
||||
|
||||
if (ticksExisted >= durationTicks) {
|
||||
setDead();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user