mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-04-01 01:05:27 +02:00
LiteLoader: inject mixins to classpath.
And stuff
This commit is contained in:
parent
1b9989164d
commit
6fd6c5b567
3 changed files with 18 additions and 12 deletions
|
@ -19,7 +19,7 @@ buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
|
||||||
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0'
|
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0'
|
||||||
classpath 'org.spongepowered:mixingradle:0.1-SNAPSHOT'
|
classpath 'org.spongepowered:mixingradle:0.3-SNAPSHOT'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.spongepowered:mixin:0.4.11-SNAPSHOT'
|
compile 'org.spongepowered:mixin:0.4.14-SNAPSHOT'
|
||||||
compile 'com.google.guava:guava:17.0'
|
compile 'com.google.guava:guava:17.0'
|
||||||
compile 'com.google.code.gson:gson:2.2.4'
|
compile 'com.google.code.gson:gson:2.2.4'
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ sourceSets {
|
||||||
}
|
}
|
||||||
client {
|
client {
|
||||||
compileClasspath += main.compileClasspath + main.output
|
compileClasspath += main.compileClasspath + main.output
|
||||||
//refMap = "mixins.liteloader.client.refmap.json"
|
refMap = "mixins.liteloader.client.refmap.json"
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
compileClasspath += client.compileClasspath + client.output
|
compileClasspath += client.compileClasspath + client.output
|
||||||
|
@ -119,12 +119,12 @@ afterEvaluate {
|
||||||
logger.lifecycle ' Copyright (C) 2011-2016 Adam Mummery-Smith'
|
logger.lifecycle ' Copyright (C) 2011-2016 Adam Mummery-Smith'
|
||||||
logger.lifecycle ' Running in {} mode', (project.isReleaseBuild ? "RELEASE" : "SNAPSHOT")
|
logger.lifecycle ' Running in {} mode', (project.isReleaseBuild ? "RELEASE" : "SNAPSHOT")
|
||||||
logger.lifecycle '================================================='
|
logger.lifecycle '================================================='
|
||||||
|
allprojects {
|
||||||
makeEclipseCleanRunClient {
|
makeEclipseCleanRunClient {
|
||||||
arguments = ""
|
arguments = ""
|
||||||
jvmArguments = "-Dliteloader.debug=true -Dmixin.debug.verbose=true -Dmixin.debug.verify=true"
|
jvmArguments = "-Dliteloader.debug=true -Dmixin.debug.verbose=true -Dmixin.debug.verify=true"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// hacks for run configs
|
// hacks for run configs
|
||||||
def mc = plugins.getPlugin 'net.minecraftforge.gradle.tweaker-client'
|
def mc = plugins.getPlugin 'net.minecraftforge.gradle.tweaker-client'
|
||||||
mc.replacer.putReplacement '{RUN_CLIENT_MAIN}', project.startClass
|
mc.replacer.putReplacement '{RUN_CLIENT_MAIN}', project.startClass
|
||||||
|
|
|
@ -164,18 +164,18 @@ public abstract class Start
|
||||||
{
|
{
|
||||||
Set<String> args = qualifiedArgs.get(qualifier);
|
Set<String> args = qualifiedArgs.get(qualifier);
|
||||||
|
|
||||||
|
if (args != null && !Start.MULTI_VALUE_ARGS.contains(qualifier))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (args == null)
|
if (args == null)
|
||||||
{
|
{
|
||||||
args = new HashSet<String>();
|
args = new HashSet<String>();
|
||||||
qualifiedArgs.put(qualifier, args);
|
qualifiedArgs.put(qualifier, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Start.MULTI_VALUE_ARGS.contains(qualifier))
|
|
||||||
{
|
|
||||||
args.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
args.add(arg);
|
args.add(arg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getArg(Map<String, Set<String>> qualifiedArgs, String arg)
|
private static String getArg(Map<String, Set<String>> qualifiedArgs, String arg)
|
||||||
|
|
|
@ -650,6 +650,8 @@ public class LiteLoaderEnumerator implements LoaderEnumerator
|
||||||
|
|
||||||
private void addMixinsFrom(MixinContainer<File> container)
|
private void addMixinsFrom(MixinContainer<File> container)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
container.injectIntoClassPath(this.classLoader, true);
|
||||||
for (String config : container.getMixinConfigs())
|
for (String config : container.getMixinConfigs())
|
||||||
{
|
{
|
||||||
if (config.endsWith(".json"))
|
if (config.endsWith(".json"))
|
||||||
|
@ -670,6 +672,10 @@ public class LiteLoaderEnumerator implements LoaderEnumerator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (MalformedURLException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue