-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from NOVA-Team/mc1.11
Minecraft 1.11.2 wrappers
- Loading branch information
Showing
130 changed files
with
14,294 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
!/build.gradle | ||
!/.gitignore | ||
|
||
!/1.11.2 | ||
!/1.8 | ||
!/1.7.10 |
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,17 @@ | ||
# Ignore All | ||
/* | ||
|
||
# Sources | ||
!/src | ||
|
||
# github | ||
!/.gitignore | ||
!/README.md | ||
|
||
# gradle | ||
!/build.gradle | ||
!/build.properties | ||
!/settings.gradle | ||
!/gradle.properties | ||
!/gradlew* | ||
!/gradle |
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,143 @@ | ||
apply from: "https://raw.githubusercontent.com/NOVA-Team/NOVA-Gradle/master/shared-scripts/java.gradle" | ||
|
||
apply plugin: "com.jfrog.artifactory" | ||
apply plugin: "com.github.johnrengelman.shadow" | ||
apply plugin: "maven-publish" | ||
|
||
idea.module.name = "Core-MC-1.11.2" | ||
archivesBaseName = "NOVA-Core-Wrapper-MC1.11.2" | ||
|
||
configurations { | ||
fatJar | ||
compile.extendsFrom fatJar | ||
// Exclude slf4j-log4j from tests (we use slf4j-simple) | ||
testRuntime.exclude module: 'slf4j-log4j12' | ||
testRuntime.exclude module: 'log4j-slf4j-impl' | ||
} | ||
|
||
dependencies { | ||
fatJar project(":") | ||
fatJar 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-beta9' | ||
testCompile project(path: ':', configuration: 'wrapperTests') | ||
|
||
testCompile "junit:junit:4.12" | ||
testCompile 'org.assertj:assertj-core:3.0.0' | ||
testRuntime 'org.slf4j:slf4j-simple:1.7.10' | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes 'FMLCorePlugin': 'nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftCore' | ||
attributes 'FMLCorePluginContainsFMLMod': 'true' | ||
attributes 'FMLAT': 'nova_at.cfg' | ||
} | ||
} | ||
|
||
task deobfJar(type: Jar) { | ||
from sourceSets.main.output | ||
classifier = 'deobf' | ||
manifest { | ||
attributes 'FMLCorePlugin': 'nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftCore' | ||
attributes 'FMLCorePluginContainsFMLMod': 'true' | ||
attributes 'FMLAT': 'nova_at.cfg' | ||
} | ||
} | ||
|
||
/** | ||
* Create fat jar file with all dependencies included. | ||
*/ | ||
task fatJar(type: Jar) { | ||
configurations.fatJar.each {dep -> | ||
from(project.zipTree(dep)) { | ||
exclude 'META-INF', 'META-INF/**' | ||
} | ||
} | ||
with jar | ||
|
||
manifest { | ||
attributes 'FMLCorePlugin': 'nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftCore' | ||
attributes 'FMLCorePluginContainsFMLMod': 'true' | ||
attributes 'FMLAT': 'nova_at.cfg' | ||
} | ||
classifier = 'fat' | ||
|
||
doLast { | ||
reobfFatJar.execute() | ||
} | ||
} | ||
|
||
artifacts { | ||
archives deobfJar | ||
archives fatJar | ||
} | ||
|
||
publishing { | ||
publications { | ||
main(MavenPublication) { | ||
from components.java | ||
|
||
artifactId archivesBaseName | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
artifact deobfJar | ||
artifact fatJar | ||
|
||
pom.withXml(writePom(project.properties)) | ||
pom.withXml {xml -> | ||
def children = xml.asNode().get("dependencies")[0] | ||
for (child in children) { | ||
def artifactId = child.get("artifactId")[0].value()[0] | ||
if (artifactId.equals("forgeSrc") || artifactId.equals("forgeBin")) { | ||
children.remove(child) | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
artifactory { | ||
publish { | ||
defaults { | ||
publications("main") | ||
publishPom = true | ||
} | ||
} | ||
} | ||
|
||
apply plugin: 'net.minecraftforge.gradle.forge' | ||
|
||
minecraft { | ||
version = property("minecraft.version") + "-" + property("forge.version") | ||
mappings = 'snapshot_20170612' | ||
runDir = "run" | ||
} | ||
|
||
reobf { | ||
// TODO Figure out how to make this work with maven-publish (creates a new task 'reobfFatJar' that isn't compatible with maven-publish) | ||
fatJar {classpath += configurations.compile} | ||
} | ||
|
||
runClient { | ||
jvmArgs '-Dfml.coreMods.load=nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftCore' | ||
} | ||
|
||
runServer { | ||
jvmArgs '-Dfml.coreMods.load=nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftCore' | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
inputs.property "mcversion", project.minecraft.version | ||
|
||
from(sourceSets.main.resources.srcDirs) { | ||
include 'mcmod.info', 'fmlbranding.properties' | ||
expand 'version': project.version, 'mcversion': project.minecraft.version | ||
} | ||
|
||
from(sourceSets.main.resources.srcDirs) { | ||
exclude 'mcmod.info', 'fmlbranding.properties' | ||
} | ||
} |
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,10 @@ | ||
group = nova.core | ||
|
||
minecraft.version = 1.11.2 | ||
forge.version = 13.20.1.2386 | ||
forgeGradleVersion = 2.2-SNAPSHOT | ||
|
||
packaging = jar | ||
info.inceptionYear = 2016 | ||
info.description = The wrapper of the Nova API to the MinecraftForge 1.11.2 modding system. | ||
info.organization.name = NOVA |
55 changes: 55 additions & 0 deletions
55
minecraft/1.11.2/src/main/java/nova/core/wrapper/mc/forge/v1_11_2/NovaMinecraftCore.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,55 @@ | ||
/* | ||
* Copyright (c) 2015 NOVA, All rights reserved. | ||
* This library is free software, licensed under GNU Lesser General Public License version 3 | ||
* | ||
* This file is part of NOVA. | ||
* | ||
* NOVA is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* NOVA is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with NOVA. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package nova.core.wrapper.mc.forge.v1_11_2; | ||
|
||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; | ||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.MCVersion; | ||
import nova.core.wrapper.mc.forge.v1_11_2.asm.transformers.Transformers; | ||
|
||
import java.util.Map; | ||
|
||
@MCVersion(value = "1.11.2") | ||
public class NovaMinecraftCore implements IFMLLoadingPlugin { | ||
@Override | ||
public String[] getASMTransformerClass() { | ||
return new String[] { Transformers.class.getName() }; | ||
} | ||
|
||
@Override | ||
public String getModContainerClass() { | ||
return "nova.core.wrapper.mc.forge.v1_11_2.NovaMinecraftPreloader"; | ||
} | ||
|
||
@Override | ||
public String getSetupClass() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void injectData(Map<String, Object> data) { | ||
|
||
} | ||
|
||
@Override | ||
public String getAccessTransformerClass() { | ||
return null; | ||
} | ||
} |
Oops, something went wrong.