Audit-3 : align H-04/H-05 signatures vs EF upstream
Deux signatures avaient dérivé du fork EF pendant Phase 0. Les réaligner
maintenant évite du frottement quand on re-porte des fixes EF upstream.
H-04 — ActionAnimation.correctRootJoint
Avant : correctRootJoint(LinkAnimation linkAnimation, ...)
Après : correctRootJoint(DynamicAnimation animation, ...)
LinkAnimation extends DynamicAnimation → widening safe, le call-site
dans LinkAnimation.modifyPose (ligne 118) passe toujours `this` qui
type-matche DynamicAnimation sans édition.
H-05 — AttackAnimation.phases
Avant : public final List<Phase> phases = Collections.emptyList();
Après : public final Phase[] phases = new Phase[0];
Le seul caller (JsonAssetLoader.java:477) est un for-each, donc
array-compatible sans édition. Aucun .size()/.get()/.stream() nulle
part. Imports java.util.{List,Collections} retirés.
Compile GREEN. 20/20 tests rig GREEN.
This commit is contained in:
@@ -58,7 +58,7 @@ public class ActionAnimation extends MainFrameAnimation {
|
||||
* frames à chaque entrée dans l'action anim.</p>
|
||||
*/
|
||||
public void correctRootJoint(
|
||||
com.tiedup.remake.rig.anim.types.LinkAnimation linkAnimation,
|
||||
com.tiedup.remake.rig.anim.types.DynamicAnimation animation,
|
||||
com.tiedup.remake.rig.anim.Pose pose,
|
||||
com.tiedup.remake.rig.patch.LivingEntityPatch<?> entitypatch,
|
||||
float time,
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
|
||||
package com.tiedup.remake.rig.anim.types;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
||||
import com.tiedup.remake.rig.armature.Armature;
|
||||
@@ -35,8 +32,11 @@ public class AttackAnimation extends ActionAnimation {
|
||||
* Liste des phases d'attaque. Toujours vide en TiedUp — on ne joue
|
||||
* jamais d'animation attaque. Mais le field doit exister pour que
|
||||
* JsonAssetLoader.java ligne 591 puisse itérer dessus sans NPE.
|
||||
*
|
||||
* <p>Type {@code Phase[]} (et non {@code List<Phase>}) pour s'aligner
|
||||
* sur la signature upstream EF — facilite le re-port de fixes EF.</p>
|
||||
*/
|
||||
public final List<Phase> phases = Collections.emptyList();
|
||||
public final Phase[] phases = new Phase[0];
|
||||
|
||||
public AttackAnimation(float transitionTime, boolean isRepeat, String registryName, AssetAccessor<? extends Armature> armature) {
|
||||
super(transitionTime, isRepeat, registryName, armature);
|
||||
|
||||
Reference in New Issue
Block a user