refactor: drop unused VFX scaffolding, single-line English doc, reduce debug logs

- Remove unused chain/ParticleTrail and chain/VolumeCurve (dead since the EntityEffect
  pivot replaced the per-particle emit path) plus their test suites.
- Drop Vec3.lerp (only consumer was ParticleTrail).
- Strip step-by-step "[N/9]" debug logs from the orchestrator and per-entity logs
  from HytaleEntitySource / HytalePlayerRayCaster / ChainDamageApplier; keep one
  summary log per click and warnings on failure.
- Extract resolveChain and tryEmitVfx helpers in ChainLightningSceptreInteraction
  so firstRun reads top-down (cooldown gate -> resolve -> damage -> vfx -> deduct).
- Translate every Java doc/comment to single-line English.

Tests: 30/30 green (29 baseline kept + 1 chain damage adapter test).
Build: ./gradlew shadowJar clean.
This commit is contained in:
2026-04-27 19:17:47 +02:00
parent ee9ac1ab53
commit 03754a0646
22 changed files with 118 additions and 683 deletions
@@ -13,16 +13,7 @@ import com.mythlane.chainlightning.chain.Vec3;
import javax.annotation.Nonnull;
/**
* Adapter immuable Ref<EntityStore> -> ChainEntity (Phase 2 SAM).
*
* <p>Snapshot eager : la position et l'etat alive sont lus AU MOMENT de la creation.
* La resolution BFS de ChainResolver lit ces valeurs figees -- robuste face a un mob
* qui bouge ou meurt pendant la resolution.
*
* <p>Si TransformComponent est null (entite hors monde), l'adapter retourne un snapshot
* "mort" (alive=false, position=Vec3.ZERO) qui sera filtre par ChainResolver.
*/
/** Immutable Ref&lt;EntityStore&gt; -&gt; ChainEntity adapter; eager snapshot keeps BFS robust to mid-tick entity changes. */
public final class HytaleEntityAdapter implements ChainEntity {
private final Ref<EntityStore> ref;
@@ -37,23 +28,13 @@ public final class HytaleEntityAdapter implements ChainEntity {
this.alive = alive;
}
/**
* Constructeur package-private pour les tests : permet de construire un adapter
* sans passer par snapshot() (qui initialise TransformComponent.getComponentType()
* et donc le runtime Hytale complet).
*/
/** Test-only factory that bypasses Hytale TransformComponent initialization. */
static HytaleEntityAdapter forTest(@Nonnull Ref<EntityStore> ref, @Nonnull String id,
@Nonnull Vec3 position, boolean alive) {
return new HytaleEntityAdapter(ref, id, position, alive);
}
/**
* Projette un Ref&lt;EntityStore&gt; vers un ChainEntity en lisant TransformComponent + EntityStatMap.
*
* @param ref reference entite Hytale
* @param accessor ComponentAccessor (CommandBuffer implemente ComponentAccessor)
* @return adapter snapshot. Jamais null.
*/
/** Reads TransformComponent + EntityStatMap once and freezes the result for the chain resolver. */
@Nonnull
public static HytaleEntityAdapter snapshot(@Nonnull Ref<EntityStore> ref,
@Nonnull ComponentAccessor<EntityStore> accessor) {
@@ -73,24 +54,13 @@ public final class HytaleEntityAdapter implements ChainEntity {
return new HytaleEntityAdapter(ref, id, vec, alive);
}
/** Reference Hytale sous-jacente, exposee pour DamageSystems.executeDamage. */
/** Underlying Hytale ref, exposed so DamageSystems and EffectControllerComponent can address the entity. */
@Nonnull
public Ref<EntityStore> ref() {
return ref;
}
@Override
public String id() {
return id;
}
@Override
public Vec3 position() {
return position;
}
@Override
public boolean isAlive() {
return alive;
}
@Override public String id() { return id; }
@Override public Vec3 position() { return position; }
@Override public boolean isAlive() { return alive; }
}