Phase 0 : compile SUCCESS (464 -> 0 errors)
Core data model du rig EF extractible compile désormais cleanly.
Changements clé :
1. AccessTransformer wiring (-80 errors)
- Copie EF accesstransformer.cfg dans resources/META-INF/
- Uncomment accessTransformer = file(...) dans build.gradle
- Débloque l'héritage des package-private RenderType.CompositeState +
RenderType.CompositeRenderType + RenderType.OutlineProperty nécessaires
à TiedUpRenderTypes.
2. Stubs compat rendering Phase 2
- PatchedEntityRenderer<E,T,M,R> : type param 4 pour PrepareModelEvent
- RenderItemBase : type marker pour PatchedRenderersEvent.RegisterItemRenderer
- LayerUtil + LayerProvider : interface fonctionnelle 5-params pour RegisterResourceLayersEvent
- PlayerPatch<T extends Player> : extends LivingEntityPatch
- ToolHolderArmature interface : leftTool/rightTool/backToolJoint()
3. Stubs compat combat Phase 2+
- AttackResult + ResultType enum : utilisé comme type pour StateFactor ATTACK_RESULT
- TrailInfo record : stubbé avec playable=false → particle trail jamais émis
- AttackAnimation.Phase.hand = InteractionHand.MAIN_HAND
- AttackAnimation.JointColliderPair : stub pour instanceof check
- AttackAnimation.getPhaseByTime(float) : retourne Phase neutre
- ActionAnimation.correctRootJoint() : no-op Phase 0
- ActionAnimation.BEGINNING_LOCATION + INITIAL_LOOK_VEC_DOT re-exposés comme AnimationVariables
4. Physics types alignés
- InverseKinematicsProvider extends SimulationProvider<...>
- InverseKinematicsSimulator implements PhysicsSimulator<Joint, ...>
- InverseKinematicsObject implements SimulationObject<...>
- InverseKinematicsBuilder extends SimulationObject.SimulationObjectBuilder
- ik.bake() signature : (Object, Object, boolean, boolean) conforme StaticAnimation usage
5. Mesh/compute stubs
- ComputeShaderSetup.TOTAL_POSES + TOTAL_NORMALS : OpenMatrix4f[MAX_JOINTS] pool
- ComputeShaderSetup.MeshPartBuffer inner class + destroyBuffers()
- ComputeShaderProvider.supportComputeShader() = false
- VanillaModelTransformer.VanillaMeshPartDefinition record minimal
- HumanoidMesh.getHumanoidArmorModel() : return null (armor rendering Phase 2)
6. Fixes typage / API
- TiedUpRenderTypes.prefix("x").toString() x15 : ResourceLocation -> String
- AnimationManager Logger : log4j -> slf4j
- TiedUpRigConstants.logAndStacktraceIfDevSide 4-arg overload + Throwable instead of RuntimeException
- LivingEntityPatch.getReach(InteractionHand) overload
- StaticAnimation(boolean, String, AssetAccessor) 3-arg overload
Result : compileJava -> BUILD SUCCESSFUL
Prochain jalon : runClient + verify rig se charge sans crash.
This commit is contained in:
@@ -99,16 +99,28 @@ public final class TiedUpRigConstants {
|
||||
|
||||
/**
|
||||
* En dev env : log via le consumer + throw l'exception.
|
||||
* En prod : log seulement. Équivalent EF {@code TiedUpRigConstants.logAndStacktraceIfDevSide}.
|
||||
* En prod : log seulement. Équivalent EF {@code EpicFightMod.logAndStacktraceIfDevSide}.
|
||||
*/
|
||||
public static <E extends RuntimeException> void logAndStacktraceIfDevSide(
|
||||
public static void logAndStacktraceIfDevSide(
|
||||
java.util.function.BiConsumer<Logger, String> logAction,
|
||||
String message,
|
||||
java.util.function.Function<String, E> exceptionFactory
|
||||
java.util.function.Function<String, ? extends Throwable> exceptionFactory
|
||||
) {
|
||||
logAndStacktraceIfDevSide(logAction, message, exceptionFactory, message);
|
||||
}
|
||||
|
||||
public static void logAndStacktraceIfDevSide(
|
||||
java.util.function.BiConsumer<Logger, String> logAction,
|
||||
String message,
|
||||
java.util.function.Function<String, ? extends Throwable> exceptionFactory,
|
||||
String stackTraceMessage
|
||||
) {
|
||||
logAction.accept(LOGGER, message);
|
||||
if (IS_DEV_ENV) {
|
||||
throw exceptionFactory.apply(message);
|
||||
Throwable t = exceptionFactory.apply(stackTraceMessage);
|
||||
if (t instanceof RuntimeException re) throw re;
|
||||
if (t instanceof Error err) throw err;
|
||||
throw new RuntimeException(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
@@ -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.anim.client.property;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
|
||||
import net.minecraft.core.particles.SimpleParticleType;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — combat weapon particle trail. Pas utilisé dans TiedUp
|
||||
* (bondage, pas d'armes actives), mais on garde l'API typée pour JSON compat.
|
||||
* {@code deserialize} retourne toujours un trail neutre non-playable, donc
|
||||
* le block dans StaticAnimation est court-circuité (voir {@link #playable()}).
|
||||
*/
|
||||
public record TrailInfo(String joint, SimpleParticleType particle, boolean playable) {
|
||||
public static TrailInfo deserialize(JsonElement element) {
|
||||
return new TrailInfo("", null, false);
|
||||
}
|
||||
|
||||
public Vec3 start() { return Vec3.ZERO; }
|
||||
public Vec3 end() { return Vec3.ZERO; }
|
||||
public float startTime() { return 0.0F; }
|
||||
public float endTime() { return 0.0F; }
|
||||
}
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
package com.tiedup.remake.rig.anim.types;
|
||||
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import com.tiedup.remake.rig.anim.AnimationVariables;
|
||||
import com.tiedup.remake.rig.anim.AnimationVariables.IndependentAnimationVariableKey;
|
||||
import com.tiedup.remake.rig.anim.property.AnimationProperty.ActionAnimationProperty;
|
||||
import com.tiedup.remake.rig.armature.Armature;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
@@ -19,6 +23,13 @@ import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
*/
|
||||
public class ActionAnimation extends MainFrameAnimation {
|
||||
|
||||
// Variables indépendantes propagées à MoveCoordFunctions (position de départ
|
||||
// en coord monde + produit scalaire lookVec initial pour lerp anim→world).
|
||||
public static final IndependentAnimationVariableKey<Vec3> BEGINNING_LOCATION =
|
||||
AnimationVariables.independent((animator) -> animator.getEntityPatch().getOriginal().position(), true);
|
||||
public static final IndependentAnimationVariableKey<Float> INITIAL_LOOK_VEC_DOT =
|
||||
AnimationVariables.independent((animator) -> 1.0F, true);
|
||||
|
||||
public ActionAnimation(float transitionTime, boolean isRepeat, String registryName, AssetAccessor<? extends Armature> armature) {
|
||||
super(transitionTime, isRepeat, registryName, armature);
|
||||
}
|
||||
@@ -34,4 +45,18 @@ public class ActionAnimation extends MainFrameAnimation {
|
||||
public <V> ActionAnimation addProperty(ActionAnimationProperty<V> property, V value) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub — LinkAnimation.modifyPose appelle ça pour aligner la root joint
|
||||
* en espace monde pendant la transition. No-op en TiedUp.
|
||||
*/
|
||||
public void correctRootJoint(
|
||||
com.tiedup.remake.rig.anim.types.LinkAnimation linkAnimation,
|
||||
com.tiedup.remake.rig.anim.Pose pose,
|
||||
com.tiedup.remake.rig.patch.LivingEntityPatch<?> entitypatch,
|
||||
float time,
|
||||
float partialTicks
|
||||
) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ 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;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
|
||||
@@ -44,13 +46,34 @@ public class AttackAnimation extends ActionAnimation {
|
||||
super(isRepeat, registryName, armature);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub — MoveCoordFunctions appelle ça pour calculer la reach mid-anim.
|
||||
* On retourne toujours une Phase neutre (mainHand, pas de colliders),
|
||||
* donc le reach retombe sur {@code entitypatch.getReach(MAIN_HAND)}.
|
||||
*/
|
||||
public Phase getPhaseByTime(float elapsedTime) {
|
||||
return new Phase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Phase d'attaque. Stub pour satisfaire {@code phase.getColliders()}
|
||||
* en JsonAssetLoader.
|
||||
* en JsonAssetLoader + {@code phase.hand} en MoveCoordFunctions.
|
||||
*/
|
||||
public static class Phase {
|
||||
public Object[] getColliders() {
|
||||
return new Object[0];
|
||||
public final InteractionHand hand = InteractionHand.MAIN_HAND;
|
||||
|
||||
public JointColliderPair[] getColliders() {
|
||||
return new JointColliderPair[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub — (Joint, Collider) pair pour les hitboxes combat. Non utilisé
|
||||
* en TiedUp, juste un placeholder typé pour que JsonAssetLoader:592 compile.
|
||||
*/
|
||||
public static class JointColliderPair {
|
||||
public com.tiedup.remake.rig.armature.Joint getFirst() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,11 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati
|
||||
this.filehash = getFileHash(this.resourceLocation);
|
||||
}
|
||||
|
||||
/* Resourcepack animations — transitionTime par défaut */
|
||||
public StaticAnimation(boolean isRepeat, String path, AssetAccessor<? extends Armature> armature) {
|
||||
this(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, path, armature);
|
||||
}
|
||||
|
||||
/* Resourcepack animations */
|
||||
public StaticAnimation(float transitionTime, boolean isRepeat, String path, AssetAccessor<? extends Armature> armature) {
|
||||
super(transitionTime, isRepeat);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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.armature.types;
|
||||
|
||||
import com.tiedup.remake.rig.armature.Joint;
|
||||
|
||||
/**
|
||||
* Interface pour armatures portant un outil (main gauche/droite + dos).
|
||||
* TiedUp gardera cette convention pour maintenir la compat avec les JSON EF
|
||||
* (rig équivalent : Tool_R, Tool_L, Tool_Back). Dans les faits, dans un
|
||||
* contexte bondage, "outil" = menottes, laisse, cage, etc.
|
||||
*/
|
||||
public interface ToolHolderArmature {
|
||||
Joint leftToolJoint();
|
||||
Joint rightToolJoint();
|
||||
Joint backToolJoint();
|
||||
}
|
||||
@@ -415,10 +415,11 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
this.drawParts(poseStack, bufferBuilder, drawingFunction, packedLight, r, g, b, a, overlay);
|
||||
}
|
||||
|
||||
// RIG : debug draw des colliders OBB strippé — OBBCollider stub minimal
|
||||
// sans logique de rendu (EF avait draw(PoseStack, BufferSource, int), strip
|
||||
// pour éviter de forker tout le pipeline RenderType combat).
|
||||
if (DRAW_MESH_COLLIDERS && this.clothColliders != null) {
|
||||
for (Pair<Function<ClothSimulatable, OpenMatrix4f>, ClothSimulator.ClothOBBCollider> entry : this.clothColliders) {
|
||||
entry.getSecond().draw(poseStack, Minecraft.getInstance().renderBuffers().bufferSource(), 0xFFFFFFFF);
|
||||
}
|
||||
// no-op Phase 0
|
||||
}
|
||||
|
||||
// Remove entity inverted world translation while keeping the scale
|
||||
|
||||
@@ -49,17 +49,9 @@ public class HumanoidMesh extends SkinnedMesh {
|
||||
}
|
||||
|
||||
public AssetAccessor<? extends SkinnedMesh> getHumanoidArmorModel(EquipmentSlot slot) {
|
||||
switch (slot) {
|
||||
case HEAD:
|
||||
return Meshes.HELMET;
|
||||
case CHEST:
|
||||
return Meshes.CHESTPLATE;
|
||||
case LEGS:
|
||||
return Meshes.LEGGINS;
|
||||
case FEET:
|
||||
return Meshes.BOOTS;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
// RIG : Meshes.{HELMET,CHESTPLATE,LEGGINS,BOOTS} strippés en Phase 0 (armor rendering
|
||||
// hors scope bondage V1). Re-implém Phase 2 si besoin de rendre armures vanilla
|
||||
// sur le rig — pour l'instant retour null = armor rendering off.
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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.mesh.transformer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.minecraft.client.model.geom.ModelPart;
|
||||
|
||||
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
import com.tiedup.remake.rig.mesh.Mesh;
|
||||
import com.tiedup.remake.rig.mesh.MeshPartDefinition;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — le transformer complet EF (HumanoidModel → SkinnedMesh
|
||||
* runtime conversion) n'est pas porté : TiedUp utilise exclusivement GLB +
|
||||
* JSON EF pour la définition des meshes. Seule la record
|
||||
* {@link VanillaMeshPartDefinition} est conservée, car référencée par
|
||||
* {@code JsonAssetLoader} pour instancier les parts nommées.
|
||||
*
|
||||
* <p>Phase 2 : décider si on fork le transformer pour garder la compat runtime
|
||||
* avec les modèles vanilla (armor rendering), ou si on reroute vers GLB only.</p>
|
||||
*/
|
||||
public class VanillaModelTransformer {
|
||||
|
||||
public record VanillaMeshPartDefinition(
|
||||
String partName,
|
||||
Mesh.RenderProperties renderProperties,
|
||||
List<String> path,
|
||||
OpenMatrix4f invertedParentTransform,
|
||||
ModelPart root
|
||||
) implements MeshPartDefinition {
|
||||
|
||||
public static MeshPartDefinition of(String partName, Mesh.RenderProperties renderProperties) {
|
||||
return new VanillaMeshPartDefinition(partName, renderProperties, null, null, null);
|
||||
}
|
||||
|
||||
public static MeshPartDefinition of(String partName) {
|
||||
return new VanillaMeshPartDefinition(partName, null, null, null, null);
|
||||
}
|
||||
|
||||
public static MeshPartDefinition of(String partName, List<String> path, OpenMatrix4f invertedParentTransform, ModelPart root) {
|
||||
return new VanillaMeshPartDefinition(partName, null, path, invertedParentTransform, root);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Supplier<OpenMatrix4f> getModelPartAnimationProvider() {
|
||||
return () -> null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ package com.tiedup.remake.rig.patch;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
@@ -65,6 +66,10 @@ public abstract class LivingEntityPatch<T extends LivingEntity> extends EntityPa
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
public float getReach(InteractionHand hand) {
|
||||
return getReach();
|
||||
}
|
||||
|
||||
public float getYRot() {
|
||||
return this.original.getYRot();
|
||||
}
|
||||
|
||||
17
src/main/java/com/tiedup/remake/rig/patch/PlayerPatch.java
Normal file
17
src/main/java/com/tiedup/remake/rig/patch/PlayerPatch.java
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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.patch;
|
||||
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — patch de capability attaché à un {@link Player}.
|
||||
* Re-implém complète Phase 2 (séparation ClientPlayerPatch / ServerPlayerPatch,
|
||||
* input handling, first-person, cam sync).
|
||||
*/
|
||||
public abstract class PlayerPatch<T extends Player> extends LivingEntityPatch<T> {
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
package com.tiedup.remake.rig.physics.ik;
|
||||
|
||||
import com.tiedup.remake.rig.physics.SimulationProvider;
|
||||
import com.tiedup.remake.rig.physics.ik.InverseKinematicsSimulator.InverseKinematicsBuilder;
|
||||
import com.tiedup.remake.rig.physics.ik.InverseKinematicsSimulator.InverseKinematicsObject;
|
||||
|
||||
@@ -19,13 +20,15 @@ import com.tiedup.remake.rig.physics.ik.InverseKinematicsSimulator.InverseKinema
|
||||
* Conservé comme interface vide pour que {@code StaticAnimation
|
||||
* implements InverseKinematicsProvider} compile.</p>
|
||||
*/
|
||||
public interface InverseKinematicsProvider {
|
||||
public interface InverseKinematicsProvider
|
||||
extends SimulationProvider<InverseKinematicsSimulatable, InverseKinematicsObject, InverseKinematicsBuilder, InverseKinematicsProvider> {
|
||||
|
||||
/**
|
||||
* Crée les données de simulation IK. Stub par défaut : no-op.
|
||||
* Surchargé dans les classes qui auraient réellement de l'IK (aucune
|
||||
* en TiedUp).
|
||||
*/
|
||||
@Override
|
||||
default InverseKinematicsObject createSimulationData(
|
||||
InverseKinematicsProvider provider,
|
||||
InverseKinematicsSimulatable simOwner,
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
|
||||
package com.tiedup.remake.rig.physics.ik;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
import com.tiedup.remake.rig.armature.Joint;
|
||||
import com.tiedup.remake.rig.physics.PhysicsSimulator;
|
||||
import com.tiedup.remake.rig.physics.SimulationObject;
|
||||
|
||||
/**
|
||||
* RIG stub. Upstream EF : simulateur d'inverse kinematics (solveur CCD
|
||||
* ou FABRIK) utilisé pour attacher des membres à des points cibles
|
||||
@@ -15,15 +22,24 @@ package com.tiedup.remake.rig.physics.ik;
|
||||
* AnimationProperty compilent. Les nested types sont des stubs sans
|
||||
* logique.</p>
|
||||
*/
|
||||
public class InverseKinematicsSimulator {
|
||||
public class InverseKinematicsSimulator implements PhysicsSimulator<Joint, InverseKinematicsSimulator.InverseKinematicsBuilder, InverseKinematicsProvider, InverseKinematicsSimulatable, InverseKinematicsSimulator.InverseKinematicsObject> {
|
||||
|
||||
public static class InverseKinematicsObject {
|
||||
@Override public void tick(InverseKinematicsSimulatable object) {}
|
||||
@Override public boolean isRunning(Joint key) { return false; }
|
||||
@Override public void runUntil(Joint key, InverseKinematicsProvider provider, InverseKinematicsBuilder builder, BooleanSupplier when) {}
|
||||
@Override public void runWhen(Joint key, InverseKinematicsProvider provider, InverseKinematicsBuilder builder, BooleanSupplier when) {}
|
||||
@Override public void restart(Joint key) {}
|
||||
@Override public void stop(Joint key) {}
|
||||
@Override public Optional<InverseKinematicsObject> getRunningObject(Joint key) { return Optional.empty(); }
|
||||
|
||||
|
||||
public static class InverseKinematicsObject implements SimulationObject<InverseKinematicsBuilder, InverseKinematicsProvider, InverseKinematicsSimulatable> {
|
||||
public InverseKinematicsObject(InverseKinematicsBuilder builder) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
public static class InverseKinematicsBuilder {
|
||||
public static class InverseKinematicsBuilder extends SimulationObject.SimulationObjectBuilder {
|
||||
// no-op stub
|
||||
}
|
||||
|
||||
@@ -35,8 +51,8 @@ public class InverseKinematicsSimulator {
|
||||
public BakedInverseKinematicsDefinition bake(
|
||||
Object armature,
|
||||
Object jointTransforms,
|
||||
float correctY,
|
||||
float correctZ) {
|
||||
boolean correctY,
|
||||
boolean correctZ) {
|
||||
return new BakedInverseKinematicsDefinition();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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.render;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — renderer EF substituant {@code EntityRenderer} vanilla
|
||||
* pour les entités riggées. Implémentation complète Phase 2 (pipeline :
|
||||
* pose → armature → skinning → VertexConsumer).
|
||||
*/
|
||||
public abstract class PatchedEntityRenderer<E, T, M, R> {
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
private static final BiFunction<ResourceLocation, RenderStateShard.CullStateShard, RenderType> TRIANGULATED_OUTLINE =
|
||||
Util.memoize((texLocation, cullStateShard) -> {
|
||||
return RenderType.create(
|
||||
TiedUpRigConstants.prefix("outline"),
|
||||
TiedUpRigConstants.prefix("outline").toString(),
|
||||
DefaultVertexFormat.POSITION_COLOR_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -288,7 +288,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ENTITY_UI_COLORED =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("ui_color")
|
||||
TiedUpRigConstants.prefix("ui_color").toString()
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -304,7 +304,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_UI_TEXTURE = Util.memoize(
|
||||
(textureLocation) -> create(
|
||||
TiedUpRigConstants.prefix("ui_texture")
|
||||
TiedUpRigConstants.prefix("ui_texture").toString()
|
||||
, DefaultVertexFormat.POSITION_TEX
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -321,7 +321,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType OBB = create(
|
||||
TiedUpRigConstants.prefix("debug_collider")
|
||||
TiedUpRigConstants.prefix("debug_collider").toString()
|
||||
, DefaultVertexFormat.POSITION_COLOR_NORMAL
|
||||
, VertexFormat.Mode.LINE_STRIP
|
||||
, 256
|
||||
@@ -339,7 +339,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType DEBUG_QUADS = create(
|
||||
TiedUpRigConstants.prefix("debug_quad")
|
||||
TiedUpRigConstants.prefix("debug_quad").toString()
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -355,7 +355,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType GUI_TRIANGLE = create(
|
||||
TiedUpRigConstants.prefix("gui_triangle")
|
||||
TiedUpRigConstants.prefix("gui_triangle").toString()
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.TRIANGLES
|
||||
, 256
|
||||
@@ -370,7 +370,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> OVERLAY_MODEL = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
TiedUpRigConstants.prefix("overlay_model"),
|
||||
TiedUpRigConstants.prefix("overlay_model").toString(),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -391,7 +391,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ENTITY_AFTERIMAGE_WHITE =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("entity_afterimage"),
|
||||
TiedUpRigConstants.prefix("entity_afterimage").toString(),
|
||||
DefaultVertexFormat.PARTICLE,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -410,7 +410,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_AFTERIMAGE_WHITE =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("item_afterimage"),
|
||||
TiedUpRigConstants.prefix("item_afterimage").toString(),
|
||||
DefaultVertexFormat.PARTICLE,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -429,7 +429,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_PARTICLE = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
TiedUpRigConstants.prefix("entity_particle"),
|
||||
TiedUpRigConstants.prefix("entity_particle").toString(),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -449,7 +449,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_PARTICLE =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("item_particle"),
|
||||
TiedUpRigConstants.prefix("item_particle").toString(),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -468,7 +468,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_PARTICLE_STENCIL = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
TiedUpRigConstants.prefix("entity_particle_stencil"),
|
||||
TiedUpRigConstants.prefix("entity_particle_stencil").toString(),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -484,7 +484,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_PARTICLE_STENCIL =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("item_particle_stencil"),
|
||||
TiedUpRigConstants.prefix("item_particle_stencil").toString(),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -499,7 +499,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType.CompositeRenderType BLOCK_HIGHLIGHT =
|
||||
create(
|
||||
TiedUpRigConstants.prefix("block_highlight"),
|
||||
TiedUpRigConstants.prefix("block_highlight").toString(),
|
||||
DefaultVertexFormat.BLOCK,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -627,7 +627,7 @@ public final class TiedUpRenderTypes extends RenderType {
|
||||
CompositeRenderType glintRenderType = WORLD_RENDERTYPES_COLORED_GLINT.computeIfAbsent(
|
||||
owner,
|
||||
k -> create(
|
||||
TiedUpRigConstants.prefix("colored_glint"),
|
||||
TiedUpRigConstants.prefix("colored_glint").toString(),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
|
||||
@@ -20,6 +20,11 @@ public final class ComputeShaderProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Stub : compute shader jamais supporté en Phase 0 → CPU skinning uniquement. */
|
||||
public static boolean supportComputeShader() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Stub no-op pour Iris init (référence pour IRISCompat éventuel). */
|
||||
public static void initIris() {
|
||||
// no-op Phase 0
|
||||
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.client.renderer.RenderType;
|
||||
import com.tiedup.remake.rig.mesh.Mesh;
|
||||
import com.tiedup.remake.rig.armature.Armature;
|
||||
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
/**
|
||||
* RIG stub. Upstream EF : ComputeShaderSetup = binding OpenGL 4.3+ compute
|
||||
@@ -25,6 +26,28 @@ import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
*/
|
||||
public abstract class ComputeShaderSetup {
|
||||
|
||||
/** Pool de matrices réutilisées par SkinnedMesh pour le CPU skinning. */
|
||||
public static final OpenMatrix4f[] TOTAL_POSES = new OpenMatrix4f[TiedUpRigConstants.MAX_JOINTS];
|
||||
public static final OpenMatrix4f[] TOTAL_NORMALS = new OpenMatrix4f[TiedUpRigConstants.MAX_JOINTS];
|
||||
|
||||
static {
|
||||
for (int i = 0; i < TiedUpRigConstants.MAX_JOINTS; i++) {
|
||||
TOTAL_POSES[i] = new OpenMatrix4f();
|
||||
TOTAL_NORMALS[i] = new OpenMatrix4f();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub inner class — utilisé par {@code SkinnedMesh.SkinnedMeshPart.partVBO}.
|
||||
* Le CPU path ne crée jamais d'instance, ne pointe que le type.
|
||||
*/
|
||||
public static class MeshPartBuffer {
|
||||
public void destroyBuffers() {}
|
||||
}
|
||||
|
||||
/** Libération des buffers VBO (GPU path). No-op sur le stub. */
|
||||
public void destroyBuffers() {}
|
||||
|
||||
/** No-op stub : le chemin GPU compute n'est jamais emprunté. */
|
||||
public void drawWithShader(
|
||||
Object mesh,
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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.render.item;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — renderer pour les items (EF : weapons avec trail,
|
||||
* tools). TiedUp : re-implém Phase 3 pour menottes/laisse/cage rendues
|
||||
* attachées aux joints Tool_R/Tool_L via ItemStack injection.
|
||||
*/
|
||||
public abstract class RenderItemBase {
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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.render.layer;
|
||||
|
||||
import net.minecraft.client.model.EntityModel;
|
||||
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
||||
import com.tiedup.remake.rig.mesh.SkinnedMesh;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
/**
|
||||
* Stub RIG Phase 0 — registry de layers additionnels (armor, glow, cape...)
|
||||
* pour renderers EF. Implém complète Phase 2.
|
||||
*/
|
||||
public class LayerUtil {
|
||||
|
||||
@FunctionalInterface
|
||||
public interface LayerProvider<
|
||||
E extends LivingEntity,
|
||||
T extends LivingEntityPatch<E>,
|
||||
M extends EntityModel<E>,
|
||||
R extends LivingEntityRenderer<E, M>,
|
||||
AM extends SkinnedMesh
|
||||
> {
|
||||
void addLayer(R renderer);
|
||||
}
|
||||
}
|
||||
42
src/main/java/com/tiedup/remake/rig/util/AttackResult.java
Normal file
42
src/main/java/com/tiedup/remake/rig/util/AttackResult.java
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 — encodage résultat d'attaque combat EF. Utilisé uniquement
|
||||
* comme type pour {@code ATTACK_RESULT} StateFactor côté EntityState. Pas de
|
||||
* logique combat dans TiedUp — logique porté Phase 2 si besoin hitboxes menottes.
|
||||
*/
|
||||
public class AttackResult {
|
||||
public final ResultType resultType;
|
||||
public final float damage;
|
||||
|
||||
public AttackResult(ResultType resultType, float damage) {
|
||||
this.resultType = resultType;
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public static AttackResult success(float damage) { return new AttackResult(ResultType.SUCCESS, damage); }
|
||||
public static AttackResult blocked(float damage) { return new AttackResult(ResultType.BLOCKED, damage); }
|
||||
public static AttackResult missed(float damage) { return new AttackResult(ResultType.MISSED, damage); }
|
||||
public static AttackResult of(ResultType resultType, float damage) { return new AttackResult(resultType, damage); }
|
||||
|
||||
public static enum ResultType {
|
||||
SUCCESS(true, true), MISSED(false, false), BLOCKED(false, true);
|
||||
|
||||
boolean dealtDamage;
|
||||
boolean shouldCount;
|
||||
|
||||
ResultType(boolean dealtDamage, boolean countAsHitEntity) {
|
||||
this.dealtDamage = dealtDamage;
|
||||
this.shouldCount = countAsHitEntity;
|
||||
}
|
||||
|
||||
public boolean dealtDamage() { return this.dealtDamage; }
|
||||
public boolean shouldCount() { return this.shouldCount; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user