Skip to content

Commit

Permalink
Cleanup MixinFixer. Will move it to Fugue
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Nov 16, 2024
1 parent ce01e07 commit d7d7360
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 209 deletions.
26 changes: 3 additions & 23 deletions src/main/java/net/minecraftforge/fml/common/LoadController.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import net.minecraftforge.fml.common.versioning.ArtifactVersion;
import net.minecraftforge.fml.relauncher.MixinBooterPlugin;
import net.minecraftforge.fml.relauncher.libraries.LibraryManager;
import net.minecraftforge.fml.relauncher.mixinfix.MixinFixer;
import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.message.FormattedMessage;
import org.spongepowered.asm.mixin.MixinEnvironment;
Expand All @@ -52,7 +51,6 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.*;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
Expand Down Expand Up @@ -166,15 +164,9 @@ public void distributeStateMessage(LoaderState state, Object... eventData)
}

FMLContextQuery.init(); // Initialize FMLContextQuery and add it to the global list
boolean log = false;

Set<ASMDataTable.ASMData> implementations = asmDataTable.getAll(ILateMixinLoader.class.getName().replace('.', '/'));
implementations.forEach(it -> FMLLog.log.info("Retrieving Late Mixin Loader: {}", it.getClassName()));
for (ASMDataTable.ASMData asmData : implementations) {
if (!log) {
MixinBooterPlugin.LOGGER.info("Instantiating all ILateMixinLoader implemented classes...");
log = true;
}

MixinBooterPlugin.LOGGER.info("Instantiating all ILateMixinLoader implemented classes...");
for (ASMDataTable.ASMData asmData : asmDataTable.getAll(ILateMixinLoader.class.getName().replace('.', '/'))) {
modClassLoader.addFile(asmData.getCandidate().getModContainer()); // Add to path before `newInstance`
Class<?> clazz = Class.forName(asmData.getClassName().replace('/', '.'));
MixinBooterPlugin.LOGGER.info("Instantiating {} for its mixins.", clazz);
Expand All @@ -188,18 +180,6 @@ public void distributeStateMessage(LoaderState state, Object... eventData)
}
}

log = false;

// Append all non-conventional mixin configurations gathered via MixinFixer
for (String mixinConfig : MixinFixer.retrieveLateMixinConfigs()) {
if (!log) {
MixinBooterPlugin.LOGGER.info("Appending non-conventional mixin configurations...");
log = true;
}
MixinBooterPlugin.LOGGER.info("Adding {} mixin configuration.", mixinConfig);
Mixins.addConfiguration(mixinConfig);
}

for (ModContainer container : this.loader.getActiveModList()) {
modClassLoader.addFile(container.getSource());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public void sendToTable(ASMDataTable table, ModCandidate candidate)

for (String intf : interfaces)
{
if (intf.endsWith("ILateMixinLoader")) FMLLog.log.info("Found Late Mixin Loader {}", this.asmType.getInternalName());
table.addASMData(candidate, intf, this.asmType.getInternalName(), null, null);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public String getModContainerClass() {

@Override
public String getSetupClass() {
return "net.minecraftforge.fml.relauncher.MixinSetup";
return null;
}

@Override
Expand Down
29 changes: 0 additions & 29 deletions src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java

This file was deleted.

This file was deleted.

0 comments on commit d7d7360

Please sign in to comment.