Audit-9 : strip Vec2i + exceptions + HitEntityList + MovementAnimation, document datapack-surface keeps

Deletes (5 files, 132 lines) :
- rig/anim/types/MovementAnimation.java (zero callers outside self-decl)
- rig/exception/DatapackException.java (dead)
- rig/exception/ShaderParsingException.java (dead)
- rig/math/Vec2i.java (dead)
- rig/util/HitEntityList.java (only consumer was HIT_PRIORITY, retiré)

Modifs :
- rig/anim/property/AnimationProperty.java : retire la constante
  AttackPhaseProperty<Priority> HIT_PRIORITY et l'import HitEntityList.Priority.

Docs (3 Javadocs retenues pour surface datapack / Phase 3) :
- CapabilityItem : précise l'usage Phase 3 (data-driven item anims,
  ON_ITEM_CHANGE_EVENT + HumanoidMobPatch.modifyLivingMotionByCurrentItem).
- AnimationProperty.ON_ITEM_CHANGE_EVENT : documenté comme hook datapack
  pour réagir au changement d'item porté.
- MoveCoordFunctions : doc class-level clarifie que les 8 constantes
  MoveCoord* sont consommées par réflection (StaticFieldArgument) côté
  datapack EF tiers — ne pas purger individuellement.

Compile GREEN, 20/20 rig tests GREEN.
This commit is contained in:
notevil
2026-04-23 06:02:36 +02:00
parent 687b810a0e
commit d3a3b400aa
8 changed files with 11 additions and 137 deletions

View File

@@ -37,7 +37,6 @@ import com.tiedup.remake.rig.anim.types.LinkAnimation;
import com.tiedup.remake.rig.anim.types.StaticAnimation;
import com.tiedup.remake.rig.physics.ik.InverseKinematicsSimulator.BakedInverseKinematicsDefinition;
import com.tiedup.remake.rig.physics.ik.InverseKinematicsSimulator.InverseKinematicsDefinition;
import com.tiedup.remake.rig.util.HitEntityList.Priority;
import com.tiedup.remake.rig.util.TimePairList;
import com.tiedup.remake.rig.math.ValueModifier;
import com.tiedup.remake.rig.TiedUpRigConstants;
@@ -110,6 +109,8 @@ public abstract class AnimationProperty<T> {
/**
* An event triggered when entity changes an item in hand.
* Retenu comme hook datapack : un event écrit en JSON par un datapack tiers peut s'abonner
* au changement d'item porté pour déclencher une réaction (voir Phase 3 data-driven anims).
*/
public static final StaticAnimationProperty<SimpleEvent<AnimationEvent.E2<CapabilityItem, CapabilityItem>>> ON_ITEM_CHANGE_EVENT = new StaticAnimationProperty<SimpleEvent<AnimationEvent.E2<CapabilityItem, CapabilityItem>>> ();
@@ -332,7 +333,6 @@ public abstract class AnimationProperty<T> {
// RIG : EXTRA_DAMAGE, STUN_TYPE, PARTICLE strippés (combat).
public static final AttackPhaseProperty<SoundEvent> SWING_SOUND = new AttackPhaseProperty<SoundEvent> ();
public static final AttackPhaseProperty<SoundEvent> HIT_SOUND = new AttackPhaseProperty<SoundEvent> ();
public static final AttackPhaseProperty<Priority> HIT_PRIORITY = new AttackPhaseProperty<Priority> ();
public static final AttackPhaseProperty<Set<TagKey<DamageType>>> SOURCE_TAG = new AttackPhaseProperty<Set<TagKey<DamageType>>> ();
public static final AttackPhaseProperty<Function<LivingEntityPatch<?>, Vec3>> SOURCE_LOCATION_PROVIDER = new AttackPhaseProperty<Function<LivingEntityPatch<?>, Vec3>> ();
}

View File

@@ -41,6 +41,11 @@ import com.tiedup.remake.rig.math.Vec4f;
import com.tiedup.remake.rig.patch.LivingEntityPatch;
import com.tiedup.remake.rig.patch.MobPatch;
/**
* Registry complet des constantes {@code MoveCoord*} consommées par les datapacks EF tiers
* via réflection ({@code StaticFieldArgument}). Ne pas purger individuellement sans couper
* le support datapack — l'absence d'un nom au runtime crash le chargement JSON.
*/
public class MoveCoordFunctions {
/**
* Defines a function that how to interpret given coordinate and return the movement vector from entity's current position

View File

@@ -1,50 +0,0 @@
/*
* Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
* by the Epic Fight Team, licensed under GPLv3.
* Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
*/
package com.tiedup.remake.rig.anim.types;
import com.tiedup.remake.rig.anim.AnimationManager.AnimationAccessor;
import com.tiedup.remake.rig.asset.AssetAccessor;
import com.tiedup.remake.rig.armature.Armature;
import com.tiedup.remake.rig.TiedUpRigConstants;
import com.tiedup.remake.rig.patch.LivingEntityPatch;
public class MovementAnimation extends StaticAnimation {
public MovementAnimation(boolean isRepeat, AnimationAccessor<? extends MovementAnimation> accessor, AssetAccessor<? extends Armature> armature) {
super(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature);
}
public MovementAnimation(float transitionTime, boolean isRepeat, AnimationAccessor<? extends MovementAnimation> accessor, AssetAccessor<? extends Armature> armature) {
super(transitionTime, isRepeat, accessor, armature);
}
/**
* For datapack animations
*/
public MovementAnimation(float transitionTime, boolean isRepeat, String path, AssetAccessor<? extends Armature> armature) {
super(transitionTime, isRepeat, path, armature);
}
@Override
public float getPlaySpeed(LivingEntityPatch<?> entitypatch, DynamicAnimation animation) {
if (animation.isLinkAnimation()) {
return 1.0F;
}
float movementSpeed = 1.0F;
if (Math.abs(entitypatch.getOriginal().walkAnimation.speed() - entitypatch.getOriginal().walkAnimation.speed(1)) < 0.007F) {
movementSpeed *= (entitypatch.getOriginal().walkAnimation.speed() * 1.16F);
}
return movementSpeed;
}
@Override
public boolean canBePlayedReverse() {
return true;
}
}

View File

@@ -1,15 +0,0 @@
/*
* Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
* by the Epic Fight Team, licensed under GPLv3.
* Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
*/
package com.tiedup.remake.rig.exception;
public class DatapackException extends RuntimeException {
private static final long serialVersionUID = 1L;
public DatapackException(String message) {
super(message);
}
}

View File

@@ -1,26 +0,0 @@
/*
* Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
* by the Epic Fight Team, licensed under GPLv3.
* Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
*/
package com.tiedup.remake.rig.exception;
public class ShaderParsingException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public ShaderParsingException(String message) {
super(message);
}
public ShaderParsingException(String message, Throwable cause) {
super(message, cause);
}
public ShaderParsingException(Throwable cause) {
super(cause);
}
}

View File

@@ -1,22 +0,0 @@
/*
* Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
* by the Epic Fight Team, licensed under GPLv3.
* Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
*/
package com.tiedup.remake.rig.math;
public class Vec2i {
public int x;
public int y;
public Vec2i(int x, int y) {
this.x = x;
this.y = y;
}
@Override
public String toString() {
return String.format("[%d, %d]", this.x, this.y);
}
}

View File

@@ -7,9 +7,10 @@
package com.tiedup.remake.rig.patch.item;
/**
* Stub RIG Phase 0 — capability item (côté combat EF). Ne sert ici que de type
* pour ON_ITEM_CHANGE_EVENT ; logique métier à re-implémenter Phase 3 si
* besoin (probablement via ItemStack + AnimationSet directement).
* Stub retenu pour le support data-driven item animations (Phase 3). Consommé par
* {@code ON_ITEM_CHANGE_EVENT} + {@code HumanoidMobPatch.modifyLivingMotionByCurrentItem}
* pour déclencher l'attache d'anims quand un item bondage entre en main.
* Voir {@code docs/plans/rig/BONDAGE_ANIMATION_DESIGN.md}.
*/
public class CapabilityItem {
}

View File

@@ -1,19 +0,0 @@
/*
* Derived from Epic Fight (https://github.com/Epic-Fight/epicfight)
* by the Epic Fight Team, licensed under GPLv3.
* Modifications © 2026 TiedUp! Remake Contributors, distributed under GPLv3.
*/
package com.tiedup.remake.rig.util;
/**
* Stub RIG Phase 0 — utilisé uniquement pour exposer {@link Priority} au
* type {@code AttackPhaseProperty<Priority> HIT_PRIORITY}. Logique combat
* (ordonner les entités touchées par une attack animation) non portée.
*/
public class HitEntityList {
public enum Priority {
DISTANCE, TARGET;
}
}