From 06678199be85b4e5b3009ca45433387fcea6a92c Mon Sep 17 00:00:00 2001 From: NotEvil Date: Wed, 22 Apr 2026 00:53:42 +0200 Subject: [PATCH] WIP: stub ClientConfig + gameasset registries, strip Meshes mobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nouveaux stubs core : - TiedUpAnimationConfig — remplace yesman.epicfight.config.ClientConfig. Flags animation/rendu, no-op pour combat. - TiedUpRigRegistry — remplace gameasset.Animations.EMPTY_ANIMATION + gameasset.Armatures.ArmatureContructor. Fichiers forkés additionnels (dépendances transitives découvertes) : - anim/types/DirectStaticAnimation.java (EMPTY_ANIMATION est un DirectStaticAnimation) - event/InitAnimatorEvent.java (postInit() forge event) - event/EntityPatchRegistryEvent.java (mod bus event pour register patches) Strip combat : - Meshes.java : retiré les 11 mob meshes (CreeperMesh, DragonMesh, VexMesh, WitherMesh, etc.) + armor + particle + cape. Garde BIPED et ALEX / BIPED_OLD_TEX / BIPED_OUTLAYER (variants joueur). - Animator.playDeathAnimation : Animations.BIPED_DEATH (ARR asset) → EMPTY_ANIMATION fallback. - AnimationManager.apply : Armatures.reload() stripped (no-op, à rebrancher Phase 2 sur TiedUpArmatures). - ClientPlayerPatch.entityPairing : body entier strippé (combat skills Technician/Adrenaline/Emergency Escape). sed global : ClientConfig.* → TiedUpAnimationConfig.* sed global : Animations.EMPTY_ANIMATION → TiedUpRigRegistry.EMPTY_ANIMATION sed global : Armatures.ArmatureContructor → TiedUpRigRegistry.ArmatureContructor Résidus yesman.epicfight : 86 → 74 (-12) Reste : physics (16) + network (13) + world combat (10) + particle (3) + collider (2) + client misc (2) + skill (2). Tous combat-entangled, demandent strip méthode par méthode. --- .../remake/rig/TiedUpAnimationConfig.java | 44 ++++++++ .../tiedup/remake/rig/TiedUpRigRegistry.java | 68 ++++++++++++ .../remake/rig/anim/AnimationManager.java | 9 +- .../remake/rig/anim/AnimationPlayer.java | 6 +- .../remake/rig/anim/AnimationVariables.java | 8 +- .../com/tiedup/remake/rig/anim/Animator.java | 7 +- .../remake/rig/anim/ServerAnimator.java | 4 +- .../rig/anim/client/ClientAnimator.java | 4 +- .../tiedup/remake/rig/anim/client/Layer.java | 6 +- .../rig/anim/types/DirectStaticAnimation.java | 73 +++++++++++++ .../rig/anim/types/LayerOffAnimation.java | 4 +- .../rig/anim/types/StaticAnimation.java | 4 +- .../remake/rig/asset/JsonAssetLoader.java | 2 +- .../rig/event/EntityPatchRegistryEvent.java | 29 +++++ .../remake/rig/event/InitAnimatorEvent.java | 29 +++++ .../com/tiedup/remake/rig/mesh/Meshes.java | 100 ++++++------------ .../tiedup/remake/rig/mesh/SkinnedMesh.java | 4 +- .../remake/rig/patch/ClientPlayerPatch.java | 52 ++------- .../remake/rig/patch/LocalPlayerPatch.java | 28 ++--- 19 files changed, 324 insertions(+), 157 deletions(-) create mode 100644 src/main/java/com/tiedup/remake/rig/TiedUpAnimationConfig.java create mode 100644 src/main/java/com/tiedup/remake/rig/TiedUpRigRegistry.java create mode 100644 src/main/java/com/tiedup/remake/rig/anim/types/DirectStaticAnimation.java create mode 100644 src/main/java/com/tiedup/remake/rig/event/EntityPatchRegistryEvent.java create mode 100644 src/main/java/com/tiedup/remake/rig/event/InitAnimatorEvent.java diff --git a/src/main/java/com/tiedup/remake/rig/TiedUpAnimationConfig.java b/src/main/java/com/tiedup/remake/rig/TiedUpAnimationConfig.java new file mode 100644 index 0000000..15b090e --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/TiedUpAnimationConfig.java @@ -0,0 +1,44 @@ +/* + * 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; + +import java.util.Set; + +/** + * Remplace {@code yesman.epicfight.config.ClientConfig} du fork upstream. + * Expose uniquement les flags pertinents au pipeline animation/rendu RIG. + * + *

Note Phase 0 : tous les flags sont des {@code static final} avec + * valeurs par défaut hardcodées. À convertir en {@code ForgeConfigSpec} réel + * (TOML config file) Phase 2 ou plus tard si on veut permettre la + * configuration utilisateur.

+ * + *

Valeurs combat (autoSwitchCamera, preferenceWork, combatPreferredItems, + * miningPreferredItems) = defaults no-op, on ne les utilise pas. Les refs + * restantes dans LocalPlayerPatch/ClientPlayerPatch seront strippées en + * Phase 2 quand on simplifiera ces classes.

+ */ +public final class TiedUpAnimationConfig { + + private TiedUpAnimationConfig() {} + + // Rendu + public static final boolean activateComputeShader = false; + public static final boolean enableOriginalModel = true; // rendu vanilla model = on par défaut + public static final boolean enableAnimatedFirstPersonModel = true; + public static final boolean enableCosmetics = true; + public static final boolean enablePovAction = false; // POV action combat → off + public static final boolean autoSwitchCamera = false; // combat camera switch → off + + // Combat (stubs pour compat refs LocalPlayerPatch Phase 0 — à supprimer + // en Phase 2 avec le reste du strip combat) + public static final Object preferenceWork = new Object() { + public boolean checkHitResult() { return false; } + }; + public static final Set combatPreferredItems = Set.of(); + public static final Set miningPreferredItems = Set.of(); +} diff --git a/src/main/java/com/tiedup/remake/rig/TiedUpRigRegistry.java b/src/main/java/com/tiedup/remake/rig/TiedUpRigRegistry.java new file mode 100644 index 0000000..256069a --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/TiedUpRigRegistry.java @@ -0,0 +1,68 @@ +/* + * 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; + +import java.util.Map; + +import net.minecraft.resources.ResourceLocation; +import com.tiedup.remake.rig.anim.types.DirectStaticAnimation; +import com.tiedup.remake.rig.armature.Armature; +import com.tiedup.remake.rig.armature.Joint; + +/** + * Remplace les registries {@code yesman.epicfight.gameasset.Animations} et + * {@code yesman.epicfight.gameasset.Armatures} du fork upstream. TiedUp + * n'utilise PAS les animations combat EF (BIPED_IDLE, BIPED_WALK, etc. — + * ARR assets) — on authore les nôtres en Phase 4 via addon Blender. + * + *

Ce registry expose juste :

+ *
    + *
  • {@link #EMPTY_ANIMATION} — animation singleton "ne fait rien", référencée + * par LayerOffAnimation et StaticAnimation pour le défaut.
  • + *
  • {@link ArmatureContructor} — interface fonctionnelle pour construire + * des armatures custom (re-exposée depuis {@code TiedUpRigRegistry.ArmatureContructor}).
  • + *
+ * + *

Les vrais registries TiedUp (TiedUpAnimationRegistry, TiedUpArmatures, + * TiedUpMeshRegistry) sont prévus en Phase 2-3 et gèreront le scan resource + * pack + lookup par ResourceLocation.

+ */ +public final class TiedUpRigRegistry { + + private TiedUpRigRegistry() {} + + /** + * Animation singleton "ne fait rien". Utilisée par le runtime comme + * fallback quand aucune animation n'est active sur une layer. + * + *

Équivalent de {@code TiedUpRigRegistry.EMPTY_ANIMATION} du fork upstream + * (cf. Animations.java:27 EF).

+ */ + public static final DirectStaticAnimation EMPTY_ANIMATION = new DirectStaticAnimation() { + public static final ResourceLocation EMPTY_ANIMATION_REGISTRY_NAME = + ResourceLocation.fromNamespaceAndPath(TiedUpRigConstants.MODID, "empty"); + + @Override + public void loadAnimation() { + } + + @Override + public ResourceLocation registryName() { + return EMPTY_ANIMATION_REGISTRY_NAME; + } + }; + + /** + * Interface fonctionnelle de construction d'armature. Re-exposée depuis + * {@code TiedUpRigRegistry.ArmatureContructor} upstream pour que les callers + * (JsonAssetLoader, etc.) aient accès au même type. + */ + @FunctionalInterface + public interface ArmatureContructor { + T invoke(String name, int jointNumber, Joint joint, Map jointMap); + } +} diff --git a/src/main/java/com/tiedup/remake/rig/anim/AnimationManager.java b/src/main/java/com/tiedup/remake/rig/anim/AnimationManager.java index 1b2d49b..34c06da 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/AnimationManager.java +++ b/src/main/java/com/tiedup/remake/rig/anim/AnimationManager.java @@ -60,8 +60,7 @@ import yesman.epicfight.api.data.reloader.SkillManager; import com.tiedup.remake.rig.exception.AssetLoadingException; import com.tiedup.remake.rig.util.InstantiateInvoker; import com.tiedup.remake.rig.util.MutableBoolean; -import yesman.epicfight.gameasset.Animations; -import yesman.epicfight.gameasset.Armatures; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.TiedUpRigConstants; import yesman.epicfight.network.EpicFightNetworkManager; import yesman.epicfight.network.client.CPCheckAnimationRegistryMatches; @@ -172,7 +171,9 @@ public class AnimationManager extends SimplePreparableReloadListener objects, ResourceManager resourceManager, ProfilerFiller profilerIn) { - Armatures.reload(resourceManager); + // RIG : Armatures.reload() (EF gameasset registry) retiré. + // TiedUpArmatures.reload() sera appelé ici en Phase 2 quand le registry + // sera créé. En Phase 0, no-op. Set registeredAnimation = this.animationById.values().stream() @@ -318,7 +319,7 @@ public class AnimationManager extends SimplePreparableReloadListener play; public AnimationPlayer() { - this.setPlayAnimation(Animations.EMPTY_ANIMATION); + this.setPlayAnimation(TiedUpRigRegistry.EMPTY_ANIMATION); } public void tick(LivingEntityPatch entitypatch) { @@ -152,7 +152,7 @@ public class AnimationPlayer { } public boolean isEmpty() { - return this.play == Animations.EMPTY_ANIMATION; + return this.play == TiedUpRigRegistry.EMPTY_ANIMATION; } @Override diff --git a/src/main/java/com/tiedup/remake/rig/anim/AnimationVariables.java b/src/main/java/com/tiedup/remake/rig/anim/AnimationVariables.java index 259a244..23236c0 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/AnimationVariables.java +++ b/src/main/java/com/tiedup/remake/rig/anim/AnimationVariables.java @@ -21,7 +21,7 @@ import com.tiedup.remake.rig.asset.AssetAccessor; import com.tiedup.remake.rig.util.ParseUtil; import com.tiedup.remake.rig.util.datastruct.TypeFlexibleHashMap; import com.tiedup.remake.rig.util.datastruct.TypeFlexibleHashMap.TypeKey; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import yesman.epicfight.network.common.AnimationVariablePacket; public class AnimationVariables { @@ -111,7 +111,7 @@ public class AnimationVariables { @SuppressWarnings("unchecked") @Deprecated // Avoid direct use public void put(IndependentAnimationVariableKey key, AssetAccessor animation, T value, boolean synchronize) { - if (animation == Animations.EMPTY_ANIMATION) { + if (animation == TiedUpRigRegistry.EMPTY_ANIMATION) { return; } @@ -158,7 +158,7 @@ public class AnimationVariables { @SuppressWarnings("unchecked") public void removeAll(AnimationAccessor animation) { - if (animation == Animations.EMPTY_ANIMATION) { + if (animation == TiedUpRigRegistry.EMPTY_ANIMATION) { return; } @@ -182,7 +182,7 @@ public class AnimationVariables { @SuppressWarnings("unchecked") @Deprecated // Avoid direct use public void remove(IndependentAnimationVariableKey key, AssetAccessor animation, boolean synchronize) { - if (animation == Animations.EMPTY_ANIMATION) { + if (animation == TiedUpRigRegistry.EMPTY_ANIMATION) { return; } diff --git a/src/main/java/com/tiedup/remake/rig/anim/Animator.java b/src/main/java/com/tiedup/remake/rig/anim/Animator.java index 9163fab..decb4da 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/Animator.java +++ b/src/main/java/com/tiedup/remake/rig/anim/Animator.java @@ -21,7 +21,7 @@ import com.tiedup.remake.rig.anim.types.EntityState; import com.tiedup.remake.rig.anim.types.StaticAnimation; import com.tiedup.remake.rig.asset.AssetAccessor; import com.tiedup.remake.rig.event.InitAnimatorEvent; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.TiedUpRigConstants; import com.tiedup.remake.rig.patch.LivingEntityPatch; @@ -111,7 +111,10 @@ public abstract class Animator { } public void playDeathAnimation() { - this.playAnimation(this.livingAnimations.getOrDefault(LivingMotions.DEATH, Animations.BIPED_DEATH), 0); + // RIG : Animations.BIPED_DEATH (EF combat asset ARR) retiré. + // Fallback sur EMPTY_ANIMATION — TiedUp authored ses propres + // anims de mort Phase 4 et les binde via addLivingAnimation(DEATH, ...). + this.playAnimation(this.livingAnimations.getOrDefault(LivingMotions.DEATH, TiedUpRigRegistry.EMPTY_ANIMATION), 0); } public void addLivingAnimation(LivingMotion livingMotion, AssetAccessor animation) { diff --git a/src/main/java/com/tiedup/remake/rig/anim/ServerAnimator.java b/src/main/java/com/tiedup/remake/rig/anim/ServerAnimator.java index 219308d..3cd1768 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/ServerAnimator.java +++ b/src/main/java/com/tiedup/remake/rig/anim/ServerAnimator.java @@ -15,7 +15,7 @@ import com.tiedup.remake.rig.anim.types.EntityState; import com.tiedup.remake.rig.anim.types.LinkAnimation; import com.tiedup.remake.rig.anim.types.StaticAnimation; import com.tiedup.remake.rig.asset.AssetAccessor; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.patch.LivingEntityPatch; public class ServerAnimator extends Animator { @@ -103,7 +103,7 @@ public class ServerAnimator extends Animator { if (this.animationPlayer.isEnd()) { if (this.nextAnimation == null) { - Animations.EMPTY_ANIMATION.putOnPlayer(this.animationPlayer, this.entitypatch); + TiedUpRigRegistry.EMPTY_ANIMATION.putOnPlayer(this.animationPlayer, this.entitypatch); this.softPaused = true; } else { if (!this.animationPlayer.getAnimation().get().isLinkAnimation() && !this.nextAnimation.get().isLinkAnimation()) { diff --git a/src/main/java/com/tiedup/remake/rig/anim/client/ClientAnimator.java b/src/main/java/com/tiedup/remake/rig/anim/client/ClientAnimator.java index bc28d68..7ef1fa8 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/client/ClientAnimator.java +++ b/src/main/java/com/tiedup/remake/rig/anim/client/ClientAnimator.java @@ -44,7 +44,7 @@ import com.tiedup.remake.rig.anim.client.property.JointMask.BindModifier; import com.tiedup.remake.rig.anim.client.property.JointMask.JointMaskSet; import com.tiedup.remake.rig.anim.client.property.JointMaskEntry; import com.tiedup.remake.rig.util.datastruct.TypeFlexibleHashMap; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.TiedUpRigConstants; import yesman.epicfight.network.common.AnimatorControlPacket; import com.tiedup.remake.rig.patch.LivingEntityPatch; @@ -267,7 +267,7 @@ public class ClientAnimator extends Animator { @Override public void playDeathAnimation() { if (!this.getPlayerFor(null).getAnimation().get().getProperty(ActionAnimationProperty.IS_DEATH_ANIMATION).orElse(false)) { - this.playAnimation(this.livingAnimations.getOrDefault(LivingMotions.DEATH, Animations.EMPTY_ANIMATION), 0.0F); + this.playAnimation(this.livingAnimations.getOrDefault(LivingMotions.DEATH, TiedUpRigRegistry.EMPTY_ANIMATION), 0.0F); this.currentMotion = LivingMotions.DEATH; } } diff --git a/src/main/java/com/tiedup/remake/rig/anim/client/Layer.java b/src/main/java/com/tiedup/remake/rig/anim/client/Layer.java index 9784bbf..d1908ab 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/client/Layer.java +++ b/src/main/java/com/tiedup/remake/rig/anim/client/Layer.java @@ -21,7 +21,7 @@ import com.tiedup.remake.rig.anim.types.LayerOffAnimation; import com.tiedup.remake.rig.anim.types.LinkAnimation; import com.tiedup.remake.rig.anim.types.StaticAnimation; import com.tiedup.remake.rig.asset.AssetAccessor; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.patch.LivingEntityPatch; public class Layer { @@ -132,7 +132,7 @@ public class Layer { this.nextAnimation = null; } else { if (this.animationPlayer.getAnimation() instanceof LayerOffAnimation) { - this.animationPlayer.getAnimation().get().end(entitypatch, Animations.EMPTY_ANIMATION, true); + this.animationPlayer.getAnimation().get().end(entitypatch, TiedUpRigRegistry.EMPTY_ANIMATION, true); } else { this.off(entitypatch); } @@ -207,7 +207,7 @@ public class Layer { public void disableLayer() { this.disabled = true; - this.animationPlayer.setPlayAnimation(Animations.EMPTY_ANIMATION); + this.animationPlayer.setPlayAnimation(TiedUpRigRegistry.EMPTY_ANIMATION); } public static void setLayerOffAnimation(AssetAccessor currentAnimation, Pose currentPose, LayerOffAnimation offAnimation, float transitionTimeModifier) { diff --git a/src/main/java/com/tiedup/remake/rig/anim/types/DirectStaticAnimation.java b/src/main/java/com/tiedup/remake/rig/anim/types/DirectStaticAnimation.java new file mode 100644 index 0000000..614333b --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/anim/types/DirectStaticAnimation.java @@ -0,0 +1,73 @@ +/* + * 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 org.jetbrains.annotations.ApiStatus; + +import net.minecraft.resources.ResourceLocation; +import com.tiedup.remake.rig.anim.AnimationManager.AnimationAccessor; +import com.tiedup.remake.rig.asset.AssetAccessor; +import com.tiedup.remake.rig.armature.Armature; + +public class DirectStaticAnimation extends StaticAnimation implements AnimationAccessor { + private ResourceLocation registryName; + + public DirectStaticAnimation() { + this.accessor = this; + } + + public DirectStaticAnimation(float transitionTime, boolean isRepeat, ResourceLocation registryName, AssetAccessor armature) { + super(transitionTime, isRepeat, registryName.toString(), armature); + + this.registryName = registryName; + this.accessor = this; + } + + /* Multilayer, Pov animation Constructor */ + @ApiStatus.Internal + public DirectStaticAnimation(ResourceLocation baseAnimPath, float transitionTime, boolean repeatPlay, String registryName, AssetAccessor armature) { + super(baseAnimPath, transitionTime, repeatPlay, registryName, armature); + + this.registryName = ResourceLocation.parse(registryName); + } + + @Override + public DirectStaticAnimation get() { + return this; + } + + @SuppressWarnings("unchecked") + @Override + public AnimationAccessor getAccessor() { + return (AnimationAccessor)this; + } + + @Override + public ResourceLocation registryName() { + return this.registryName; + } + + @Override + public boolean isPresent() { + return true; + } + + @Override + public int id() { + return -1; + } + + @Override + public int getId() { + return -1; + } + + @Override + public boolean inRegistry() { + return false; + } +} diff --git a/src/main/java/com/tiedup/remake/rig/anim/types/LayerOffAnimation.java b/src/main/java/com/tiedup/remake/rig/anim/types/LayerOffAnimation.java index 854d29a..88b397d 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/types/LayerOffAnimation.java +++ b/src/main/java/com/tiedup/remake/rig/anim/types/LayerOffAnimation.java @@ -19,7 +19,7 @@ import com.tiedup.remake.rig.anim.property.AnimationProperty; import com.tiedup.remake.rig.asset.AssetAccessor; import com.tiedup.remake.rig.anim.client.Layer.Priority; import com.tiedup.remake.rig.anim.client.property.JointMaskEntry; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.patch.LivingEntityPatch; @OnlyIn(Dist.CLIENT) @@ -74,7 +74,7 @@ public class LayerOffAnimation extends DynamicAnimation implements AnimationAcce @Override public AssetAccessor getRealAnimation() { - return Animations.EMPTY_ANIMATION; + return TiedUpRigRegistry.EMPTY_ANIMATION; } @Override diff --git a/src/main/java/com/tiedup/remake/rig/anim/types/StaticAnimation.java b/src/main/java/com/tiedup/remake/rig/anim/types/StaticAnimation.java index 6e369c1..a81f537 100644 --- a/src/main/java/com/tiedup/remake/rig/anim/types/StaticAnimation.java +++ b/src/main/java/com/tiedup/remake/rig/anim/types/StaticAnimation.java @@ -64,7 +64,7 @@ import yesman.epicfight.client.ClientEngine; import com.tiedup.remake.rig.render.TiedUpRenderTypes; import yesman.epicfight.client.renderer.RenderingTool; import com.tiedup.remake.rig.render.item.RenderItemBase; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.TiedUpRigConstants; import com.tiedup.remake.rig.patch.LivingEntityPatch; import com.tiedup.remake.rig.patch.PlayerPatch; @@ -179,7 +179,7 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati public void setLinkAnimation(final AssetAccessor fromAnimation, Pose startPose, boolean isOnSameLayer, float transitionTimeModifier, LivingEntityPatch entitypatch, LinkAnimation dest) { if (!entitypatch.isLogicalClient()) { - startPose = Animations.EMPTY_ANIMATION.getPoseByTime(entitypatch, 0.0F, 1.0F); + startPose = TiedUpRigRegistry.EMPTY_ANIMATION.getPoseByTime(entitypatch, 0.0F, 1.0F); } dest.resetNextStartTime(); diff --git a/src/main/java/com/tiedup/remake/rig/asset/JsonAssetLoader.java b/src/main/java/com/tiedup/remake/rig/asset/JsonAssetLoader.java index a0e07bc..1d03c37 100644 --- a/src/main/java/com/tiedup/remake/rig/asset/JsonAssetLoader.java +++ b/src/main/java/com/tiedup/remake/rig/asset/JsonAssetLoader.java @@ -70,7 +70,7 @@ import com.tiedup.remake.rig.math.MathUtils; import com.tiedup.remake.rig.math.OpenMatrix4f; import com.tiedup.remake.rig.math.Vec3f; import com.tiedup.remake.rig.math.Vec4f; -import yesman.epicfight.gameasset.Armatures.ArmatureContructor; +import com.tiedup.remake.rig.TiedUpRigRegistry.ArmatureContructor; import com.tiedup.remake.rig.TiedUpRigConstants; public class JsonAssetLoader { diff --git a/src/main/java/com/tiedup/remake/rig/event/EntityPatchRegistryEvent.java b/src/main/java/com/tiedup/remake/rig/event/EntityPatchRegistryEvent.java new file mode 100644 index 0000000..8f252f3 --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/event/EntityPatchRegistryEvent.java @@ -0,0 +1,29 @@ +/* + * 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.event; + +import java.util.Map; +import java.util.function.Function; +import java.util.function.Supplier; + +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraftforge.eventbus.api.Event; +import net.minecraftforge.fml.event.IModBusEvent; +import com.tiedup.remake.rig.patch.EntityPatch; + +public class EntityPatchRegistryEvent extends Event implements IModBusEvent { + private final Map, Function>>> typeEntry; + + public EntityPatchRegistryEvent(Map, Function>>> typeEntry) { + this.typeEntry = typeEntry; + } + + public Map, Function>>> getTypeEntry() { + return this.typeEntry; + } +} \ No newline at end of file diff --git a/src/main/java/com/tiedup/remake/rig/event/InitAnimatorEvent.java b/src/main/java/com/tiedup/remake/rig/event/InitAnimatorEvent.java new file mode 100644 index 0000000..c36c1dc --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/event/InitAnimatorEvent.java @@ -0,0 +1,29 @@ +/* + * 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.event; + +import net.minecraftforge.eventbus.api.Event; +import com.tiedup.remake.rig.anim.Animator; +import com.tiedup.remake.rig.patch.LivingEntityPatch; + +public class InitAnimatorEvent extends Event { + private final LivingEntityPatch entitypatch; + private final Animator animator; + + public InitAnimatorEvent(LivingEntityPatch entitypatch, Animator animator) { + this.entitypatch = entitypatch; + this.animator = animator; + } + + public LivingEntityPatch getEntityPatch() { + return this.entitypatch; + } + + public Animator getAnimator() { + return this.animator; + } +} \ No newline at end of file diff --git a/src/main/java/com/tiedup/remake/rig/mesh/Meshes.java b/src/main/java/com/tiedup/remake/rig/mesh/Meshes.java index d307bc1..c374e4c 100644 --- a/src/main/java/com/tiedup/remake/rig/mesh/Meshes.java +++ b/src/main/java/com/tiedup/remake/rig/mesh/Meshes.java @@ -28,121 +28,81 @@ import com.tiedup.remake.rig.mesh.Mesh.RenderProperties; import com.tiedup.remake.rig.cloth.ClothSimulatable; import com.tiedup.remake.rig.cloth.ClothSimulator.ClothObject; import com.tiedup.remake.rig.cloth.ClothSimulator.ClothObjectBuilder; -import com.tiedup.remake.rig.mesh.CreeperMesh; -import com.tiedup.remake.rig.mesh.DragonMesh; -import com.tiedup.remake.rig.mesh.EndermanMesh; -import com.tiedup.remake.rig.mesh.HoglinMesh; -import com.tiedup.remake.rig.mesh.HumanoidMesh; -import com.tiedup.remake.rig.mesh.IronGolemMesh; -import com.tiedup.remake.rig.mesh.PiglinMesh; -import com.tiedup.remake.rig.mesh.RavagerMesh; -import com.tiedup.remake.rig.mesh.SpiderMesh; -import com.tiedup.remake.rig.mesh.VexMesh; -import com.tiedup.remake.rig.mesh.VillagerMesh; -import com.tiedup.remake.rig.mesh.WitherMesh; import com.tiedup.remake.rig.TiedUpRigConstants; public class Meshes implements PreparableReloadListener { private static final Map> ACCESSORS = Maps.newHashMap(); private static final Map, Mesh> MESHES = Maps.newHashMap(); private static ResourceManager resourceManager = null; - + //For resource reloader public static final Meshes INSTANCE = new Meshes(); - - // Entities + + // RIG : on garde uniquement les meshes humanoïdes (joueur + NPCs bondage). + // Les mob meshes combat EF (Creeper/Dragon/Spider/etc.) et armor/particle/cape + // ont été retirés du fork — hors scope bondage. public static final MeshAccessor ALEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_slim_arm", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new)); public static final MeshAccessor BIPED = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new)); public static final MeshAccessor BIPED_OLD_TEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_old_texture", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new)); public static final MeshAccessor BIPED_OUTLAYER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_outlayer", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new)); - public static final MeshAccessor VILLAGER_ZOMBIE = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/zombie_villager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new)); - public static final MeshAccessor CREEPER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/creeper", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(CreeperMesh::new)); - public static final MeshAccessor ENDERMAN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/enderman", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(EndermanMesh::new)); - public static final MeshAccessor SKELETON = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/skeleton", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new)); - public static final MeshAccessor SPIDER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/spider", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SpiderMesh::new)); - public static final MeshAccessor IRON_GOLEM = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/iron_golem", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(IronGolemMesh::new)); - public static final MeshAccessor ILLAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/illager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new)); - public static final MeshAccessor WITCH = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/witch", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new)); - public static final MeshAccessor RAVAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/ravager",(jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(RavagerMesh::new)); - public static final MeshAccessor VEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/vex", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VexMesh::new)); - public static final MeshAccessor PIGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/piglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(PiglinMesh::new)); - public static final MeshAccessor HOGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/hoglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HoglinMesh::new)); - public static final MeshAccessor DRAGON = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/dragon", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(DragonMesh::new)); - public static final MeshAccessor WITHER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/wither", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(WitherMesh::new)); - - // Armors - public static final MeshAccessor HELMET = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - public static final MeshAccessor HELMET_PIGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/piglin_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - public static final MeshAccessor HELMET_VILLAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/villager_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - public static final MeshAccessor CHESTPLATE = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/chestplate", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - public static final MeshAccessor LEGGINS = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/leggins", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - public static final MeshAccessor BOOTS = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/boots", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - - // Particles - public static final MeshAccessor AIR_BURST = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/air_burst", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new)); - public static final MeshAccessor FORCE_FIELD = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/force_field", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new)); - public static final MeshAccessor LASER = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/laser", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new)); - - // Layers - public static final MeshAccessor CAPE_DEFAULT = MeshAccessor.create(TiedUpRigConstants.MODID, "layer/default_cape", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new)); - + public static void reload(ResourceManager resourceManager) { Meshes.resourceManager = resourceManager; - + ACCESSORS.entrySet().removeIf(entry -> !entry.getValue().inRegistry); - + MESHES.values().forEach((mesh) -> { if (mesh instanceof SkinnedMesh skinnedMesh) { skinnedMesh.destroy(); } }); - + MESHES.clear(); } - + @SuppressWarnings("unchecked") @Nullable public static AssetAccessor get(ResourceLocation id) { return (AssetAccessor) ACCESSORS.get(id); } - + @SuppressWarnings("unchecked") public static AssetAccessor getOrCreate(ResourceLocation id, Function jsonLoader) { return ACCESSORS.containsKey(id) ? (AssetAccessor)ACCESSORS.get(id) : MeshAccessor.create(id, jsonLoader, false); } - + @SuppressWarnings("unchecked") public static Set> entry(Class filter) { return ACCESSORS.values().stream().filter((accessor) -> filter.isAssignableFrom(accessor.get().getClass())).map((accessor) -> (AssetAccessor)accessor).collect(Collectors.toSet()); } - + public static ResourceLocation wrapLocation(ResourceLocation rl) { return rl.getPath().matches("animmodels/.*\\.json") ? rl : ResourceLocation.fromNamespaceAndPath(rl.getNamespace(), "animmodels/" + rl.getPath() + ".json"); } - + @Override public CompletableFuture reload(PreparableReloadListener.PreparationBarrier stage, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) { return CompletableFuture.runAsync(() -> { Meshes.reload(resourceManager); }, gameExecutor).thenCompose(stage::wait); } - + @FunctionalInterface public interface MeshContructor

> { M invoke(Map arrayMap, Map> parts, M parent, RenderProperties properties); } - + public static record MeshAccessor (ResourceLocation registryName, Function jsonLoader, boolean inRegistry) implements AssetAccessor, SoftBodyTranslatable { public static MeshAccessor create(String namespaceId, String path, Function jsonLoader) { return create(ResourceLocation.fromNamespaceAndPath(namespaceId, path), jsonLoader, true); } - + private static MeshAccessor create(ResourceLocation id, Function jsonLoader, boolean inRegistry) { MeshAccessor accessor = new MeshAccessor (id, jsonLoader, inRegistry); ACCESSORS.put(id, accessor); return accessor; } - + @SuppressWarnings("unchecked") @Override public M get() { @@ -150,18 +110,18 @@ public class Meshes implements PreparableReloadListener { JsonAssetLoader jsonModelLoader = new JsonAssetLoader(resourceManager, wrapLocation(this.registryName)); MESHES.put(this, this.jsonLoader.apply(jsonModelLoader)); } - + return (M)MESHES.get(this); } - + public String toString() { return this.registryName.toString(); } - + public int hashCode() { return this.registryName.hashCode(); } - + public boolean equals(Object obj) { if (this == obj) { return true; @@ -175,37 +135,37 @@ public class Meshes implements PreparableReloadListener { return false; } } - + @Override public boolean canStartSoftBodySimulation() { Mesh mesh = this.get(); - + if (mesh instanceof StaticMesh staticMesh) { return staticMesh.canStartSoftBodySimulation(); } else if (mesh instanceof CompositeMesh compositeMesh) { return compositeMesh.canStartSoftBodySimulation(); } - + return false; } - + @Override public ClothObject createSimulationData(SoftBodyTranslatable provider, ClothSimulatable simOwner, ClothObjectBuilder simBuilder) { Mesh mesh = this.get(); - + if (mesh instanceof StaticMesh staticMesh) { return staticMesh.createSimulationData(provider, simOwner, simBuilder); } else if (mesh instanceof CompositeMesh compositeMesh) { return compositeMesh.createSimulationData(provider, simOwner, simBuilder); } - + return null; } @Override public void putSoftBodySimulationInfo(Map sofyBodySimulationInfo) { Mesh mesh = this.get(); - + if (mesh instanceof SoftBodyTranslatable softBodyTranslatable) { softBodyTranslatable.putSoftBodySimulationInfo(sofyBodySimulationInfo); } @@ -214,7 +174,7 @@ public class Meshes implements PreparableReloadListener { @Override public Map getSoftBodySimulationInfo() { Mesh mesh = this.get(); - + if (mesh instanceof SoftBodyTranslatable softBodyTranslatable) { return softBodyTranslatable.getSoftBodySimulationInfo(); } else { diff --git a/src/main/java/com/tiedup/remake/rig/mesh/SkinnedMesh.java b/src/main/java/com/tiedup/remake/rig/mesh/SkinnedMesh.java index 27fe633..e15c5bb 100644 --- a/src/main/java/com/tiedup/remake/rig/mesh/SkinnedMesh.java +++ b/src/main/java/com/tiedup/remake/rig/mesh/SkinnedMesh.java @@ -36,7 +36,7 @@ import com.tiedup.remake.rig.math.Vec4f; import com.tiedup.remake.rig.render.TiedUpRenderTypes; import yesman.epicfight.client.renderer.shader.compute.ComputeShaderSetup; import yesman.epicfight.client.renderer.shader.compute.loader.ComputeShaderProvider; -import yesman.epicfight.config.ClientConfig; +import com.tiedup.remake.rig.TiedUpAnimationConfig; import com.tiedup.remake.rig.TiedUpRigConstants; public class SkinnedMesh extends StaticMesh { @@ -246,7 +246,7 @@ public class SkinnedMesh extends StaticMesh { @Override public void draw(PoseStack poseStack, MultiBufferSource bufferSources, RenderType renderType, Mesh.DrawingFunction drawingFunction, int packedLight, float r, float g, float b, float a, int overlay, @Nullable Armature armature, OpenMatrix4f[] poses) { - if (ClientConfig.activateComputeShader && this.computerShaderSetup != null) { + if (TiedUpAnimationConfig.activateComputeShader && this.computerShaderSetup != null) { this.computerShaderSetup.drawWithShader(this, poseStack, bufferSources, TiedUpRenderTypes.getTriangulated(renderType), packedLight, r, g, b, a, overlay, armature, poses); } else { this.drawPosed(poseStack, bufferSources.getBuffer(TiedUpRenderTypes.getTriangulated(renderType)), drawingFunction, packedLight, r, g, b, a, overlay, armature, poses); diff --git a/src/main/java/com/tiedup/remake/rig/patch/ClientPlayerPatch.java b/src/main/java/com/tiedup/remake/rig/patch/ClientPlayerPatch.java index c093232..c63772f 100644 --- a/src/main/java/com/tiedup/remake/rig/patch/ClientPlayerPatch.java +++ b/src/main/java/com/tiedup/remake/rig/patch/ClientPlayerPatch.java @@ -47,7 +47,7 @@ import com.tiedup.remake.rig.util.EntitySnapshot; import com.tiedup.remake.rig.math.MathUtils; import com.tiedup.remake.rig.math.OpenMatrix4f; import com.tiedup.remake.rig.math.Vec3f; -import yesman.epicfight.config.ClientConfig; +import com.tiedup.remake.rig.TiedUpAnimationConfig; import yesman.epicfight.gameasset.EpicFightSounds; import yesman.epicfight.network.EntityPairingPacketTypes; import yesman.epicfight.network.server.SPEntityPairingPacket; @@ -237,54 +237,14 @@ public class AbstractClientPlayerPatch extends P }); } - @Override - public void entityPairing(SPEntityPairingPacket packet) { - super.entityPairing(packet); - - if (packet.getPairingPacketType().is(EntityPairingPacketTypes.class)) { - switch (packet.getPairingPacketType().toEnum(EntityPairingPacketTypes.class)) { - case TECHNICIAN_ACTIVATED -> { - this.original.level().addParticle(EpicFightParticles.WHITE_AFTERIMAGE.get(), this.original.getX(), this.original.getY(), this.original.getZ(), Double.longBitsToDouble(this.original.getId()), 0, 0); - } - case ADRENALINE_ACTIVATED -> { - if (this.original.isLocalPlayer()) { - Minecraft.getInstance().getSoundManager().play(SimpleSoundInstance.forUI(EpicFightSounds.ADRENALINE.get(), 1.0F, 1.0F)); - } else { - this.original.playSound(EpicFightSounds.ADRENALINE.get()); - } - - this.original.level().addParticle(EpicFightParticles.ADRENALINE_PLAYER_BEATING.get(), this.original.getX(), this.original.getY(), this.original.getZ(), Double.longBitsToDouble(this.original.getId()), 0, 0); - } - case EMERGENCY_ESCAPE_ACTIVATED -> { - float yRot = packet.getBuffer().readFloat(); - this.original.level().addParticle(EpicFightParticles.AIR_BURST.get(), this.original.getX(), this.original.getY() + this.original.getBbHeight() * 0.5F, this.original.getZ(), 90.0F, yRot, 0); - - this.entityDecorations.addColorModifier(EntityDecorations.EMERGENCY_ESCAPE_TRANSPARENCY_MODIFIER, new RenderAttributeModifier<> () { - private int tickCount; - - @Override - public void modifyValue(Vector4f val, float partialTick) { - val.w = (float)Math.pow((this.tickCount + partialTick) / 6.0D, 2.0D) - 0.4F; - } - - @Override - public boolean shouldRemove() { - return this.tickCount > 6; - } - - @Override - public void tick() { - ++this.tickCount; - } - }); - } - } - } - } + // RIG : entityPairing() EF = hook combat skills (Technician, Adrenaline, + // Emergency Escape). Strippé intégralement — ces skills n'existent pas + // en TiedUp. Le super.entityPairing() de base reste disponible si jamais + // une extension TiedUp veut hooker des paires custom. @Override public boolean overrideRender() { - RenderEpicFightPlayerEvent renderepicfightplayerevent = new RenderEpicFightPlayerEvent(this, !ClientConfig.enableOriginalModel || this.isEpicFightMode()); + RenderEpicFightPlayerEvent renderepicfightplayerevent = new RenderEpicFightPlayerEvent(this, !TiedUpAnimationConfig.enableOriginalModel || this.isEpicFightMode()); MinecraftForge.EVENT_BUS.post(renderepicfightplayerevent); return renderepicfightplayerevent.getShouldRender(); } diff --git a/src/main/java/com/tiedup/remake/rig/patch/LocalPlayerPatch.java b/src/main/java/com/tiedup/remake/rig/patch/LocalPlayerPatch.java index d09b780..a4c5f29 100644 --- a/src/main/java/com/tiedup/remake/rig/patch/LocalPlayerPatch.java +++ b/src/main/java/com/tiedup/remake/rig/patch/LocalPlayerPatch.java @@ -46,8 +46,8 @@ import com.tiedup.remake.rig.math.MathUtils; import yesman.epicfight.client.ClientEngine; import yesman.epicfight.client.events.engine.RenderEngine; import yesman.epicfight.client.gui.screen.SkillBookScreen; -import yesman.epicfight.config.ClientConfig; -import yesman.epicfight.gameasset.Animations; +import com.tiedup.remake.rig.TiedUpAnimationConfig; +import com.tiedup.remake.rig.TiedUpRigRegistry; import com.tiedup.remake.rig.TiedUpRigConstants; import yesman.epicfight.network.EpicFightNetworkManager; import yesman.epicfight.network.client.CPAnimatorControl; @@ -134,13 +134,13 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { return !optPovAnimation.isPresent(); }); - if (noPovAnimation && !currentPlaying.equals(Animations.EMPTY_ANIMATION)) { + if (noPovAnimation && !currentPlaying.equals(TiedUpRigRegistry.EMPTY_ANIMATION)) { this.firstPersonLayer.off(); } this.firstPersonLayer.update(this); - if (this.firstPersonLayer.animationPlayer.getAnimation().equals(Animations.EMPTY_ANIMATION)) { + if (this.firstPersonLayer.animationPlayer.getAnimation().equals(TiedUpRigRegistry.EMPTY_ANIMATION)) { this.povSettings = null; } } @@ -149,7 +149,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { public boolean overrideRender() { // Disable rendering the player when animated first person model disabled if (this.original.is(this.minecraft.player)) { - if (this.minecraft.options.getCameraType().isFirstPerson() && !ClientConfig.enableAnimatedFirstPersonModel) { + if (this.minecraft.options.getCameraType().isFirstPerson() && !TiedUpAnimationConfig.enableAnimatedFirstPersonModel) { return false; } } @@ -167,7 +167,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { if (this.playerMode != PlayerMode.VANILLA) { ClientEngine.getInstance().renderEngine.downSlideSkillUI(); - if (ClientConfig.autoSwitchCamera) { + if (TiedUpAnimationConfig.autoSwitchCamera) { this.minecraft.options.setCameraType(CameraType.FIRST_PERSON); } @@ -184,7 +184,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { if (this.playerMode != PlayerMode.EPICFIGHT) { ClientEngine.getInstance().renderEngine.upSlideSkillUI(); - if (ClientConfig.autoSwitchCamera) { + if (TiedUpAnimationConfig.autoSwitchCamera) { this.minecraft.options.setCameraType(CameraType.THIRD_PERSON_BACK); } @@ -278,7 +278,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { return xRot; } - if (ClientConfig.enablePovAction && this.minecraft.options.getCameraType().isFirstPerson() && this.isEpicFightMode() && !this.getFirstPersonLayer().isOff()) { + if (TiedUpAnimationConfig.enablePovAction && this.minecraft.options.getCameraType().isFirstPerson() && this.isEpicFightMode() && !this.getFirstPersonLayer().isOff()) { ViewLimit viewLimit = this.getPovSettings().viewLimit(); if (viewLimit != null) { @@ -299,7 +299,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { return yRot; } - if (ClientConfig.enablePovAction && this.minecraft.options.getCameraType().isFirstPerson() && this.isEpicFightMode() && !this.getFirstPersonLayer().isOff()) { + if (TiedUpAnimationConfig.enablePovAction && this.minecraft.options.getCameraType().isFirstPerson() && this.isEpicFightMode() && !this.getFirstPersonLayer().isOff()) { ViewLimit viewLimit = this.getPovSettings().viewLimit(); if (viewLimit != null) { @@ -438,10 +438,10 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { public void updateHeldItem(CapabilityItem mainHandCap, CapabilityItem offHandCap) { super.updateHeldItem(mainHandCap, offHandCap); - if (!ClientConfig.preferenceWork.checkHitResult()) { - if (ClientConfig.combatPreferredItems.contains(this.original.getMainHandItem().getItem())) { + if (!TiedUpAnimationConfig.preferenceWork.checkHitResult()) { + if (TiedUpAnimationConfig.combatPreferredItems.contains(this.original.getMainHandItem().getItem())) { this.toEpicFightMode(true); - } else if (ClientConfig.miningPreferredItems.contains(this.original.getMainHandItem().getItem())) { + } else if (TiedUpAnimationConfig.miningPreferredItems.contains(this.original.getMainHandItem().getItem())) { this.toVanillaMode(true); } } @@ -480,8 +480,8 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch { return true; } - if (ClientConfig.preferenceWork.checkHitResult()) { - if (ClientConfig.combatPreferredItems.contains(this.original.getMainHandItem().getItem())) { + if (TiedUpAnimationConfig.preferenceWork.checkHitResult()) { + if (TiedUpAnimationConfig.combatPreferredItems.contains(this.original.getMainHandItem().getItem())) { BlockHitResult blockHitResult = RenderEngine.asBlockHitResult(this.minecraft.hitResult); if (blockHitResult != null && this.minecraft.level != null) {