diff --git a/src/main/java/com/tiedup/remake/rig/TiedUpRigConstants.java b/src/main/java/com/tiedup/remake/rig/TiedUpRigConstants.java new file mode 100644 index 0000000..2e30a5f --- /dev/null +++ b/src/main/java/com/tiedup/remake/rig/TiedUpRigConstants.java @@ -0,0 +1,114 @@ +/* + * 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 com.mojang.logging.LogUtils; +import com.tiedup.remake.core.TiedUpMod; +import com.tiedup.remake.rig.anim.Animator; +import com.tiedup.remake.rig.anim.ServerAnimator; +import com.tiedup.remake.rig.patch.LivingEntityPatch; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.fml.loading.FMLEnvironment; +import org.slf4j.Logger; + +import java.util.function.Function; + +/** + * Remplace {@code yesman.epicfight.main.EpicFightMod} + {@code EpicFightSharedConstants} + * du fork upstream. Expose les singletons nécessaires au runtime RIG : + * + *
Pattern lazy method-ref : {@code ClientAnimator::getAnimator} n'est chargé + * que si {@link #isPhysicalClient()} est true. Sur serveur dedié, la classe + * client n'est jamais référencée, donc jamais chargée → pas de + * {@code NoClassDefFoundError}.
+ */ +public final class TiedUpRigConstants { + + public static final String MODID = TiedUpMod.MOD_ID; + public static final Logger LOGGER = LogUtils.getLogger(); + + /** Détection dev env (Gradle runClient) — utilisé pour les logs debug EF. */ + public static final boolean IS_DEV_ENV = !FMLEnvironment.production; + + /** Durée d'un tick MC en secondes (20 TPS). */ + public static final float A_TICK = 1.0F / 20.0F; + + /** Durée de transition inter-animation par défaut (en ticks). */ + public static final int GENERAL_ANIMATION_TRANSITION_TIME = 6; + + /** Nombre max de joints supportés par une armature (limite matrice pool). */ + public static final int MAX_JOINTS = 128; + + /** + * Factory lazy : crée un Animator approprié au side runtime courant. + * Client → ClientAnimator (à créer Phase 2) + * Server → ServerAnimator (forké verbatim EF) + * + *Note Phase 0 : ClientAnimator n'est pas encore forké/créé + * (Phase 2). Tant que c'est le cas, on retourne ServerAnimator des deux + * côtés. Remplacer par {@code ClientAnimator::getAnimator} quand + * disponible.
+ */ + public static final Function implements Mesh, SoftBodyTr
public ClothSimulator.ClothObject createSimulationData(@Nullable SoftBodyTranslatable provider, ClothSimulatable simObject, ClothSimulator.ClothObjectBuilder simBuilder) {
return new ClothObject(simBuilder, provider == null ? this : provider, (Map