Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.fish_dan_.data_energistics.core.mixins;

import com.fish_dan_.data_energistics.Data_Energistics;
import com.fish_dan_.data_energistics.core.config.DataEnergisticsEarlyConfig;
import com.fish_dan_.data_energistics.core.config.Option;
import com.fish_dan_.data_energistics.integration.ae.ae2lt.orbital.CelestweaveErasureHooks;

import me.fallenbreath.conditionalmixin.api.mixin.RestrictiveMixinConfigPlugin;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.objectweb.asm.tree.ClassNode;
Expand All @@ -17,6 +18,9 @@
@NullMarked
public final class DataEnergisticsMixinPlugin extends RestrictiveMixinConfigPlugin {

// Mixin preparation can log before the mod entrypoint is initialized.
private static final Logger LOGGER = LogManager.getLogger("Data Energistics Mixin");

private static final String MIXIN_PACKAGE = "com.fish_dan_.data_energistics.core.mixins.";

public DataEnergisticsMixinPlugin() {
Expand All @@ -43,7 +47,7 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {

@Override
protected void onRestrictionCheckFailed(String mixinClassName, String reason) {
Data_Energistics.LOGGER.debug("Skipping Mixin {}: {}", mixinClassName, reason);
LOGGER.debug("Skipping Mixin {}: {}", mixinClassName, reason);
}

@Override
Expand All @@ -60,7 +64,7 @@ public void preApply(String targetClassName, ClassNode targetClass, String mixin
if (mixinClassName.equals(MIXIN_PACKAGE + "normal.com.moakiee.ae2lt.celestweave.CelestweaveArmorUndyingHandlerMixin")) {
List<String> missing = CelestweaveErasureHooks.missingMethods(targetClass);
if (!missing.isEmpty()) {
Data_Energistics.LOGGER.warn("LT orbital erasure compatibility skipped missing methods on {}: {}; vanilla termination remains active",
LOGGER.warn("LT orbital erasure compatibility skipped missing methods on {}: {}; vanilla termination remains active",
targetClassName, missing);
}
}
Expand Down
Loading