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:
114
src/main/java/com/tiedup/remake/rig/TiedUpRigConstants.java
Normal file
114
src/main/java/com/tiedup/remake/rig/TiedUpRigConstants.java
Normal file
@@ -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 :
|
||||
*
|
||||
* <ul>
|
||||
* <li>{@link #MODID} — ID du mod TiedUp (tiedup)</li>
|
||||
* <li>{@link #LOGGER} — logger commun RIG</li>
|
||||
* <li>{@link #identifier(String)} — helper ResourceLocation</li>
|
||||
* <li>{@link #ANIMATOR_PROVIDER} — factory client/server split pour instancier l'Animator</li>
|
||||
* <li>{@link #isPhysicalClient()} — détection side runtime</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>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}.</p>
|
||||
*/
|
||||
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)
|
||||
*
|
||||
* <p><b>Note Phase 0</b> : 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.</p>
|
||||
*/
|
||||
public static final Function<LivingEntityPatch<?>, Animator> ANIMATOR_PROVIDER =
|
||||
isPhysicalClient()
|
||||
? ServerAnimator::getAnimator // TODO Phase 2 : ClientAnimator::getAnimator
|
||||
: ServerAnimator::getAnimator;
|
||||
|
||||
private TiedUpRigConstants() {}
|
||||
|
||||
public static ResourceLocation identifier(String path) {
|
||||
return ResourceLocation.fromNamespaceAndPath(MODID, path);
|
||||
}
|
||||
|
||||
/** Alias d'{@link #identifier(String)} — équivalent TiedUpRigConstants.prefix upstream. */
|
||||
public static ResourceLocation prefix(String path) {
|
||||
return identifier(path);
|
||||
}
|
||||
|
||||
public static boolean isPhysicalClient() {
|
||||
return FMLEnvironment.dist == Dist.CLIENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* En dev env : log un message + throw l'exception fournie.
|
||||
* En prod : log WARN seulement. Équivalent EF {@code TiedUpRigConstants.stacktraceIfDevSide}.
|
||||
*/
|
||||
public static <E extends RuntimeException> void stacktraceIfDevSide(
|
||||
String message,
|
||||
java.util.function.Function<String, E> exceptionFactory
|
||||
) {
|
||||
if (IS_DEV_ENV) {
|
||||
throw exceptionFactory.apply(message);
|
||||
} else {
|
||||
LOGGER.warn(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* En dev env : log via le consumer + throw l'exception.
|
||||
* En prod : log seulement. Équivalent EF {@code TiedUpRigConstants.logAndStacktraceIfDevSide}.
|
||||
*/
|
||||
public static <E extends RuntimeException> void logAndStacktraceIfDevSide(
|
||||
java.util.function.BiConsumer<Logger, String> logAction,
|
||||
String message,
|
||||
java.util.function.Function<String, E> exceptionFactory
|
||||
) {
|
||||
logAction.accept(LOGGER, message);
|
||||
if (IS_DEV_ENV) {
|
||||
throw exceptionFactory.apply(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,4 +137,4 @@ public class AnimationClip {
|
||||
public float getClipTime() {
|
||||
return this.clipTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,8 +62,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.network.EpicFightNetworkManager;
|
||||
import yesman.epicfight.network.client.CPCheckAnimationRegistryMatches;
|
||||
import yesman.epicfight.network.server.SPDatapackSync;
|
||||
@@ -87,9 +86,9 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
public static boolean checkNull(AssetAccessor<? extends StaticAnimation> animation) {
|
||||
if (animation == null || animation.isEmpty()) {
|
||||
if (animation != null) {
|
||||
EpicFightMod.stacktraceIfDevSide("Empty animation accessor: " + animation.registryName(), NoSuchElementException::new);
|
||||
TiedUpRigConstants.stacktraceIfDevSide("Empty animation accessor: " + animation.registryName(), NoSuchElementException::new);
|
||||
} else {
|
||||
EpicFightMod.stacktraceIfDevSide("Null animation accessor", NoSuchElementException::new);
|
||||
TiedUpRigConstants.stacktraceIfDevSide("Null animation accessor", NoSuchElementException::new);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -151,7 +150,7 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
|
||||
@Override
|
||||
protected List<ResourceLocation> prepare(ResourceManager resourceManager, ProfilerFiller profilerIn) {
|
||||
if (!EpicFightSharedConstants.isPhysicalClient() && serverResourceManager == null) {
|
||||
if (!TiedUpRigConstants.isPhysicalClient() && serverResourceManager == null) {
|
||||
serverResourceManager = resourceManager;
|
||||
}
|
||||
|
||||
@@ -206,9 +205,9 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
JsonElement jsonelement = GsonHelper.fromJson(GSON, reader, JsonElement.class);
|
||||
this.readResourcepackAnimation(animId, jsonelement.getAsJsonObject());
|
||||
} catch (IOException | JsonParseException | IllegalArgumentException resourceReadException) {
|
||||
EpicFightMod.LOGGER.error("Couldn't parse animation data from {}", animId, resourceReadException);
|
||||
TiedUpRigConstants.LOGGER.error("Couldn't parse animation data from {}", animId, resourceReadException);
|
||||
} catch (Exception e) {
|
||||
EpicFightMod.LOGGER.error("Failed at constructing {}", animId, e);
|
||||
TiedUpRigConstants.LOGGER.error("Failed at constructing {}", animId, e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -221,13 +220,13 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
MutableBoolean init = new MutableBoolean(true);
|
||||
|
||||
if (entry.getValue() == null || entry.getValue().getAccessor() == null) {
|
||||
EpicFightMod.logAndStacktraceIfDevSide(Logger::error, "Invalid animation implementation: " + entry.getKey(), AssetLoadingException::new);
|
||||
TiedUpRigConstants.logAndStacktraceIfDevSide(Logger::error, "Invalid animation implementation: " + entry.getKey(), AssetLoadingException::new);
|
||||
init.set(false);
|
||||
}
|
||||
|
||||
entry.getValue().getSubAnimations().forEach((subAnimation) -> {
|
||||
if (subAnimation == null || subAnimation.get() == null) {
|
||||
EpicFightMod.logAndStacktraceIfDevSide(Logger::error, "Invalid sub animation implementation: " + entry.getKey(), AssetLoadingException::new);
|
||||
TiedUpRigConstants.logAndStacktraceIfDevSide(Logger::error, "Invalid sub animation implementation: " + entry.getKey(), AssetLoadingException::new);
|
||||
init.set(false);
|
||||
}
|
||||
});
|
||||
@@ -247,7 +246,7 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
.forEach(accessor -> {
|
||||
accessor.doOrThrow(StaticAnimation::postInit);
|
||||
|
||||
if (EpicFightSharedConstants.isPhysicalClient()) {
|
||||
if (TiedUpRigConstants.isPhysicalClient()) {
|
||||
AnimationManager.readAnimationProperties(accessor.get());
|
||||
}
|
||||
});
|
||||
@@ -278,7 +277,7 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
}
|
||||
|
||||
public static ResourceManager getAnimationResourceManager() {
|
||||
return EpicFightSharedConstants.isPhysicalClient() ? Minecraft.getInstance().getResourceManager() : serverResourceManager;
|
||||
return TiedUpRigConstants.isPhysicalClient() ? Minecraft.getInstance().getResourceManager() : serverResourceManager;
|
||||
}
|
||||
|
||||
public int getResourcepackAnimationCount() {
|
||||
@@ -317,7 +316,7 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
try {
|
||||
return InstantiateInvoker.invoke(invocationCommand, StaticAnimation.class).getResult();
|
||||
} catch (Exception e) {
|
||||
EpicFightMod.LOGGER.warn("Failed at creating animation from server resource pack");
|
||||
TiedUpRigConstants.LOGGER.warn("Failed at creating animation from server resource pack");
|
||||
e.printStackTrace();
|
||||
return Animations.EMPTY_ANIMATION;
|
||||
}
|
||||
@@ -401,7 +400,7 @@ public class AnimationManager extends SimplePreparableReloadListener<List<Resour
|
||||
if (NO_WARNING_MODID.contains(rl.getNamespace())) {
|
||||
return;
|
||||
} else {
|
||||
EpicFightMod.logAndStacktraceIfDevSide(
|
||||
TiedUpRigConstants.logAndStacktraceIfDevSide(
|
||||
Logger::error
|
||||
, "Datapack animation reading failed: No constructor information has provided: " + rl
|
||||
, IllegalStateException::new
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.tiedup.remake.rig.anim.types.DynamicAnimation;
|
||||
import com.tiedup.remake.rig.anim.types.StaticAnimation;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
import yesman.epicfight.gameasset.Animations;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
public class AnimationPlayer {
|
||||
@@ -42,7 +42,7 @@ public class AnimationPlayer {
|
||||
playbackSpeed = playSpeedModifier.modify(currentPlay, entitypatch, playbackSpeed, this.prevElapsedTime, this.elapsedTime);
|
||||
}
|
||||
|
||||
this.elapsedTime += EpicFightSharedConstants.A_TICK * playbackSpeed * (this.isReversed() && currentPlay.canBePlayedReverse() ? -1.0F : 1.0F);
|
||||
this.elapsedTime += TiedUpRigConstants.A_TICK * playbackSpeed * (this.isReversed() && currentPlay.canBePlayedReverse() ? -1.0F : 1.0F);
|
||||
PlaybackTimeModifier playTimeModifier = currentPlayStatic.getProperty(StaticAnimationProperty.ELAPSED_TIME_MODIFIER).orElse(null);
|
||||
|
||||
if (playTimeModifier != null) {
|
||||
@@ -159,4 +159,4 @@ public class AnimationPlayer {
|
||||
public String toString() {
|
||||
return this.getAnimation() + " " + this.prevElapsedTime + " " + this.elapsedTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
public abstract class Animator {
|
||||
@@ -116,7 +116,7 @@ public abstract class Animator {
|
||||
|
||||
public void addLivingAnimation(LivingMotion livingMotion, AssetAccessor<? extends StaticAnimation> animation) {
|
||||
if (AnimationManager.checkNull(animation)) {
|
||||
EpicFightMod.LOGGER.warn("Unable to put an empty animation for " + livingMotion);
|
||||
TiedUpRigConstants.LOGGER.warn("Unable to put an empty animation for " + livingMotion);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -142,4 +142,4 @@ public abstract class Animator {
|
||||
public void resetLivingAnimations() {
|
||||
this.livingAnimations.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,4 @@ public class Keyframe {
|
||||
public static Keyframe empty() {
|
||||
return new Keyframe(0.0F, JointTransform.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ public interface LivingMotion extends ExtendableEnum {
|
||||
|
||||
return this == livingMotion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ public enum LivingMotions implements LivingMotion {
|
||||
public int universalOrdinal() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,4 +110,4 @@ public class Pose {
|
||||
public enum LoadOperation {
|
||||
SET, OVERWRITE, APPEND_ABSENT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,4 +157,4 @@ public class ServerAnimator extends Animator {
|
||||
public void setHardPause(boolean paused) {
|
||||
this.hardPaused = paused;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.tiedup.remake.rig.anim.types.StaticAnimation;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
import com.tiedup.remake.rig.util.PacketBufferCodec;
|
||||
import com.tiedup.remake.rig.util.datastruct.ClearableIdMapper;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.network.EpicFightNetworkManager;
|
||||
import yesman.epicfight.network.client.CPAnimationVariablePacket;
|
||||
import yesman.epicfight.network.common.AnimationVariablePacket;
|
||||
@@ -37,7 +37,7 @@ public interface SynchedAnimationVariableKey<T> {
|
||||
return new SynchedIndependentAnimationVariableKey<> (defaultValueSupplier, mutable, codec);
|
||||
}
|
||||
|
||||
public static final ResourceLocation BY_ID_REGISTRY = EpicFightMod.identifier("variablekeytoid");
|
||||
public static final ResourceLocation BY_ID_REGISTRY = TiedUpRigConstants.identifier("variablekeytoid");
|
||||
|
||||
public static class SynchedAnimationVariableKeyCallbacks implements IForgeRegistry.BakeCallback<SynchedAnimationVariableKey<?>>, IForgeRegistry.CreateCallback<SynchedAnimationVariableKey<?>>, IForgeRegistry.ClearCallback<SynchedAnimationVariableKey<?>> {
|
||||
private static final SynchedAnimationVariableKeyCallbacks INSTANCE = new SynchedAnimationVariableKeyCallbacks();
|
||||
@@ -127,4 +127,4 @@ public interface SynchedAnimationVariableKey<T> {
|
||||
return this.packetBufferCodec;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ import net.minecraftforge.registries.RegistryBuilder;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import com.tiedup.remake.rig.anim.SynchedAnimationVariableKey.SynchedIndependentAnimationVariableKey;
|
||||
import com.tiedup.remake.rig.util.PacketBufferCodec;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class SynchedAnimationVariableKeys {
|
||||
private static final Supplier<RegistryBuilder<SynchedAnimationVariableKey<?>>> BUILDER = () -> new RegistryBuilder<SynchedAnimationVariableKey<?>>().addCallback(SynchedAnimationVariableKey.getRegistryCallback());
|
||||
|
||||
public static final DeferredRegister<SynchedAnimationVariableKey<?>> SYNCHED_ANIMATION_VARIABLE_KEYS = DeferredRegister.create(EpicFightMod.identifier("synched_animation_variable_keys"), EpicFightMod.MODID);
|
||||
public static final DeferredRegister<SynchedAnimationVariableKey<?>> SYNCHED_ANIMATION_VARIABLE_KEYS = DeferredRegister.create(TiedUpRigConstants.identifier("synched_animation_variable_keys"), TiedUpRigConstants.MODID);
|
||||
public static final Supplier<IForgeRegistry<SynchedAnimationVariableKey<?>>> REGISTRY = SYNCHED_ANIMATION_VARIABLE_KEYS.makeRegistry(BUILDER);
|
||||
|
||||
public static final RegistryObject<SynchedIndependentAnimationVariableKey<Vec3>> DESTINATION = SYNCHED_ANIMATION_VARIABLE_KEYS.register("destination", () ->
|
||||
|
||||
@@ -351,4 +351,4 @@ public class TransformSheet {
|
||||
public static record InterpolationInfo(int prev, int next, float delta) {
|
||||
public static final InterpolationInfo INVALID = new InterpolationInfo(-1, -1, -1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.tiedup.remake.rig.anim.client.property.LayerInfo;
|
||||
import com.tiedup.remake.rig.anim.client.property.TrailInfo;
|
||||
import com.tiedup.remake.rig.exception.AssetLoadingException;
|
||||
import com.tiedup.remake.rig.util.ParseUtil;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
public class AnimationSubFileReader {
|
||||
@@ -66,7 +66,7 @@ public class AnimationSubFileReader {
|
||||
try {
|
||||
subFileType.apply(inputstream, animation);
|
||||
} catch (JsonParseException e) {
|
||||
EpicFightMod.LOGGER.warn("Can't read sub file " + subFileType.directory + " for " + animation);
|
||||
TiedUpRigConstants.LOGGER.warn("Can't read sub file " + subFileType.directory + " for " + animation);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public class AnimationSubFileReader {
|
||||
String type = GsonHelper.getAsString(jointMaskEntry, "type");
|
||||
|
||||
if (!type.contains(":")) {
|
||||
type = (new StringBuilder(EpicFightMod.MODID)).append(":").append(type).toString();
|
||||
type = (new StringBuilder(TiedUpRigConstants.MODID)).append(":").append(type).toString();
|
||||
}
|
||||
|
||||
if (livingMotionName.equals("ALL")) {
|
||||
|
||||
@@ -45,7 +45,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.network.common.AnimatorControlPacket;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
@@ -141,7 +141,7 @@ public class ClientAnimator extends Animator {
|
||||
@Override
|
||||
public void addLivingAnimation(LivingMotion livingMotion, AssetAccessor<? extends StaticAnimation> animation) {
|
||||
if (AnimationManager.checkNull(animation)) {
|
||||
EpicFightMod.LOGGER.warn("Unable to put an empty animation for " + livingMotion);
|
||||
TiedUpRigConstants.LOGGER.warn("Unable to put an empty animation for " + livingMotion);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -608,4 +608,4 @@ public class ClientAnimator extends Animator {
|
||||
|
||||
return new EntityState(stateMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,4 +356,4 @@ public class Layer {
|
||||
return this.ordinal() >= priority.ordinal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,4 @@ public class ClientAnimationProperties {
|
||||
* Multilayer for living animations (e.g. Greatsword holding animation should be played simultaneously with jumping animation)
|
||||
*/
|
||||
public static final StaticAnimationProperty<DirectStaticAnimation> MULTILAYER_ANIMATION = new StaticAnimationProperty<DirectStaticAnimation> ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,4 +101,4 @@ public class JointMask {
|
||||
return jointMaskSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,4 +106,4 @@ public class JointMaskEntry {
|
||||
return new JointMaskEntry(this.defaultMask, this.masks);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
import com.tiedup.remake.rig.anim.client.property.JointMask.BindModifier;
|
||||
import com.tiedup.remake.rig.anim.client.property.JointMask.JointMaskSet;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class JointMaskReloadListener extends SimpleJsonResourceReloadListener {
|
||||
private static final BiMap<ResourceLocation, JointMaskSet> JOINT_MASKS = HashBiMap.create();
|
||||
private static final Map<String, JointMask.BindModifier> BIND_MODIFIERS = Maps.newHashMap();
|
||||
private static final ResourceLocation NONE_MASK = EpicFightMod.identifier("none");
|
||||
private static final ResourceLocation NONE_MASK = TiedUpRigConstants.identifier("none");
|
||||
|
||||
static {
|
||||
BIND_MODIFIERS.put("keep_child_locrot", JointMask.KEEP_CHILD_LOCROT);
|
||||
@@ -84,4 +84,4 @@ public class JointMaskReloadListener extends SimpleJsonResourceReloadListener {
|
||||
JOINT_MASKS.put(key, JointMaskSet.of(masks));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ public class LayerInfo {
|
||||
this.priority = priority;
|
||||
this.layerType = layerType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,4 +241,4 @@ public abstract class AnimationEvent<EVENT extends AnimationEvent.Event<?, ?, ?,
|
||||
public interface E10<A, B, C, D, E, F, G, H, I, J> extends Event<A, B, C, D, E, F, G, H, I, J> {
|
||||
void fire(LivingEntityPatch<?> entitypatch, AssetAccessor<? extends StaticAnimation> animation, AnimationParameters<A, B, C, D, E, F, G, H, I, J> params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ import yesman.epicfight.api.physics.ik.InverseKinematicsSimulator.InverseKinemat
|
||||
import com.tiedup.remake.rig.util.HitEntityList.Priority;
|
||||
import com.tiedup.remake.rig.util.TimePairList;
|
||||
import com.tiedup.remake.rig.math.ValueModifier;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.particle.HitParticleType;
|
||||
import yesman.epicfight.skill.BasicAttack;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
@@ -82,7 +82,7 @@ public abstract class AnimationProperty<T> {
|
||||
}
|
||||
|
||||
public T parseFrom(JsonElement e) {
|
||||
return this.codecs.parse(JsonOps.INSTANCE, e).resultOrPartial((errm) -> EpicFightMod.LOGGER.warn("Failed to parse property " + this.name + " because of " + errm)).orElseThrow();
|
||||
return this.codecs.parse(JsonOps.INSTANCE, e).resultOrPartial((errm) -> TiedUpRigConstants.LOGGER.warn("Failed to parse property " + this.name + " because of " + errm)).orElseThrow();
|
||||
}
|
||||
|
||||
public Codec<T> getCodecs() {
|
||||
@@ -378,4 +378,4 @@ public abstract class AnimationProperty<T> {
|
||||
public interface YRotProvider {
|
||||
float get(DynamicAnimation self, LivingEntityPatch<?> entitypatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,4 +472,4 @@ public class MoveCoordFunctions {
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,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.patch.LocalPlayerPatch;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.network.EpicFightNetworkManager;
|
||||
import yesman.epicfight.network.client.CPSyncPlayerAnimationPosition;
|
||||
import yesman.epicfight.network.server.SPSyncAnimationPosition;
|
||||
@@ -237,7 +237,7 @@ public class ActionAnimation extends MainFrameAnimation {
|
||||
playTime = playSpeedModifier.modify(this, entitypatch, playTime, 0.0F, playTime);
|
||||
}
|
||||
|
||||
playTime = Math.abs(playTime) * EpicFightSharedConstants.A_TICK;
|
||||
playTime = Math.abs(playTime) * TiedUpRigConstants.A_TICK;
|
||||
|
||||
float linkTime = (transitionTimeModifier > 0.0F) ? transitionTimeModifier + this.transitionTime : this.transitionTime;
|
||||
float totalTime = playTime * (int)Math.ceil(linkTime / playTime);
|
||||
@@ -402,4 +402,4 @@ public class ActionAnimation extends MainFrameAnimation {
|
||||
public boolean shouldPlayerMove(LocalPlayerPatch playerpatch) {
|
||||
return playerpatch.isLogicalClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ import com.tiedup.remake.rig.util.AttackResult;
|
||||
import com.tiedup.remake.rig.util.HitEntityList;
|
||||
import com.tiedup.remake.rig.math.MathUtils;
|
||||
import com.tiedup.remake.rig.math.ValueModifier;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.particle.HitParticleType;
|
||||
import com.tiedup.remake.rig.patch.HumanoidMobPatch;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
@@ -426,7 +426,7 @@ public class AttackAnimation extends ActionAnimation {
|
||||
|
||||
@Override
|
||||
public Object getModifiedLinkState(StateFactor<?> factor, Object val, LivingEntityPatch<?> entitypatch, float elapsedTime) {
|
||||
if (factor == EntityState.ATTACKING && elapsedTime < this.getPlaySpeed(entitypatch, this) * EpicFightSharedConstants.A_TICK) {
|
||||
if (factor == EntityState.ATTACKING && elapsedTime < this.getPlaySpeed(entitypatch, this) * TiedUpRigConstants.A_TICK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,4 +176,4 @@ public class ConcurrentLinkAnimation extends DynamicAnimation implements Animati
|
||||
public boolean inRegistry() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ import com.tiedup.remake.rig.anim.types.EntityState.StateFactor;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
import com.tiedup.remake.rig.anim.client.property.JointMaskEntry;
|
||||
import com.tiedup.remake.rig.util.datastruct.TypeFlexibleHashMap;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
public abstract class DynamicAnimation {
|
||||
@@ -37,7 +36,7 @@ public abstract class DynamicAnimation {
|
||||
protected AnimationClip animationClip;
|
||||
|
||||
public DynamicAnimation() {
|
||||
this(EpicFightSharedConstants.GENERAL_ANIMATION_TRANSITION_TIME, false);
|
||||
this(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, false);
|
||||
}
|
||||
|
||||
public DynamicAnimation(float transitionTime, boolean isRepeat) {
|
||||
@@ -148,7 +147,7 @@ public abstract class DynamicAnimation {
|
||||
}
|
||||
|
||||
public ResourceLocation getRegistryName() {
|
||||
return EpicFightMod.identifier("");
|
||||
return TiedUpRigConstants.identifier("");
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
@@ -197,4 +196,4 @@ public abstract class DynamicAnimation {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void renderDebugging(PoseStack poseStack, MultiBufferSource buffer, LivingEntityPatch<?> entitypatch, float playTime, float partialTicks) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,4 +143,4 @@ public class EntityState {
|
||||
public String toString() {
|
||||
return this.stateMap.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,4 +121,4 @@ public class LayerOffAnimation extends DynamicAnimation implements AnimationAcce
|
||||
public boolean inRegistry() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,4 +241,4 @@ public class LinkAnimation extends DynamicAnimation implements AnimationAccessor
|
||||
public boolean inRegistry() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,4 +90,4 @@ public class MainFrameAnimation extends StaticAnimation {
|
||||
public Layer.Priority getPriority() {
|
||||
return this.getProperty(ClientAnimationProperties.PRIORITY).orElse(Layer.Priority.HIGHEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ package com.tiedup.remake.rig.anim.types;
|
||||
import com.tiedup.remake.rig.anim.AnimationManager.AnimationAccessor;
|
||||
import com.tiedup.remake.rig.asset.AssetAccessor;
|
||||
import com.tiedup.remake.rig.armature.Armature;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
|
||||
public class MovementAnimation extends StaticAnimation {
|
||||
public MovementAnimation(boolean isRepeat, AnimationAccessor<? extends MovementAnimation> accessor, AssetAccessor<? extends Armature> armature) {
|
||||
super(EpicFightSharedConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature);
|
||||
super(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature);
|
||||
}
|
||||
|
||||
public MovementAnimation(float transitionTime, boolean isRepeat, AnimationAccessor<? extends MovementAnimation> accessor, AssetAccessor<? extends Armature> armature) {
|
||||
@@ -47,4 +47,4 @@ public class MovementAnimation extends StaticAnimation {
|
||||
public boolean canBePlayedReverse() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import com.tiedup.remake.rig.patch.LivingEntityPatch;
|
||||
import com.tiedup.remake.rig.patch.PlayerPatch;
|
||||
import yesman.epicfight.world.entity.eventlistener.AnimationBeginEvent;
|
||||
@@ -104,13 +103,13 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati
|
||||
public StaticAnimation() {
|
||||
super(0.0F, true);
|
||||
|
||||
this.resourceLocation = EpicFightMod.identifier("emtpy");
|
||||
this.resourceLocation = TiedUpRigConstants.identifier("emtpy");
|
||||
this.armature = null;
|
||||
this.filehash = StringUtil.EMPTY_STRING;
|
||||
}
|
||||
|
||||
public StaticAnimation(boolean isRepeat, AnimationAccessor<? extends StaticAnimation> accessor, AssetAccessor<? extends Armature> armature) {
|
||||
this(EpicFightSharedConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature);
|
||||
this(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME, isRepeat, accessor, armature);
|
||||
}
|
||||
|
||||
public StaticAnimation(float transitionTime, boolean isRepeat, AnimationAccessor<? extends StaticAnimation> accessor, AssetAccessor<? extends Armature> armature) {
|
||||
@@ -193,7 +192,7 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati
|
||||
}
|
||||
|
||||
playTime = Math.abs(playTime);
|
||||
playTime *= EpicFightSharedConstants.A_TICK;
|
||||
playTime *= TiedUpRigConstants.A_TICK;
|
||||
|
||||
float linkTime = transitionTimeModifier > 0.0F ? transitionTimeModifier + this.transitionTime : this.transitionTime;
|
||||
float totalTime = playTime * (int)Math.ceil(linkTime / playTime);
|
||||
@@ -620,7 +619,7 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati
|
||||
|
||||
for (BakedInverseKinematicsDefinition bakedIKInfo : this.getProperty(StaticAnimationProperty.BAKED_IK_DEFINITION).orElse(null)) {
|
||||
ikSimulatable.getIKSimulator().getRunningObject(bakedIKInfo.endJoint()).ifPresent((ikObjet) -> {
|
||||
VertexConsumer vertexBuilder = buffer.getBuffer(EpicFightRenderTypes.debugQuads());
|
||||
VertexConsumer vertexBuilder = buffer.getBuffer(TiedUpRenderTypes.debugQuads());
|
||||
Vec3f worldtargetpos = ikObjet.getDestination();
|
||||
Vec3f modeltargetpos = OpenMatrix4f.transform3v(toModelPos, worldtargetpos, null).multiply(-1.0F, 1.0F, -1.0F);
|
||||
RenderingTool.drawQuad(poseStack, vertexBuilder, modeltargetpos, 0.5F, 1.0F, 0.0F, 0.0F);
|
||||
@@ -643,4 +642,4 @@ public class StaticAnimation extends DynamicAnimation implements InverseKinemati
|
||||
public InverseKinematicsObject createSimulationData(InverseKinematicsProvider provider, InverseKinematicsSimulatable simOwner, InverseKinematicsSimulator.InverseKinematicsBuilder simBuilder) {
|
||||
return new InverseKinematicsObject(simBuilder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@ import com.tiedup.remake.rig.armature.JointTransform;
|
||||
import com.tiedup.remake.rig.anim.Pose;
|
||||
import com.tiedup.remake.rig.asset.JsonAssetLoader;
|
||||
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class Armature {
|
||||
private final String name;
|
||||
@@ -52,8 +51,8 @@ public class Armature {
|
||||
|
||||
protected Joint getOrLogException(Map<String, Joint> jointMap, String name) {
|
||||
if (!jointMap.containsKey(name)) {
|
||||
if (EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
EpicFightMod.LOGGER.debug("Cannot find the joint named " + name + " in " + this.getClass().getCanonicalName());
|
||||
if (TiedUpRigConstants.IS_DEV_ENV) {
|
||||
TiedUpRigConstants.LOGGER.debug("Cannot find the joint named " + name + " in " + this.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
return Joint.EMPTY;
|
||||
|
||||
@@ -116,4 +116,4 @@ public class HumanoidArmature extends Armature implements HumanLikeArmature {
|
||||
public Joint headJoint() {
|
||||
return this.head;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,4 +212,4 @@ public class JointTransform {
|
||||
public static JointTransform empty() {
|
||||
return new JointTransform(new Vec3f(0.0F, 0.0F, 0.0F), new Quaternionf(0.0F, 0.0F, 0.0F, 1.0F), new Vec3f(1.0F, 1.0F, 1.0F));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +66,4 @@ public interface AssetAccessor<O> extends Supplier<O> {
|
||||
throw new NoSuchElementException("No asset " + this.registryName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class JsonAssetLoader {
|
||||
public static final OpenMatrix4f BLENDER_TO_MINECRAFT_COORD = OpenMatrix4f.createRotatorDeg(-90.0F, Vec3f.X_AXIS);
|
||||
@@ -111,7 +110,7 @@ public class JsonAssetLoader {
|
||||
InputStream inputStream = modClass.getResourceAsStream("/assets/" + resourceLocation.getNamespace() + "/" + resourceLocation.getPath());
|
||||
|
||||
if (inputStream == null) {
|
||||
modClass = ModList.get().getModObjectById(EpicFightMod.MODID).get().getClass();
|
||||
modClass = ModList.get().getModObjectById(TiedUpRigConstants.MODID).get().getClass();
|
||||
inputStream = modClass.getResourceAsStream("/assets/" + resourceLocation.getNamespace() + "/" + resourceLocation.getPath());
|
||||
}
|
||||
|
||||
@@ -576,7 +575,7 @@ public class JsonAssetLoader {
|
||||
}
|
||||
|
||||
if (animation.getArmature() == null) {
|
||||
EpicFightMod.LOGGER.error("Animation " + animation + " doesn't have an armature.");
|
||||
TiedUpRigConstants.LOGGER.error("Animation " + animation + " doesn't have an armature.");
|
||||
}
|
||||
|
||||
TransformFormat format = getAsTransformFormatOrDefault(this.rootJson, "format");
|
||||
@@ -625,7 +624,7 @@ public class JsonAssetLoader {
|
||||
root = false;
|
||||
continue;
|
||||
} else {
|
||||
EpicFightMod.LOGGER.debug("[EpicFightMod] No joint named " + name + " in " + animation);
|
||||
TiedUpRigConstants.LOGGER.debug("[EpicFightMod] No joint named " + name + " in " + animation);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -654,7 +653,7 @@ public class JsonAssetLoader {
|
||||
boolean root = true;
|
||||
|
||||
if (animation.getArmature() == null) {
|
||||
EpicFightMod.LOGGER.error("Animation " + animation + " doesn't have an armature.");
|
||||
TiedUpRigConstants.LOGGER.error("Animation " + animation + " doesn't have an armature.");
|
||||
}
|
||||
|
||||
Armature armature = animation.getArmature().get();
|
||||
@@ -666,8 +665,8 @@ public class JsonAssetLoader {
|
||||
Joint joint = armature.searchJointByName(name);
|
||||
|
||||
if (joint == null) {
|
||||
if (EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
EpicFightMod.LOGGER.debug(animation.getRegistryName() + ": No joint named " + name + " in armature");
|
||||
if (TiedUpRigConstants.IS_DEV_ENV) {
|
||||
TiedUpRigConstants.LOGGER.debug(animation.getRegistryName() + ": No joint named " + name + " in armature");
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -830,4 +829,4 @@ public class JsonAssetLoader {
|
||||
public enum TransformFormat {
|
||||
MATRIX, ATTRIBUTES
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())));
|
||||
|
||||
@@ -66,4 +66,4 @@ public abstract class PatchedRenderersEvent extends Event implements IModBusEven
|
||||
return this.renderers.get(entityType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,4 +61,4 @@ public class PrepareModelEvent extends Event {
|
||||
public PatchedEntityRenderer<?, ?, ?, ?> getRenderer() {
|
||||
return this.renderer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,4 @@ public class RegisterResourceLayersEvent<E extends LivingEntity, T extends Livin
|
||||
public void register(ResourceLocation rl, LayerUtil.LayerProvider<E, T, M, R, AM> layerAdder) {
|
||||
this.layersbyid.put(rl, layerAdder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ public class AnimationTransformEntry {
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,4 +596,4 @@ public class MathUtils {
|
||||
}
|
||||
|
||||
private MathUtils() {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ package com.tiedup.remake.rig.math;
|
||||
@FunctionalInterface
|
||||
public interface MatrixOperation {
|
||||
OpenMatrix4f mul(OpenMatrix4f left, OpenMatrix4f right, OpenMatrix4f dest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -950,4 +950,4 @@ public class OpenMatrix4f {
|
||||
|
||||
return matrixArray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ public class QuaternionUtils {
|
||||
return QuaternionUtils.rotationDegrees(axis, degrees);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,4 +136,4 @@ public interface ValueModifier {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,4 @@ public class Vec2f {
|
||||
public String toString() {
|
||||
return "Vec2f[" + this.x + ", " + this.y + ", " + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class Vec3f extends Vec2f {
|
||||
public static final Vec3f X_AXIS = new Vec3f(1.0F, 0.0F, 0.0F);
|
||||
@@ -238,7 +238,7 @@ public class Vec3f extends Vec2f {
|
||||
float dotDivLength = Vec3f.dot(a, b) / (a.length() * b.length());
|
||||
|
||||
if (!Float.isFinite(dotDivLength)) {
|
||||
EpicFightMod.LOGGER.info("Warning : given vector's length is zero");
|
||||
TiedUpRigConstants.LOGGER.info("Warning : given vector's length is zero");
|
||||
(new IllegalArgumentException()).printStackTrace();
|
||||
dotDivLength = 1.0F;
|
||||
}
|
||||
@@ -470,4 +470,4 @@ public class Vec3f extends Vec2f {
|
||||
OpenMatrix4f.transform3v(DEST, this, this);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,4 +72,4 @@ public class Vec4f extends Vec3f {
|
||||
public String toString() {
|
||||
return "Vec4f[" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.tiedup.remake.rig.mesh.ClassicMesh.ClassicMeshPart;
|
||||
import com.tiedup.remake.rig.armature.Armature;
|
||||
import com.tiedup.remake.rig.math.OpenMatrix4f;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class ClassicMesh extends StaticMesh<ClassicMeshPart> {
|
||||
public ClassicMesh(Map<String, Number[]> arrayMap, Map<MeshPartDefinition, List<VertexBuilder>> partBuilders, ClassicMesh parent, RenderProperties properties) {
|
||||
@@ -45,7 +45,7 @@ public class ClassicMesh extends StaticMesh<ClassicMeshPart> {
|
||||
@Override
|
||||
protected ClassicMeshPart getOrLogException(Map<String, ClassicMeshPart> parts, String name) {
|
||||
if (!parts.containsKey(name)) {
|
||||
EpicFightMod.LOGGER.debug("Can not find the mesh part named " + name + " in " + this.getClass().getCanonicalName());
|
||||
TiedUpRigConstants.LOGGER.debug("Can not find the mesh part named " + name + " in " + this.getClass().getCanonicalName());
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -101,4 +101,4 @@ public class ClassicMesh extends StaticMesh<ClassicMeshPart> {
|
||||
poseStack.popPose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,4 +74,4 @@ public class CompositeMesh implements Mesh, SoftBodyTranslatable {
|
||||
public Map<String, ClothSimulationInfo> getSoftBodySimulationInfo() {
|
||||
return this.softBodyMesh.getSoftBodySimulationInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,4 +62,4 @@ public class HumanoidMesh extends SkinnedMesh {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public interface Mesh {
|
||||
|
||||
/* Universal method */
|
||||
default 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) {
|
||||
this.drawPosed(poseStack, bufferSources.getBuffer(EpicFightRenderTypes.getTriangulated(renderType)), drawingFunction, packedLight, r, g, b, a, overlay, armature, poses);
|
||||
this.drawPosed(poseStack, bufferSources.getBuffer(TiedUpRenderTypes.getTriangulated(renderType)), drawingFunction, packedLight, r, g, b, a, overlay, armature, poses);
|
||||
}
|
||||
|
||||
public static record RenderProperties(ResourceLocation customTexturePath, Vec3f customColor, boolean isTransparent) {
|
||||
@@ -211,4 +211,4 @@ public interface Mesh {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public abstract class MeshPart {
|
||||
|
||||
public VertexConsumer getBufferBuilder(RenderType renderType, MultiBufferSource bufferSource) {
|
||||
if (this.renderProperties.customTexturePath() != null) {
|
||||
return bufferSource.getBuffer(EpicFightRenderTypes.replaceTexture(this.renderProperties.customTexturePath(), renderType));
|
||||
return bufferSource.getBuffer(TiedUpRenderTypes.replaceTexture(this.renderProperties.customTexturePath(), renderType));
|
||||
}
|
||||
|
||||
return bufferSource.getBuffer(renderType);
|
||||
@@ -86,4 +86,4 @@ public abstract class MeshPart {
|
||||
return COLOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ public interface MeshPartDefinition {
|
||||
String partName();
|
||||
Mesh.RenderProperties renderProperties();
|
||||
Supplier<OpenMatrix4f> getModelPartAnimationProvider();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class Meshes implements PreparableReloadListener {
|
||||
private static final Map<ResourceLocation, MeshAccessor<? extends Mesh>> ACCESSORS = Maps.newHashMap();
|
||||
@@ -51,40 +51,40 @@ public class Meshes implements PreparableReloadListener {
|
||||
public static final Meshes INSTANCE = new Meshes();
|
||||
|
||||
// Entities
|
||||
public static final MeshAccessor<HumanoidMesh> ALEX = MeshAccessor.create(EpicFightMod.MODID, "entity/biped_slim_arm", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED = MeshAccessor.create(EpicFightMod.MODID, "entity/biped", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED_OLD_TEX = MeshAccessor.create(EpicFightMod.MODID, "entity/biped_old_texture", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED_OUTLAYER = MeshAccessor.create(EpicFightMod.MODID, "entity/biped_outlayer", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<VillagerMesh> VILLAGER_ZOMBIE = MeshAccessor.create(EpicFightMod.MODID, "entity/zombie_villager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<CreeperMesh> CREEPER = MeshAccessor.create(EpicFightMod.MODID, "entity/creeper", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(CreeperMesh::new));
|
||||
public static final MeshAccessor<EndermanMesh> ENDERMAN = MeshAccessor.create(EpicFightMod.MODID, "entity/enderman", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(EndermanMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> SKELETON = MeshAccessor.create(EpicFightMod.MODID, "entity/skeleton", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<SpiderMesh> SPIDER = MeshAccessor.create(EpicFightMod.MODID, "entity/spider", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SpiderMesh::new));
|
||||
public static final MeshAccessor<IronGolemMesh> IRON_GOLEM = MeshAccessor.create(EpicFightMod.MODID, "entity/iron_golem", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(IronGolemMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> ILLAGER = MeshAccessor.create(EpicFightMod.MODID, "entity/illager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<VillagerMesh> WITCH = MeshAccessor.create(EpicFightMod.MODID, "entity/witch", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<RavagerMesh> RAVAGER = MeshAccessor.create(EpicFightMod.MODID, "entity/ravager",(jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(RavagerMesh::new));
|
||||
public static final MeshAccessor<VexMesh> VEX = MeshAccessor.create(EpicFightMod.MODID, "entity/vex", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VexMesh::new));
|
||||
public static final MeshAccessor<PiglinMesh> PIGLIN = MeshAccessor.create(EpicFightMod.MODID, "entity/piglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(PiglinMesh::new));
|
||||
public static final MeshAccessor<HoglinMesh> HOGLIN = MeshAccessor.create(EpicFightMod.MODID, "entity/hoglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HoglinMesh::new));
|
||||
public static final MeshAccessor<DragonMesh> DRAGON = MeshAccessor.create(EpicFightMod.MODID, "entity/dragon", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(DragonMesh::new));
|
||||
public static final MeshAccessor<WitherMesh> WITHER = MeshAccessor.create(EpicFightMod.MODID, "entity/wither", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(WitherMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> ALEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_slim_arm", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED_OLD_TEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_old_texture", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> BIPED_OUTLAYER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/biped_outlayer", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<VillagerMesh> VILLAGER_ZOMBIE = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/zombie_villager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<CreeperMesh> CREEPER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/creeper", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(CreeperMesh::new));
|
||||
public static final MeshAccessor<EndermanMesh> ENDERMAN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/enderman", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(EndermanMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> SKELETON = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/skeleton", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HumanoidMesh::new));
|
||||
public static final MeshAccessor<SpiderMesh> SPIDER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/spider", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SpiderMesh::new));
|
||||
public static final MeshAccessor<IronGolemMesh> IRON_GOLEM = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/iron_golem", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(IronGolemMesh::new));
|
||||
public static final MeshAccessor<HumanoidMesh> ILLAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/illager", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<VillagerMesh> WITCH = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/witch", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VillagerMesh::new));
|
||||
public static final MeshAccessor<RavagerMesh> RAVAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/ravager",(jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(RavagerMesh::new));
|
||||
public static final MeshAccessor<VexMesh> VEX = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/vex", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(VexMesh::new));
|
||||
public static final MeshAccessor<PiglinMesh> PIGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/piglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(PiglinMesh::new));
|
||||
public static final MeshAccessor<HoglinMesh> HOGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/hoglin", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(HoglinMesh::new));
|
||||
public static final MeshAccessor<DragonMesh> DRAGON = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/dragon", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(DragonMesh::new));
|
||||
public static final MeshAccessor<WitherMesh> WITHER = MeshAccessor.create(TiedUpRigConstants.MODID, "entity/wither", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(WitherMesh::new));
|
||||
|
||||
// Armors
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET = MeshAccessor.create(EpicFightMod.MODID, "armor/helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET_PIGLIN = MeshAccessor.create(EpicFightMod.MODID, "armor/piglin_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET_VILLAGER = MeshAccessor.create(EpicFightMod.MODID, "armor/villager_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> CHESTPLATE = MeshAccessor.create(EpicFightMod.MODID, "armor/chestplate", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> LEGGINS = MeshAccessor.create(EpicFightMod.MODID, "armor/leggins", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> BOOTS = MeshAccessor.create(EpicFightMod.MODID, "armor/boots", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET_PIGLIN = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/piglin_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> HELMET_VILLAGER = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/villager_helmet", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> CHESTPLATE = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/chestplate", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> LEGGINS = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/leggins", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> BOOTS = MeshAccessor.create(TiedUpRigConstants.MODID, "armor/boots", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
|
||||
// Particles
|
||||
public static final MeshAccessor<ClassicMesh> AIR_BURST = MeshAccessor.create(EpicFightMod.MODID, "particle/air_burst", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
public static final MeshAccessor<ClassicMesh> FORCE_FIELD = MeshAccessor.create(EpicFightMod.MODID, "particle/force_field", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
public static final MeshAccessor<ClassicMesh> LASER = MeshAccessor.create(EpicFightMod.MODID, "particle/laser", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
public static final MeshAccessor<ClassicMesh> AIR_BURST = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/air_burst", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
public static final MeshAccessor<ClassicMesh> FORCE_FIELD = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/force_field", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
public static final MeshAccessor<ClassicMesh> LASER = MeshAccessor.create(TiedUpRigConstants.MODID, "particle/laser", (jsonModelLoader) -> jsonModelLoader.loadClassicMesh(ClassicMesh::new));
|
||||
|
||||
// Layers
|
||||
public static final MeshAccessor<SkinnedMesh> CAPE_DEFAULT = MeshAccessor.create(EpicFightMod.MODID, "layer/default_cape", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
public static final MeshAccessor<SkinnedMesh> CAPE_DEFAULT = MeshAccessor.create(TiedUpRigConstants.MODID, "layer/default_cape", (jsonModelLoader) -> jsonModelLoader.loadSkinnedMesh(SkinnedMesh::new));
|
||||
|
||||
public static void reload(ResourceManager resourceManager) {
|
||||
Meshes.resourceManager = resourceManager;
|
||||
@@ -222,4 +222,4 @@ public class Meshes implements PreparableReloadListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,4 +154,4 @@ public class SingleGroupVertexBuilder {
|
||||
public enum State {
|
||||
EMPTY, EQUAL, DIFFERENT
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ 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 yesman.epicfight.main.EpicFightMod;
|
||||
import yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public class SkinnedMesh extends StaticMesh<SkinnedMeshPart> {
|
||||
protected final float[] weights;
|
||||
@@ -133,8 +132,8 @@ public class SkinnedMesh extends StaticMesh<SkinnedMeshPart> {
|
||||
@Override
|
||||
protected SkinnedMeshPart getOrLogException(Map<String, SkinnedMeshPart> parts, String name) {
|
||||
if (!parts.containsKey(name)) {
|
||||
if (EpicFightSharedConstants.IS_DEV_ENV) {
|
||||
EpicFightMod.LOGGER.debug("Cannot find the mesh part named " + name + " in " + this.getClass().getCanonicalName());
|
||||
if (TiedUpRigConstants.IS_DEV_ENV) {
|
||||
TiedUpRigConstants.LOGGER.debug("Cannot find the mesh part named " + name + " in " + this.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -248,9 +247,9 @@ public class SkinnedMesh extends StaticMesh<SkinnedMeshPart> {
|
||||
@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) {
|
||||
this.computerShaderSetup.drawWithShader(this, poseStack, bufferSources, EpicFightRenderTypes.getTriangulated(renderType), packedLight, r, g, b, a, overlay, armature, poses);
|
||||
this.computerShaderSetup.drawWithShader(this, poseStack, bufferSources, TiedUpRenderTypes.getTriangulated(renderType), packedLight, r, g, b, a, overlay, armature, poses);
|
||||
} else {
|
||||
this.drawPosed(poseStack, bufferSources.getBuffer(EpicFightRenderTypes.getTriangulated(renderType)), drawingFunction, packedLight, r, g, b, a, overlay, armature, poses);
|
||||
this.drawPosed(poseStack, bufferSources.getBuffer(TiedUpRenderTypes.getTriangulated(renderType)), drawingFunction, packedLight, r, g, b, a, overlay, armature, poses);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,4 +147,4 @@ public abstract class StaticMesh<P extends MeshPart> implements Mesh, SoftBodyTr
|
||||
public ClothSimulator.ClothObject createSimulationData(@Nullable SoftBodyTranslatable provider, ClothSimulatable simObject, ClothSimulator.ClothObjectBuilder simBuilder) {
|
||||
return new ClothObject(simBuilder, provider == null ? this : provider, (Map<String, MeshPart>)this.parts, this.positions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,4 +59,4 @@ public class VertexBuilder {
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ 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 yesman.epicfight.main.EpicFightSharedConstants;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
import yesman.epicfight.network.EpicFightNetworkManager;
|
||||
import yesman.epicfight.network.client.CPAnimatorControl;
|
||||
import yesman.epicfight.network.client.CPChangePlayerMode;
|
||||
@@ -537,7 +537,7 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch<LocalPlayer> {
|
||||
if (LocalPlayerPatch.this.povSettings != null && LocalPlayerPatch.this.povSettings.cameraTransform() != null) {
|
||||
this.linkCameraTransform.getKeyframes()[0].transform().copyFrom(LocalPlayerPatch.this.povSettings.cameraTransform().getInterpolatedTransform(this.animationPlayer.getElapsedTime()));
|
||||
this.linkCameraTransform.getKeyframes()[1].transform().copyFrom(JointTransform.empty());
|
||||
this.linkCameraTransform.getKeyframes()[1].setTime(EpicFightSharedConstants.GENERAL_ANIMATION_TRANSITION_TIME);
|
||||
this.linkCameraTransform.getKeyframes()[1].setTime(TiedUpRigConstants.GENERAL_ANIMATION_TRANSITION_TIME);
|
||||
}
|
||||
|
||||
super.off(LocalPlayerPatch.this);
|
||||
@@ -576,4 +576,4 @@ public class LocalPlayerPatch extends AbstractClientPlayerPatch<LocalPlayer> {
|
||||
public void toggleLockOn() {
|
||||
this.setLockOn(!EpicFightCameraAPI.getInstance().isLockingOnTarget());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.inventory.InventoryMenu;
|
||||
import yesman.epicfight.main.EpicFightMod;
|
||||
import com.tiedup.remake.rig.TiedUpRigConstants;
|
||||
|
||||
public final class EpicFightRenderTypes extends RenderType {
|
||||
public final class TiedUpRenderTypes extends RenderType {
|
||||
public static RenderType makeTriangulated(RenderType renderType) {
|
||||
if (renderType.mode() == VertexFormat.Mode.TRIANGLES) {
|
||||
return renderType;
|
||||
@@ -48,7 +48,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
private static final BiFunction<ResourceLocation, RenderStateShard.CullStateShard, RenderType> TRIANGULATED_OUTLINE =
|
||||
Util.memoize((texLocation, cullStateShard) -> {
|
||||
return RenderType.create(
|
||||
EpicFightMod.prefix("outline"),
|
||||
TiedUpRigConstants.prefix("outline"),
|
||||
DefaultVertexFormat.POSITION_COLOR_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -177,8 +177,8 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
this.shaderColorState.setColor(r, g, b, a);
|
||||
}
|
||||
|
||||
public static EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder mutableStateBuilder() {
|
||||
return new EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder();
|
||||
public static TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder mutableStateBuilder() {
|
||||
return new TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder();
|
||||
}
|
||||
|
||||
public static class MutableCompositeStateBuilder {
|
||||
@@ -196,77 +196,77 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
private RenderStateShard.LineStateShard lineState = RenderStateShard.DEFAULT_LINE;
|
||||
private RenderStateShard.ColorLogicStateShard colorLogicState = RenderStateShard.NO_COLOR_LOGIC;
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTextureState(RenderStateShard.EmptyTextureStateShard pTextureState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTextureState(RenderStateShard.EmptyTextureStateShard pTextureState) {
|
||||
this.textureState = pTextureState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setShaderState(RenderStateShard.ShaderStateShard pShaderState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setShaderState(RenderStateShard.ShaderStateShard pShaderState) {
|
||||
this.shaderState = pShaderState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTransparencyState(RenderStateShard.TransparencyStateShard pTransparencyState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTransparencyState(RenderStateShard.TransparencyStateShard pTransparencyState) {
|
||||
this.transparencyState = pTransparencyState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setDepthTestState(RenderStateShard.DepthTestStateShard pDepthTestState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setDepthTestState(RenderStateShard.DepthTestStateShard pDepthTestState) {
|
||||
this.depthTestState = pDepthTestState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setCullState(RenderStateShard.CullStateShard pCullState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setCullState(RenderStateShard.CullStateShard pCullState) {
|
||||
this.cullState = pCullState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLightmapState(RenderStateShard.LightmapStateShard pLightmapState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLightmapState(RenderStateShard.LightmapStateShard pLightmapState) {
|
||||
this.lightmapState = pLightmapState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setOverlayState(RenderStateShard.OverlayStateShard pOverlayState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setOverlayState(RenderStateShard.OverlayStateShard pOverlayState) {
|
||||
this.overlayState = pOverlayState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLayeringState(RenderStateShard.LayeringStateShard pLayerState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLayeringState(RenderStateShard.LayeringStateShard pLayerState) {
|
||||
this.layeringState = pLayerState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setOutputState(RenderStateShard.OutputStateShard pOutputState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setOutputState(RenderStateShard.OutputStateShard pOutputState) {
|
||||
this.outputState = pOutputState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTexturingState(RenderStateShard.TexturingStateShard pTexturingState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setTexturingState(RenderStateShard.TexturingStateShard pTexturingState) {
|
||||
this.texturingState = pTexturingState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setWriteMaskState(RenderStateShard.WriteMaskStateShard pWriteMaskState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setWriteMaskState(RenderStateShard.WriteMaskStateShard pWriteMaskState) {
|
||||
this.writeMaskState = pWriteMaskState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLineState(RenderStateShard.LineStateShard pLineState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setLineState(RenderStateShard.LineStateShard pLineState) {
|
||||
this.lineState = pLineState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setColorLogicState(RenderStateShard.ColorLogicStateShard pColorLogicState) {
|
||||
public TiedUpRenderTypes.MutableCompositeState.MutableCompositeStateBuilder setColorLogicState(RenderStateShard.ColorLogicStateShard pColorLogicState) {
|
||||
this.colorLogicState = pColorLogicState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState createCompositeState(boolean pOutline) {
|
||||
public TiedUpRenderTypes.MutableCompositeState createCompositeState(boolean pOutline) {
|
||||
return this.createCompositeState(pOutline ? RenderType.OutlineProperty.AFFECTS_OUTLINE : RenderType.OutlineProperty.NONE);
|
||||
}
|
||||
|
||||
public EpicFightRenderTypes.MutableCompositeState createCompositeState(RenderType.OutlineProperty pOutlineState) {
|
||||
return new EpicFightRenderTypes.MutableCompositeState(
|
||||
public TiedUpRenderTypes.MutableCompositeState createCompositeState(RenderType.OutlineProperty pOutlineState) {
|
||||
return new TiedUpRenderTypes.MutableCompositeState(
|
||||
this.textureState,
|
||||
this.shaderState,
|
||||
this.transparencyState,
|
||||
@@ -288,7 +288,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ENTITY_UI_COLORED =
|
||||
create(
|
||||
EpicFightMod.prefix("ui_color")
|
||||
TiedUpRigConstants.prefix("ui_color")
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -304,7 +304,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_UI_TEXTURE = Util.memoize(
|
||||
(textureLocation) -> create(
|
||||
EpicFightMod.prefix("ui_texture")
|
||||
TiedUpRigConstants.prefix("ui_texture")
|
||||
, DefaultVertexFormat.POSITION_TEX
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -321,7 +321,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType OBB = create(
|
||||
EpicFightMod.prefix("debug_collider")
|
||||
TiedUpRigConstants.prefix("debug_collider")
|
||||
, DefaultVertexFormat.POSITION_COLOR_NORMAL
|
||||
, VertexFormat.Mode.LINE_STRIP
|
||||
, 256
|
||||
@@ -339,7 +339,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType DEBUG_QUADS = create(
|
||||
EpicFightMod.prefix("debug_quad")
|
||||
TiedUpRigConstants.prefix("debug_quad")
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.QUADS
|
||||
, 256
|
||||
@@ -355,7 +355,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
);
|
||||
|
||||
private static final RenderType GUI_TRIANGLE = create(
|
||||
EpicFightMod.prefix("gui_triangle")
|
||||
TiedUpRigConstants.prefix("gui_triangle")
|
||||
, DefaultVertexFormat.POSITION_COLOR
|
||||
, VertexFormat.Mode.TRIANGLES
|
||||
, 256
|
||||
@@ -370,7 +370,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> OVERLAY_MODEL = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
EpicFightMod.prefix("overlay_model"),
|
||||
TiedUpRigConstants.prefix("overlay_model"),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -391,7 +391,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ENTITY_AFTERIMAGE_WHITE =
|
||||
create(
|
||||
EpicFightMod.prefix("entity_afterimage"),
|
||||
TiedUpRigConstants.prefix("entity_afterimage"),
|
||||
DefaultVertexFormat.PARTICLE,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -399,7 +399,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
true,
|
||||
RenderType.CompositeState.builder()
|
||||
.setShaderState(PARTICLE_SHADER)
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(EpicFightMod.identifier("textures/common/white.png"), false, false))
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(TiedUpRigConstants.identifier("textures/common/white.png"), false, false))
|
||||
.setCullState(NO_CULL)
|
||||
.setWriteMaskState(COLOR_WRITE)
|
||||
.setDepthTestState(EQUAL_DEPTH_TEST)
|
||||
@@ -410,7 +410,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_AFTERIMAGE_WHITE =
|
||||
create(
|
||||
EpicFightMod.prefix("item_afterimage"),
|
||||
TiedUpRigConstants.prefix("item_afterimage"),
|
||||
DefaultVertexFormat.PARTICLE,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -418,7 +418,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
true,
|
||||
RenderType.CompositeState.builder()
|
||||
.setShaderState(PARTICLE_SHADER)
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(EpicFightMod.identifier("textures/common/white.png"), false, false))
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(TiedUpRigConstants.identifier("textures/common/white.png"), false, false))
|
||||
.setCullState(NO_CULL)
|
||||
.setWriteMaskState(COLOR_WRITE)
|
||||
.setDepthTestState(EQUAL_DEPTH_TEST)
|
||||
@@ -429,7 +429,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_PARTICLE = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
EpicFightMod.prefix("entity_particle"),
|
||||
TiedUpRigConstants.prefix("entity_particle"),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -449,7 +449,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_PARTICLE =
|
||||
create(
|
||||
EpicFightMod.prefix("item_particle"),
|
||||
TiedUpRigConstants.prefix("item_particle"),
|
||||
DefaultVertexFormat.NEW_ENTITY,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -468,7 +468,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final Function<ResourceLocation, RenderType> ENTITY_PARTICLE_STENCIL = Util.memoize(texLocation -> {
|
||||
return create(
|
||||
EpicFightMod.prefix("entity_particle_stencil"),
|
||||
TiedUpRigConstants.prefix("entity_particle_stencil"),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
@@ -484,7 +484,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType ITEM_PARTICLE_STENCIL =
|
||||
create(
|
||||
EpicFightMod.prefix("item_particle_stencil"),
|
||||
TiedUpRigConstants.prefix("item_particle_stencil"),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
@@ -499,14 +499,14 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
|
||||
private static final RenderType.CompositeRenderType BLOCK_HIGHLIGHT =
|
||||
create(
|
||||
EpicFightMod.prefix("block_highlight"),
|
||||
TiedUpRigConstants.prefix("block_highlight"),
|
||||
DefaultVertexFormat.BLOCK,
|
||||
VertexFormat.Mode.QUADS,
|
||||
256,
|
||||
false,
|
||||
true,
|
||||
RenderType.CompositeState.builder()
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(EpicFightMod.identifier("textures/common/white.png"), false, false))
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(TiedUpRigConstants.identifier("textures/common/white.png"), false, false))
|
||||
.setLightmapState(LIGHTMAP)
|
||||
.setShaderState(RENDERTYPE_TRANSLUCENT_SHADER)
|
||||
.setTransparencyState(TRANSLUCENT_TRANSPARENCY)
|
||||
@@ -627,15 +627,15 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
CompositeRenderType glintRenderType = WORLD_RENDERTYPES_COLORED_GLINT.computeIfAbsent(
|
||||
owner,
|
||||
k -> create(
|
||||
EpicFightMod.prefix("colored_glint"),
|
||||
TiedUpRigConstants.prefix("colored_glint"),
|
||||
DefaultVertexFormat.POSITION_TEX,
|
||||
VertexFormat.Mode.TRIANGLES,
|
||||
256,
|
||||
false,
|
||||
false,
|
||||
EpicFightRenderTypes.MutableCompositeState.mutableStateBuilder()
|
||||
TiedUpRenderTypes.MutableCompositeState.mutableStateBuilder()
|
||||
.setShaderState(RENDERTYPE_ARMOR_ENTITY_GLINT_SHADER)
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(EpicFightMod.identifier("textures/entity/overlay/glint_white.png"), true, false))
|
||||
.setTextureState(new RenderStateShard.TextureStateShard(TiedUpRigConstants.identifier("textures/entity/overlay/glint_white.png"), true, false))
|
||||
.setWriteMaskState(COLOR_WRITE)
|
||||
.setCullState(NO_CULL)
|
||||
.setDepthTestState(EQUAL_DEPTH_TEST)
|
||||
@@ -654,7 +654,7 @@ public final class EpicFightRenderTypes extends RenderType {
|
||||
}
|
||||
|
||||
//Util class
|
||||
private EpicFightRenderTypes() {
|
||||
private TiedUpRenderTypes() {
|
||||
super(null, null, null, -1, false, false, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,4 +369,4 @@ public class ParseUtil {
|
||||
}
|
||||
|
||||
private ParseUtil() {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ public class ClearableIdMapper<I> extends IdMapper<I> {
|
||||
this.idToT.clear();
|
||||
this.nextId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,4 +40,4 @@ public class TypeFlexibleHashMap<A extends TypeKey<?>> extends HashMap<A, Object
|
||||
public interface TypeKey<T> {
|
||||
T defaultValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user