WIP: create TiedUpRigConstants, replace EpicFightMod/SharedConstants refs
- Nouveau TiedUpRigConstants.java : centralise MODID/LOGGER/identifier/prefix, constantes runtime (IS_DEV_ENV, A_TICK, GENERAL_ANIMATION_TRANSITION_TIME, MAX_JOINTS), factory ANIMATOR_PROVIDER (client/server split) + helpers stacktraceIfDevSide/logAndStacktraceIfDevSide. - sed global : EpicFightMod.* → TiedUpRigConstants.* - sed global : EpicFightSharedConstants.* → TiedUpRigConstants.* - sed global : EpicFightRenderTypes → TiedUpRenderTypes (class rename upstream) - Fix package declarations : Armature.java + TiedUpRenderTypes.java Résidus yesman.epicfight : 115 → 86 (-29) Reste : gameasset/physics/network/world/config/skill (combat deps à strip) + combat mode refs dans patch/LocalPlayerPatch + ClientPlayerPatch (Phase 2).
This commit is contained in:
@@ -132,4 +132,4 @@ public abstract class AbstractSimulator<KEY, B extends SimulationObjectBuilder,
|
||||
return this.isRunning;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ public interface ClothSimulatable extends SimulatableObject {
|
||||
public float getGravity();
|
||||
|
||||
ClothSimulator getClothSimulator();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,7 @@ import yesman.epicfight.api.physics.SimulationObject;
|
||||
import com.tiedup.remake.rig.math.MathUtils;
|
||||
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
import com.tiedup.remake.rig.math.Vec3f;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
/**
|
||||
* Referred to Matthias Müller's Ten minuates physics tutorial video number 14, 15
|
||||
@@ -65,8 +64,8 @@ import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
* https://www.youtube.com/@TenMinutePhysics
|
||||
**/
|
||||
public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObjectBuilder, SoftBodyTranslatable, ClothSimulatable, ClothSimulator.ClothObject> {
|
||||
public static final ResourceLocation PLAYER_CLOAK = EpicFightMod.identifier("ingame_cloak");
|
||||
public static final ResourceLocation MODELPREVIEWER_CLOAK = EpicFightMod.identifier("previewer_cloak");
|
||||
public static final ResourceLocation PLAYER_CLOAK = TiedUpRigConstants.identifier("ingame_cloak");
|
||||
public static final ResourceLocation MODELPREVIEWER_CLOAK = TiedUpRigConstants.identifier("previewer_cloak");
|
||||
private static final float SPATIAL_HASH_SPACING = 0.05F;
|
||||
|
||||
public static class ClothObjectBuilder extends SimulationObject.SimulationObjectBuilder {
|
||||
@@ -99,7 +98,7 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
private static boolean DRAW_OUTLINES = false;
|
||||
|
||||
public static void drawMeshColliders(boolean flag) {
|
||||
if (!EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
if (!TiedUpRigConstants.IS_DEV_ENV) {
|
||||
throw new IllegalStateException("Can't switch developer configuration in product environment.");
|
||||
}
|
||||
|
||||
@@ -107,7 +106,7 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
}
|
||||
|
||||
public static void drawNormalOffset(boolean flag) {
|
||||
if (!EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
if (!TiedUpRigConstants.IS_DEV_ENV) {
|
||||
throw new IllegalStateException("Can't switch developer configuration in product environment.");
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
}
|
||||
|
||||
public static void drawOutlines(boolean flag) {
|
||||
if (!EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
if (!TiedUpRigConstants.IS_DEV_ENV) {
|
||||
throw new IllegalStateException("Can't switch developer configuration in product environment.");
|
||||
}
|
||||
|
||||
@@ -208,7 +207,7 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
private static final Vec3f CENTRIFUGAL = new Vec3f();
|
||||
private static final Vec3f CIRCULAR = new Vec3f();
|
||||
|
||||
private static final OpenMatrix4f[] BOUND_ANIMATION_TRANSFORM = OpenMatrix4f.allocateMatrixArray(EpicFightSharedConstants.MAX_JOINTS);
|
||||
private static final OpenMatrix4f[] BOUND_ANIMATION_TRANSFORM = OpenMatrix4f.allocateMatrixArray(TiedUpRigConstants.MAX_JOINTS);
|
||||
private static final OpenMatrix4f COLLIDER_TRANSFORM = new OpenMatrix4f();
|
||||
private static final OpenMatrix4f TO_CENTRIFUGAL = new OpenMatrix4f();
|
||||
private static final OpenMatrix4f OBJECT_TRANSFORM = new OpenMatrix4f();
|
||||
@@ -243,7 +242,7 @@ public class ClothSimulator extends AbstractSimulator<ResourceLocation, ClothObj
|
||||
float deltaFrameTime = Minecraft.getInstance().getDeltaFrameTime();
|
||||
float subStebInvert = 1.0F / SUB_STEPS;
|
||||
float subSteppingDeltaTime = deltaFrameTime * subStebInvert;
|
||||
float gravity = simulatableObj.getGravity() * subSteppingDeltaTime * EpicFightSharedConstants.A_TICK;
|
||||
float gravity = simulatableObj.getGravity() * subSteppingDeltaTime * TiedUpRigConstants.A_TICK;
|
||||
|
||||
// Update circular force
|
||||
float yRot = Mth.wrapDegrees(Mth.rotLerp(partialTick, Mth.wrapDegrees(simulatableObj.getYRotO()), Mth.wrapDegrees(simulatableObj.getYRot())));
|
||||
|
||||
Reference in New Issue
Block a user