Embed mixin
This commit is contained in:
parent
662e11ff4c
commit
29307cfc08
4 changed files with 31 additions and 44 deletions
42
build.gradle
42
build.gradle
|
@ -21,26 +21,22 @@ apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url = "https://jitpack.io" }
|
maven { url = "https://jitpack.io" }
|
||||||
maven {
|
maven { url = 'http://oss.sonatype.org/content/repositories/public/' }
|
||||||
name = 'sonatype'
|
|
||||||
url = 'http://oss.sonatype.org/content/repositories/public/'
|
|
||||||
}
|
|
||||||
maven { url = "http://repo.spongepowered.org/maven" }
|
maven { url = "http://repo.spongepowered.org/maven" }
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
embed
|
embed
|
||||||
coreShadow
|
implementation.extendsFrom(embed)
|
||||||
compile.extendsFrom(embed)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
embed 'com.flowpowered:flow-math:1.0.3'
|
embed 'com.flowpowered:flow-math:1.0.3'
|
||||||
embed 'org.jgrapht:jgrapht-core:1.1.0'
|
embed 'org.jgrapht:jgrapht-core:1.1.0'
|
||||||
embed 'com.github.DimensionalDevelopment:poly2tri.java:master-SNAPSHOT'
|
embed 'com.github.DimensionalDevelopment:poly2tri.java:master-SNAPSHOT'
|
||||||
|
embed("org.spongepowered:mixin:0.7.8-SNAPSHOT") { transitive = false }
|
||||||
compileOnly 'com.github.DimensionalDevelopment:AnnotatedNBT:-SNAPSHOT'
|
compileOnly 'com.github.DimensionalDevelopment:AnnotatedNBT:-SNAPSHOT'
|
||||||
compile("org.spongepowered:mixin:0.7.8-SNAPSHOT") { transitive = false }
|
compileOnly 'io.github.opencubicchunks:cubicchunks:1.12.2-0.0.819.0-SNAPSHOT'
|
||||||
deobfProvided 'io.github.opencubicchunks:cubicchunks:1.12.2-0.0.819.0-SNAPSHOT'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mod version
|
// Mod version
|
||||||
|
@ -67,14 +63,14 @@ ext.mcversion = "1.12.2"
|
||||||
ext.forgeversion = "14.23.2.2623"
|
ext.forgeversion = "14.23.2.2623"
|
||||||
String mcpversion = "snapshot_20180227"
|
String mcpversion = "snapshot_20180227"
|
||||||
|
|
||||||
|
// Configuration
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "$mcversion-$forgeversion"
|
version = "$mcversion-$forgeversion"
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
mappings = mcpversion
|
mappings = mcpversion
|
||||||
replace '${version}', fullVersion
|
replace '${version}', fullVersion
|
||||||
makeObfSourceJar = false
|
makeObfSourceJar = false
|
||||||
//noinspection GroovyUnusedAssignment
|
ext.args = [
|
||||||
def args = [
|
|
||||||
"-Dfml.noGrab=false",
|
"-Dfml.noGrab=false",
|
||||||
"-Dfml.coreMods.load=org.dimdev.vanillafix.VanillaFixCoreMod",
|
"-Dfml.coreMods.load=org.dimdev.vanillafix.VanillaFixCoreMod",
|
||||||
"-Dmixin.env.compatLevel=JAVA_8",
|
"-Dmixin.env.compatLevel=JAVA_8",
|
||||||
|
@ -85,8 +81,10 @@ minecraft {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin {
|
sourceSets {
|
||||||
add sourceSets.main, "org.dimdev.vanillafix.mixins.refmap.json"
|
main {
|
||||||
|
ext.refMap = "mixins.vanillafix.refmap.json"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tasks
|
// Tasks
|
||||||
|
@ -96,16 +94,14 @@ compileJava {
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveName = archivesBaseName + "-" + jarVersion + ".jar"
|
archiveName = archivesBaseName + "-" + jarVersion + ".jar"
|
||||||
from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
|
from(configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }) {
|
||||||
manifest {
|
exclude "LICENSE.txt", "META-INF/MANIFSET.MF", "META-INF/maven/**", "META-INF/*.RSA", "META-INF/*.SF"
|
||||||
attributes(
|
|
||||||
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
|
|
||||||
"FMLCorePlugin": "org.dimdev.vanillafix.VanillaFixCoreMod",
|
|
||||||
"TweakOrder": 0,
|
|
||||||
"MixinConfigs": "org.dimdev.vanillafix.mixins.json",
|
|
||||||
"ForceLoadAsMod": "true"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
manifest.attributes(
|
||||||
|
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
|
||||||
|
"MixinConfigs": "mixins.vanillafix.json",
|
||||||
|
"FMLCorePlugin": "org.dimdev.vanillafix.VanillaFixCoreMod"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||||
|
@ -126,7 +122,6 @@ processResources {
|
||||||
// Replace stuff in mcmod.info, nothing else
|
// Replace stuff in mcmod.info, nothing else
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
// replace version and mcversion
|
|
||||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +135,5 @@ task generatePocketSchematics(dependsOn: jar, type: JavaExec, group: "dimdoors")
|
||||||
classpath = files('build/libs/' + jar.archiveName)
|
classpath = files('build/libs/' + jar.archiveName)
|
||||||
classpath += sourceSets.main.runtimeClasspath
|
classpath += sourceSets.main.runtimeClasspath
|
||||||
main = "org.dimdev.dimdoors.shared.tools.SchematicGenerator"
|
main = "org.dimdev.dimdoors.shared.tools.SchematicGenerator"
|
||||||
//noinspection GroovyAssignabilityCheck (IntelliJ is wrong)
|
args = ["src/main/resources/assets/dimdoors/pockets/schematic"]
|
||||||
args "src/main/resources/assets/dimdoors/pockets/schematic"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class VanillaFixCoreMod implements IFMLLoadingPlugin {
|
||||||
|
|
||||||
public VanillaFixCoreMod() {
|
public VanillaFixCoreMod() {
|
||||||
MixinBootstrap.init();
|
MixinBootstrap.init();
|
||||||
Mixins.addConfiguration("org.dimdev.vanillafix.mixins.json");
|
Mixins.addConfiguration("mixins.vanillafix.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String[] getASMTransformerClass() {
|
@Override public String[] getASMTransformerClass() {
|
||||||
|
|
12
src/main/resources/mixins.vanillafix.json
Normal file
12
src/main/resources/mixins.vanillafix.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"package": "org.dimdev.vanillafix.mixins",
|
||||||
|
"refmap": "mixins.vanillafix.refmap.json",
|
||||||
|
"target": "@env(DEFAULT)",
|
||||||
|
"compatibilityLevel": "JAVA_8",
|
||||||
|
"mixins": [
|
||||||
|
"MixinNetHandlerPlayServer"
|
||||||
|
],
|
||||||
|
"client": [
|
||||||
|
"client.MixinMinecraft"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"required": true,
|
|
||||||
"package": "org.dimdev.vanillafix.mixins",
|
|
||||||
"refmap": "org.dimdev.vanillafix.mixins.refmap.json",
|
|
||||||
"compatibilityLevel": "JAVA_8",
|
|
||||||
"minVersion": "0.6.15-SNAPSHOT",
|
|
||||||
"mixins": [
|
|
||||||
"MixinNetHandlerPlayServer"
|
|
||||||
],
|
|
||||||
"client": [
|
|
||||||
"client.MixinMinecraft"],
|
|
||||||
"server": [],
|
|
||||||
"injectors": {
|
|
||||||
"defaultRequire": 1
|
|
||||||
},
|
|
||||||
"overwrites": {
|
|
||||||
"conformVisibility": true
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue