From d3a3b400aa4e8bc077873f498d46e9609037df24 Mon Sep 17 00:00:00 2001 From: notevil Date: Thu, 23 Apr 2026 06:02:36 +0200 Subject: [PATCH] Audit-9 : strip Vec2i + exceptions + HitEntityList + MovementAnimation, document datapack-surface keeps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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. --- .../rig/anim/property/AnimationProperty.java | 4 +- .../rig/anim/property/MoveCoordFunctions.java | 5 ++ .../rig/anim/types/MovementAnimation.java | 50 ------------------- .../rig/exception/DatapackException.java | 15 ------ .../rig/exception/ShaderParsingException.java | 26 ---------- .../com/tiedup/remake/rig/math/Vec2i.java | 22 -------- .../remake/rig/patch/item/CapabilityItem.java | 7 +-- .../tiedup/remake/rig/util/HitEntityList.java | 19 ------- 8 files changed, 11 insertions(+), 137 deletions(-) delete mode 100644 src/main/java/com/tiedup/remake/rig/anim/types/MovementAnimation.java delete mode 100644 src/main/java/com/tiedup/remake/rig/exception/DatapackException.java delete mode 100644 src/main/java/com/tiedup/remake/rig/exception/ShaderParsingException.java delete mode 100644 src/main/java/com/tiedup/remake/rig/math/Vec2i.java delete mode 100644 src/main/java/com/tiedup/remake/rig/util/HitEntityList.java diff --git a/src/main/java/com/tiedup/remake/rig/anim/property/AnimationProperty.java b/src/main/java/com/tiedup/remake/rig/anim/property/AnimationProperty.java index 8ce2a7b..a9fb4a8 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/property/AnimationProperty.java +++ b/src/main/java/com/tiedup/remake/rig/anim/property/AnimationProperty.java @@ -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 { /** * 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>> ON_ITEM_CHANGE_EVENT = new StaticAnimationProperty>> (); @@ -332,7 +333,6 @@ public abstract class AnimationProperty { // RIG : EXTRA_DAMAGE, STUN_TYPE, PARTICLE strippés (combat). public static final AttackPhaseProperty SWING_SOUND = new AttackPhaseProperty (); public static final AttackPhaseProperty HIT_SOUND = new AttackPhaseProperty (); - public static final AttackPhaseProperty HIT_PRIORITY = new AttackPhaseProperty (); public static final AttackPhaseProperty>> SOURCE_TAG = new AttackPhaseProperty>> (); public static final AttackPhaseProperty, Vec3>> SOURCE_LOCATION_PROVIDER = new AttackPhaseProperty, Vec3>> (); } diff --git a/src/main/java/com/tiedup/remake/rig/anim/property/MoveCoordFunctions.java b/src/main/java/com/tiedup/remake/rig/anim/property/MoveCoordFunctions.java index e24f6ee..21a8807 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/property/MoveCoordFunctions.java +++ b/src/main/java/com/tiedup/remake/rig/anim/property/MoveCoordFunctions.java @@ -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 diff --git a/src/main/java/com/tiedup/remake/rig/anim/types/MovementAnimation.java b/src/main/java/com/tiedup/remake/rig/anim/types/MovementAnimation.java deleted file mode 100644 index fab84e1..0000000 --- a/src/main/java/com/tiedup/remake/rig/anim/types/MovementAnimation.java +++ /dev/null @@ -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 accessor, AssetAccessor armature) { - super(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature); - } - - public MovementAnimation(float transitionTime, boolean isRepeat, AnimationAccessor accessor, AssetAccessor armature) { - super(transitionTime, isRepeat, accessor, armature); - } - - /** - * For datapack animations - */ - public MovementAnimation(float transitionTime, boolean isRepeat, String path, AssetAccessor 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; - } -} diff --git a/src/main/java/com/tiedup/remake/rig/exception/DatapackException.java b/src/main/java/com/tiedup/remake/rig/exception/DatapackException.java deleted file mode 100644 index d69a2c4..0000000 --- a/src/main/java/com/tiedup/remake/rig/exception/DatapackException.java +++ /dev/null @@ -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); - } -} diff --git a/src/main/java/com/tiedup/remake/rig/exception/ShaderParsingException.java b/src/main/java/com/tiedup/remake/rig/exception/ShaderParsingException.java deleted file mode 100644 index 4aaeb11..0000000 --- a/src/main/java/com/tiedup/remake/rig/exception/ShaderParsingException.java +++ /dev/null @@ -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); - } -} diff --git a/src/main/java/com/tiedup/remake/rig/math/Vec2i.java b/src/main/java/com/tiedup/remake/rig/math/Vec2i.java deleted file mode 100644 index 0c292d9..0000000 --- a/src/main/java/com/tiedup/remake/rig/math/Vec2i.java +++ /dev/null @@ -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); - } -} diff --git a/src/main/java/com/tiedup/remake/rig/patch/item/CapabilityItem.java b/src/main/java/com/tiedup/remake/rig/patch/item/CapabilityItem.java index b6afc71..27607b8 100644 --- a/src/main/java/com/tiedup/remake/rig/patch/item/CapabilityItem.java +++ b/src/main/java/com/tiedup/remake/rig/patch/item/CapabilityItem.java @@ -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 { } diff --git a/src/main/java/com/tiedup/remake/rig/util/HitEntityList.java b/src/main/java/com/tiedup/remake/rig/util/HitEntityList.java deleted file mode 100644 index 591f9a8..0000000 --- a/src/main/java/com/tiedup/remake/rig/util/HitEntityList.java +++ /dev/null @@ -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 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; - } -}