forked from NovaEngineering-Source/CatRoom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Mixin launch before obf map init, fix Mixin uses refmap on dev
- Loading branch information
1 parent
625485f
commit 337a4a5
Showing
9 changed files
with
69 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/net/minecraftforge/fml/relauncher/MixinSetup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package net.minecraftforge.fml.relauncher; | ||
|
||
import com.llamalad7.mixinextras.MixinExtrasBootstrap; | ||
import net.minecraft.launchwrapper.Launch; | ||
import net.minecraftforge.fml.relauncher.mixinfix.MixinFixer; | ||
import org.spongepowered.asm.launch.GlobalProperties; | ||
import org.spongepowered.asm.launch.MixinBootstrap; | ||
|
||
import java.util.HashSet; | ||
import java.util.Map; | ||
|
||
public class MixinSetup implements IFMLCallHook { | ||
|
||
@Override | ||
public void injectData(Map<String, Object> data) { | ||
addTransformationExclusions(); | ||
initialize(); | ||
MixinBooterPlugin.LOGGER.info("Initializing Mixins..."); | ||
MixinBootstrap.init(); | ||
MixinBooterPlugin.LOGGER.info("Initializing MixinExtras..."); | ||
MixinExtrasBootstrap.init(); | ||
MixinFixer.patchAncientModMixinsLoadingMethod(); | ||
} | ||
|
||
@Override | ||
public Void call() throws Exception { | ||
return null; | ||
} | ||
|
||
private void addTransformationExclusions() { | ||
Launch.classLoader.addTransformerExclusion("scala."); | ||
Launch.classLoader.addTransformerExclusion("com.llamalad7.mixinextras."); | ||
} | ||
|
||
private void initialize() { | ||
GlobalProperties.put(GlobalProperties.Keys.CLEANROOM_DISABLE_MIXIN_CONFIGS, new HashSet<>()); | ||
} | ||
} |