83 files forkés d'Epic Fight (~18k LOC). Base non-compilable en l'état.
Contenu extrait :
- math/ — OpenMatrix4f, Vec3f/4f/2f, QuaternionUtils, MathUtils, ...
- armature/ — Armature, Joint, JointTransform, HumanoidArmature
- anim/ — Animator, ServerAnimator, ClientAnimator, LivingMotion, ...
- anim/types/ — StaticAnimation, DynamicAnimation, MovementAnimation, LinkAnimation,
ConcurrentLinkAnimation, LayerOffAnimation, EntityState
- anim/client/ — Layer, ClientAnimator, JointMask
- mesh/ — SkinnedMesh, SingleGroupVertexBuilder, Mesh, HumanoidMesh, ...
- cloth/ — AbstractSimulator, ClothSimulator (dépendance transitive de StaticMesh)
- asset/ — JsonAssetLoader, AssetAccessor
- patch/ — EntityPatch, LivingEntityPatch, PlayerPatch, ClientPlayerPatch
- util/ — ParseUtil, TypeFlexibleHashMap
- exception/ — AssetLoadingException
- event/ — PatchedRenderersEvent, PrepareModelEvent, RegisterResourceLayersEvent
- render/ — TiedUpRenderTypes
Headers GPLv3 + attribution injectés sur tous les .java.
Package declarations fixées sur Armature.java et TiedUpRenderTypes.java.
115 imports résiduels à résoudre manuellement :
- yesman.epicfight.main (EpicFightMod, EpicFightSharedConstants) — 30
- yesman.epicfight.gameasset (Animations, Armatures, EpicFightSounds) — 12
- yesman.epicfight.api.physics + physics.ik (combat physics) — 16
- yesman.epicfight.network.* (combat packets) — 13
- yesman.epicfight.world.* (combat entity logic) — 10
- yesman.epicfight.config.ClientConfig — 3
- yesman.epicfight.skill, .client.gui, .particle, .collider — divers combat/UI
Stratégie fix (2-3 sem manuel) : strip usage combat, stubs pour refs
core (EpicFightMod → TiedUpMod, SharedConstants → TiedUpRigConstants,
ClientConfig → TiedUpAnimationConfig).
89 lines
2.5 KiB
Java
89 lines
2.5 KiB
Java
/*
|
|
* 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;
|
|
|
|
import java.util.List;
|
|
import java.util.function.Supplier;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
import org.joml.Vector4f;
|
|
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
|
|
|
import net.minecraft.client.renderer.MultiBufferSource;
|
|
import net.minecraft.client.renderer.RenderType;
|
|
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
|
import com.tiedup.remake.rig.render.TiedUpRenderTypes;
|
|
|
|
public abstract class MeshPart {
|
|
protected final List<VertexBuilder> verticies;
|
|
protected final Mesh.RenderProperties renderProperties;
|
|
protected final Supplier<OpenMatrix4f> vanillaPartTracer;
|
|
protected boolean isHidden;
|
|
|
|
public MeshPart(List<VertexBuilder> vertices, @Nullable Mesh.RenderProperties renderProperties, @Nullable Supplier<OpenMatrix4f> vanillaPartTracer) {
|
|
this.verticies = vertices;
|
|
this.renderProperties = renderProperties;
|
|
this.vanillaPartTracer = vanillaPartTracer;
|
|
}
|
|
|
|
public abstract void draw(PoseStack poseStack, VertexConsumer bufferbuilder, Mesh.DrawingFunction drawingFunction, int packedLight, float r, float g, float b, float a, int overlay);
|
|
|
|
public void setHidden(boolean hidden) {
|
|
this.isHidden = hidden;
|
|
}
|
|
|
|
public boolean isHidden() {
|
|
return this.isHidden;
|
|
}
|
|
|
|
public List<VertexBuilder> getVertices() {
|
|
return this.verticies;
|
|
}
|
|
|
|
public OpenMatrix4f getVanillaPartTransform() {
|
|
if (this.vanillaPartTracer == null) {
|
|
return null;
|
|
}
|
|
|
|
return this.vanillaPartTracer.get();
|
|
}
|
|
|
|
public VertexConsumer getBufferBuilder(RenderType renderType, MultiBufferSource bufferSource) {
|
|
if (this.renderProperties.customTexturePath() != null) {
|
|
return bufferSource.getBuffer(EpicFightRenderTypes.replaceTexture(this.renderProperties.customTexturePath(), renderType));
|
|
}
|
|
|
|
return bufferSource.getBuffer(renderType);
|
|
}
|
|
|
|
protected static final Vector4f COLOR = new Vector4f();
|
|
|
|
public Vector4f getColor(float r, float g, float b, float a) {
|
|
if (this.renderProperties != null && this.renderProperties.customColor() != null) {
|
|
COLOR.set(
|
|
this.renderProperties.customColor().x
|
|
, this.renderProperties.customColor().y
|
|
, this.renderProperties.customColor().z
|
|
, a
|
|
);
|
|
|
|
return COLOR;
|
|
} else {
|
|
COLOR.set(
|
|
r
|
|
, g
|
|
, b
|
|
, a
|
|
);
|
|
|
|
return COLOR;
|
|
}
|
|
}
|
|
} |