CNPC+ Debug Command for Energy Projectiles + Compile Fixes

This commit is contained in:
Kam committed 2026-02-25 04:31:17 -05:00
1 parent 744ffc5ab7
commit d8bc3d4177
16 files changed
+438 -32

No files matched your search

@@ -3,6 +3,7 @@ package kamkeel.npcs.entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
import kamkeel.npcs.util.CNPCDebug;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -168,6 +169,19 @@ public class EntityAbilitySweeper extends EntityEnergyAbility {
if (!worldObj.isRemote) {
handleDamage(owner);
}
// Debug logging
{
boolean isClient = worldObj.isRemote;
if (isClient ? CNPCDebug.isClientEnabled("energy") : CNPCDebug.isServerEnabled("energy")) {
CNPCDebug.log("energy", isClient, String.format(
"[Sweeper id=%d tick=%d] pos=(%.2f,%.2f,%.2f) angle=%.1f prevAngle=%.1f " +
"speed=%.1f rotations=%d/%d length=%.2f width=%.2f",
getEntityId(), ticksExisted, posX, posY, posZ,
currentAngle, prevAngle, sweepSpeed,
completedRotations, numberOfRotations, beamLength, beamWidth));
}
}
}
/**