This commit is contained in:
cpw 2015-08-01 20:55:58 -04:00
commit 9a859f8d5c
42 changed files with 334 additions and 52148 deletions

3
.gitignore vendored
View File

@ -12,13 +12,14 @@
/.gradle
#occupational hazards
/eclipse/
/projects/
/repo/
/buildSrc
#Patch rejects
*.rej
/patches-/
# FML changelog
changelog.txt
/patches_old/

View File

@ -1,11 +1,6 @@
buildscript {
repositories {
maven {
name = "central_mirrior"
url = "http://uk.maven.org/maven2"
}
mavenCentral()
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
@ -16,71 +11,187 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
}
}
configurations {
deployJars
}
import static net.minecraftforge.gradle.dev.ForgeDevPlugin.*
apply plugin: 'maven'
apply plugin: 'forgedev'
repositories {
maven {
name = "central_mirrior"
url = "http://uk.maven.org/maven2"
}
mavenLocal()
flatDir {
name "fileRepo"
dirs "repo"
}
}
apply plugin: "maven"
apply plugin: "net.minecraftforge.gradle.patcher"
apply plugin: "net.minecraftforge.gradle.launch4j"
minecraft {
version = '1.8'
mcpVersion = '9.10'
mappings = 'snapshot_nodoc_20141130'
fmlDir = projectDir.getAbsolutePath() + "/fml";
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
version = "1.8"
//mappings = 'stable_16'
mappings = "snapshot_nodoc_20141130"
workspaceDir = "projects"
versionJson = "fml/jsons/1.8-dev.json"
buildUserdev = true
buildInstaller = true
installerVersion = "1.4"
def common = {
patchPrefixOriginal "../src-base/minecraft"
patchPrefixChanged "../src-work/minecraft"
mainClassClient "net.minecraft.launchwrapper.Launch"
tweakClassClient "net.minecraftforge.fml.common.launcher.FMLTweaker"
mainClassServer "net.minecraft.launchwrapper.Launch"
tweakClassServer "net.minecraftforge.fml.common.launcher.FMLServerTweaker"
}
projects {
fml {
rootDir 'fml'
patchDir "fml/patches/minecraft"
patchAfter "clean"
genPatchesFrom "clean"
with common
}
forge {
rootDir "."
patchDir "patches/minecraft"
patchAfter "fml"
genPatchesFrom "fml"
with common
}
}
}
group = 'net.minecraftforge'
version = getVersionFromJava(getProject(), 'src/main/java/net/minecraftforge/common/ForgeVersion.java')
version = getVersionFromJava(file("src/main/java/net/minecraftforge/common/ForgeVersion.java"))
jenkins {
job = 'minecraftforge'
extractFmlSources { exclude "**/SideOnly.java", "**/Side.java" }
genGradleProjects { addTestCompileDep "junit:junit:4.12" }
processJson {
releaseJson = "fml/jsons/1.8-rel.json"
addReplacements([
"@minecraft_version@": project.minecraft.version,
"@version@": project.version,
"@project@": "forge",
"@artifact@": "net.minecraftforge:forge:${project.version}",
"@universal_jar@": { outputJar.archiveName },
"@timestamp@": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
])
}
// crowdin stuff
if (project.hasProperty("crowdinKey"))
tasks.getLocalizations.apiKey = project.crowdinKey
task changelog(type: JenkinsChangelog) {
// skip if there is no forge jenkins pass
onlyIf {
project.hasProperty('forgeJenkinsPass')
project.file("build/distributions/${project.name}-${project.version}-changelog.txt").text = ""
}
outputs.upToDateWhen { false } // never up to date
serverRoot = "http://ci.jenkins.minecraftforge.net/"
jobName = "minecraftforge"
targetBuild = System.env['BUILD_NUMBER'] ?: 0;
authName = "console_script"
authPassword = project.hasProperty('forgeJenkinsPass') ? project.getProperty('forgeJenkinsPass') : "";
output = "build/distributions/${project.name}-${project.version}-changelog.txt"
}
task crowdin(type: CrowdinDownload) {
output = "build/crowdin.zip"
projectId = 'minecraft-forge'
extract = false // we wanna keep it as a zip. not extract it to a folder named "crowdin.zip"
// task auomatically skips if this is null
if (project.hasProperty('crowdinKey'))
apiKey = project.crowdinKey
}
def extraTxts = [
changelog, // yeah we can do thi, because gradle and groovy are awesome
"fml/LICENSE-fml.txt",
"fml/CREDITS-fml.txt",
"MinecraftForge-Credits.txt",
"MinecraftForge-License.txt",
"Paulscode SoundSystem CodecIBXM License.txt",
"Paulscode IBXM Library License.txt"
]
outputJar {
classifier = 'universal'
from extraTxts
// add crowdin locales
from { crowdin.getDidWork() ? zipTree(crowdin) : null}
dependsOn 'crowdin'
manifest.attributes([
"Main-Class": "net.minecraftforge.fml.relauncher.ServerLaunchWrapper",
"TweakClass": "net.minecraftforge.fml.common.launcher.FMLTweaker",
"Class-Path": getServerClasspath(file("fml/jsons/1.8-rel.json"))
])
}
installer {
classifier = 'installer'
from extraTxts
from "src/main/resources/forge_logo.png"
rename "forge_logo\\.png", "big_logo.png"
}
task signUniversal(type: SignJar, dependsOn: 'outputJar') {
onlyIf {
project.hasProperty('jarsigner')
}
def jarsigner = [:];
if (project.hasProperty('jarsigner'))
jarsigner = project.jarsigner;
alias = 'forge'
exclude "paulscode/**"
storePass = jarsigner.storepass
keyPass = jarsigner.keypass
keyStore = jarsigner.keystore
inputFile = outputJar.archivePath
outputFile = outputJar.archivePath
}
uploadArchives.dependsOn signUniversal
build.dependsOn signUniversal
// launch4j
launch4j {
jar = installer.archivePath.canonicalPath
outfile = file("build/distributions/${project.name}-${project.version}-installer-win.exe").canonicalPath
icon = file('icon.ico').canonicalPath
manifest = file('l4jManifest.xml').canonicalPath
jreMinVersion = '1.6.0'
initialHeapPercent = 5;
maxHeapPercent = 100;
}
tasks.generateXmlConfig.dependsOn installer
tasks.build.dependsOn 'launch4j'
// MAVEN
artifacts {
archives changelog.output
archives file("build/distributions/${project.name}-${project.version}-installer-win.exe")
}
uploadArchives {
repositories {
add getProject().repositories.mavenLocal()
}
repositories.mavenDeployer {
configuration = configurations.deployJars
if (project.hasProperty("filesmaven")) {
logger.info('Publishing to files server')
repository(url: project.filesmaven.url) {
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
dependsOn 'build'
if (project.hasProperty('forgeMavenPass'))
{
repository(url: "http://files.minecraftforge.net/maven/manage/upload") {
authentication(userName: "forge", password: project.getProperty('forgeMavenPass')) // the elvis operator. look it up.
}
} else {
logger.info('Publishing to repo folder')
}
else
{
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
@ -88,49 +199,125 @@ uploadArchives {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
}
pom.project {
name project.archivesBaseName
packaging 'jar'
description 'Minecraft Forge API'
url 'https://github.com/MinecraftForge/MinecraftForge'
scm {
project {
name project.archivesBaseName
packaging 'jar'
description 'Minecraft Forge API'
url 'https://github.com/MinecraftForge/MinecraftForge'
connection 'scm:git:git://github.com/MinecraftForge/MinecraftForge.git'
developerConnection 'scm:git:git@github.com:MinecraftForge/MinecraftForge.git'
}
issueManagement {
system 'github'
url 'https://github.com/MinecraftForge/MinecraftForge/issues'
}
scm {
url 'https://github.com/MinecraftForge/MinecraftForge'
connection 'scm:git:git://github.com/MinecraftForge/MinecraftForge.git'
developerConnection 'scm:git:git@github.com:MinecraftForge/MinecraftForge.git'
}
licenses {
license {
name 'Forge Public License'
url 'https://raw.github.com/MinecraftForge/MinecraftForge/master/MinecraftForge-License.txt'
distribution 'repo'
issueManagement {
system 'github'
url 'https://github.com/MinecraftForge/MinecraftForge/issues'
}
}
developers {
developer {
id 'cpw'
name 'cpw'
roles { role 'developer' }
licenses {
license {
name 'Forge Public License'
url 'https://raw.github.com/MinecraftForge/MinecraftForge/master/MinecraftForge-License.txt'
distribution 'repo'
}
}
developer {
id 'LexManos'
name 'Lex Manos'
roles { role 'developer' }
}
developer {
id 'AbrarSyed'
name 'Abrar Syed'
roles { role 'contributor' }
developers {
developer {
id 'cpw'
name 'cpw'
roles { role 'developer' }
}
developer {
id 'LexManos'
name 'Lex Manos'
roles { role 'developer' }
}
developer {
id 'AbrarSyed'
name 'Abrar Syed'
roles { role 'contributor' }
}
}
}
}
}
}
// HELPER METHODS
import groovy.json.JsonSlurper;
String getServerClasspath(File file)
{
def node = new JsonSlurper().parse(file);
def out = new StringBuilder()
node.versionInfo.libraries.each { lib ->
if (lib.serverreq)
{
// group : artifact : version
def split = lib.name.split(':')
def group = split[0].replace('.', '/')
def artifact = split[1]
def version = split[2]
out += "libraries/$group/$artifact/$version/$artifact-${version}.jar "
}
}
out += "minecraft_server.${minecraft.version}.jar"
return out.toString();
}
String getVersionFromJava(File file)
{
String major = "0";
String minor = "0";
String revision = "0";
String build = "0";
String prefix = "public static final int";
file.eachLine{ String s ->
s = s.trim();
if (s.startsWith(prefix))
{
s = s.substring(prefix.length(), s.length() - 1);
s = s.replace('=', ' ').replace("Version", "").replaceAll(" +", " ").trim();
String[] pts = s.split(" ");
if (pts[0].equals("major")) major = pts[pts.length - 1];
else if (pts[0] == "minor") minor = pts[pts.length - 1];
else if (pts[0] == "revision") revision = pts[pts.length - 1];
}
}
if (System.getenv().containsKey("BUILD_NUMBER"))
{
build = System.getenv("BUILD_NUMBER");
}
String branch = null;
if (!System.getenv().containsKey("GIT_BRANCH"))
{
// TODO: use grgit
branch = "git rev-parse --abbrev-ref HEAD".execute().text.trim()
}
else
{
branch = System.getenv("GIT_BRANCH");
branch = branch.substring(branch.lastIndexOf('/') + 1);
}
def out = "${minecraft.version.replace('-', '_')}-$major.$minor.$revision.$build"
if (branch && branch != 'master' && branch != 'HEAD')
out += "-$branch"
return out;
}
// re-add old tasks for jenkins compat
// should be remvoed, and the jenkisn fixed when no longer building with FG 1.2
task setupForge { dependsOn 'setup' }
task buildPackages { dependsOn 'build' }

Binary file not shown.

View File

@ -1,112 +0,0 @@
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
import static net.minecraftforge.gradle.dev.FmlDevPlugin.*
apply plugin: 'maven'
apply plugin: 'fmldev'
repositories {
flatDir {
name "fileRepo"
dirs "repo"
}
}
minecraft {
version = '1.8'
mcpVersion = '9.10'
mappings = 'snapshot_nodoc_20141130'
fmlDir = projectDir.getAbsolutePath();
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
installerVersion = "1.4"
}
group = 'net.minecraftforge'
version = getVersionFromGit(getProject())
jenkins {
job = 'fml'
}
uploadArchives {
repositories {
if (project.hasProperty("filesmaven")) {
logger.info('Publishing to files server')
mavenDeployer {
configuration = configurations.deployJars
repository(url: project.filesmaven.url) {
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'ForgeModLoader'
url 'https://github.com/MinecraftForge/FML'
scm {
url 'https://github.com/MinecraftForge/FML'
connection 'scm:git:git://github.com/MinecraftForge/FML.git'
developerConnection 'scm:git:git@github.com:MinecraftForge/FML.git'
}
issueManagement {
system 'github'
url 'https://github.com/MinecraftForge/FML/issues'
}
licenses {
license {
name 'GNU Lesser Public License (LGPL), Version 2.1'
url 'http://www.gnu.org/licenses/lgpl-2.1.txt'
distribution 'repo'
}
}
developers {
developer {
id 'cpw'
name 'cpw'
roles { role 'developer' }
}
developer {
id 'LexManos'
name 'Lex Manos'
roles { role 'developer' }
}
}
}
}
}
} else {
logger.info('Publishing to repo folder')
mavenDeployer {
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
}
}
}

View File

@ -1,19 +0,0 @@
# Artistic Style format configuration
# see http://astyle.sourceforge.net/astyle.html
style=allman
add-brackets
break-closing-brackets
indent-switches
max-instatement-indent=40
pad-oper
pad-header
unpad-paren
break-blocks
delete-empty-lines

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,172 +0,0 @@
[DEFAULT]
DirTemp = temp
DirSrc = src
DirLogs = logs
DirBin = bin
DirJars = jars
DirReobf = reobf
DirConf = conf
DirRuntime = runtime
DirLib = lib
DirTempSrc = temp/src
DirTempCls = temp/cls
DirTempBin = temp/bin
DirModSrc = modsrc
DirEclipse = eclipse
[CSV]
Classes = %(DirConf)s/classes.csv
Methods = %(DirConf)s/methods.csv
Fields = %(DirConf)s/fields.csv
Params = %(DirConf)s/params.csv
NewIds = %(DirConf)s/newids.csv
[SRGS]
ConfClient = %(DirConf)s/joined.srg
ConfServer = %(DirConf)s/joined.srg
Client = %(DirTemp)s/client_rg.srg
Server = %(DirTemp)s/server_rg.srg
DeobfClient = %(DirTemp)s/client_deobf.srg
DeobfServer = %(DirTemp)s/server_deobf.srg
ReobfClient = %(DirTemp)s/client_ro.srg
ReobfServer = %(DirTemp)s/server_ro.srg
ReobfClientSrg = %(DirTemp)s/client_ro_srg.srg
ReobfServerSrg = %(DirTemp)s/server_ro_srg.srg
ReobfClientCls = %(DirTemp)s/client_ro_cls.srg
ReobfServerCls = %(DirTemp)s/server_ro_cls.srg
[JAR]
DirNatives = %(DirJars)s/bin/natives
Client = %(DirJars)s/bin/minecraft.jar
Server = %(DirJars)s/minecraft_server.jar
LWJGL = %(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
MD5Client = 8663a10cecc10eaa683a927ef5371852
MD5Server = 5b19d1a562a8a7c5f9a787ad96c8148b
[RETROGUARD]
Location = %(DirRuntime)s/bin/retroguard.jar
RetroConf = %(DirTemp)s/retroguard.cfg
RetroReobConf = %(DirTemp)s/retroguard_ro.cfg
ClientConf = %(DirTemp)s/client_rg.cfg
ServerConf = %(DirTemp)s/server_rg.cfg
ClientReobConf = %(DirTemp)s/client_ro.cfg
ServerReobConf = %(DirTemp)s/server_ro.cfg
ClientOut = %(DirTemp)s/minecraft_rg.jar
ServerOut = %(DirTemp)s/minecraft_server_rg.jar
ClientLog = %(DirLogs)s/client_rg.log
ServerLog = %(DirLogs)s/server_rg.log
ClientDeobLog = %(DirLogs)s/client_deob.log
ServerDeobLog = %(DirLogs)s/server_deob.log
NullPkg = net/minecraft/src
[EXCEPTOR]
XClientJson = %(DirConf)s/exceptor.json
XServerJson = %(DirConf)s/exceptor.json
XClientCfg = %(DirConf)s/joined.exc
XServerCfg = %(DirConf)s/joined.exc
XClientOut = %(DirTemp)s/minecraft_exc.jar
XServerOut = %(DirTemp)s/minecraft_server_exc.jar
XClientLog = %(DirLogs)s/client_exc.log
XServerLog = %(DirLogs)s/server_exc.log
XClientLogReobf = %(DirLogs)s/client_reobf_exc.log
XServerLogReobf = %(DirLogs)s/server_reobf_exc.log
XClientMeta = %(DirTemp)s/client_meta.log
XServerMeta = %(DirTemp)s/server_meta.log
[DECOMPILE]
ClsClientTemp = %(DirTempCls)s/minecraft
ClsServerTemp = %(DirTempCls)s/minecraft_server
SrcClientTemp = %(DirTempSrc)s/minecraft
SrcServerTemp = %(DirTempSrc)s/minecraft_server
FFSource = net
FFClientIn = %(DirTemp)s/minecraft_ff_in.jar
FFServerIn = %(DirTemp)s/minecraft_server_ff_in.jar
[OUTPUT]
BinClientTemp = %(DirTempBin)s/minecraft
BinServerTemp = %(DirTempBin)s/minecraft_server
SrcClient = %(DirSrc)s/minecraft
SrcServer = %(DirSrc)s/minecraft_server
TestClient = net/minecraft/client/main/Main
TestServer = net/minecraft/server/MinecraftServer
[PATCHES]
PatchClient = %(DirConf)s/patches/minecraft.patch
PatchServer = %(DirConf)s/patches/minecraft_server.patch
PatchTemp = %(DirTemp)s/temp.patch
FFPatchClient = %(DirConf)s/patches/minecraft_ff
FFPatchServer = %(DirConf)s/patches/minecraft_server_ff
PatchClient_osx = %(DirConf)s/patches/minecraft_osx.patch
PatchServer_osx = %(DirConf)s/patches/minecraft_server_osx.patch
[RECOMPILE]
BinClient = %(DirBin)s/minecraft
BinServer = %(DirBin)s/minecraft_server
LogClient = %(DirLogs)s/client_compile.log
LogServer = %(DirLogs)s/server_compile.log
ClassPathClient = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/bin/minecraft.jar,%(DirJars)s/bin/jinput.jar,%(DirJars)s/bin/lwjgl.jar,%(DirJars)s/bin/lwjgl_util.jar
ClassPathServer = %(DirLib)s/,%(DirLib)s/*,%(DirJars)s/minecraft_server.jar
ClientFixes = %(DirConf)s/patches
FixStart = Start
IgnorePkg = paulscode,com,isom,ibxm,de/matthiasmann/twl,org,javax,argo,gnu,io/netty
[REOBF]
MD5Client = %(DirTemp)s/client.md5
MD5Server = %(DirTemp)s/server.md5
MD5PreReobfClient = %(DirTemp)s/client_reobf.md5
MD5PreReobfServer = %(DirTemp)s/server_reobf.md5
RecompJarClient = %(DirTemp)s/client_recomp.jar
RecompJarServer = %(DirTemp)s/server_recomp.jar
ObfJarClient = %(DirTemp)s/client_reobf.jar
ObfJarServer = %(DirTemp)s/server_reobf.jar
ReobfDirClient = %(DirReobf)s/minecraft
ReobfDirServer = %(DirReobf)s/minecraft_server
ClientRoLog = %(DirLogs)s/client_ro.log
ServerRoLog = %(DirLogs)s/server_ro.log
ReobfClientLog = %(DirLogs)s/client_reob.log
ReobfServerLog = %(DirLogs)s/server_reob.log
[GETMODSOURCE]
OutSRCClient = %(DirModSrc)s/minecraft
OutSRCServer = %(DirModSrc)s/minecraft_server
[MCP]
LogFile = %(DirLogs)s/mcp.log
LogFileErr = %(DirLogs)s/mcperr.log
UpdateUrl = http://mcp.ocean-labs.de/files/mcprolling_{version}/
IgnoreUpdate = %(DirBin)s,%(DirLib)s,%(DirLogs)s,%(DirModSrc)s,%(DirReobf)s,%(DirSrc)s,%(DirTemp)s,%(DirEclipse)s/Client/bin,%(DirEclipse)s/Server/bin,%(DirJars)s/world,%(DirJars)s/saves,%(DirJars)s/resources
RGIndex = 180425
[ASTYLE]
AstyleConfig = %(DirConf)s/astyle.cfg
[COMMANDS]
Wine = wine
Patcher_win = %(DirRuntime)s/bin/applydiff.exe
Patcher_linux = patch
Patcher_osx = patch
Jad_win = %(DirRuntime)s/bin/jad.exe
Jad_osx = %(DirRuntime)s/bin/jad-osx
AStyle_win = %(DirRuntime)s/bin/astyle.exe
AStyle_linux = astyle
AStyle_osx = %(DirRuntime)s/bin/astyle-osx
JadRetro = %(DirRuntime)s/bin/jadretro.jar
Fernflower = %(DirRuntime)s/bin/fernflower.jar
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
CmdJadretro = %s -jar %s {targetdir}
CmdFernflower = %s -jar %s -din=1 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
CmdExceptor = %s -jar %s --jarIn {input} --jarOut {output} --mapIn {conf} --log {log} --jsonIn {json} --applyMarkers --generateParams
CmdExceptorDry = %s -jar %s --jarIn {input} --mapIn {conf} --log {log} --jsonIn {json} --applyMarkers
CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start

View File

@ -1,114 +0,0 @@
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.Arrays;
import joptsimple.ArgumentAcceptingOptionSpec;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.main.Main;
public class Start
{
public static void main(String[] args) throws Exception
{
int userIndex = -1;
int passIndex = -1;
int sessIndex = -1;
int versIndex = -1;
for( int x = 0; x < args.length; x++)
{
if (args[x].equals("--username")) userIndex = x + 1;
else if (args[x].equals("--password")) passIndex = x + 1;
else if (args[x].equals("--session")) sessIndex = x + 1;
else if (args[x].equals("--version")) versIndex = x + 1;
}
if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
{
String[] session = getSession(args[userIndex], args[passIndex]);
if (session != null)
{
args[userIndex] = session[0];
args = concat(args, new String[]{"--session", session[1]});
}
}
//Kill the password if its there so it isn't printed to the console.
if (passIndex != -1)
{
args[passIndex-1] = "no_password_for_joo";
args[passIndex] = "no_password_for_joo";
}
if (versIndex == -1)
{
args = concat(args, new String[]{ "--version", "fml_mcp" });
}
Main.main(args);
}
private static String[] getSession(String username, String password) throws UnsupportedEncodingException
{
String parameters = "http://login.minecraft.net/?user=" + URLEncoder.encode(username, "UTF-8") +
"&password=" + URLEncoder.encode(password, "UTF-8") +
"&version=" + 13;
String result = openUrl(parameters);
if (result == null)
{
System.out.println("Can't connect to minecraft.net");
return null;
}
if (!result.contains(":"))
{
System.out.println("Login Failed: " + result);
return null;
}
String[] values = result.split(":");
return new String[]{ values[2].trim(), values[3].trim() };
}
private static String openUrl(String addr)
{
try
{
URL url = new URL(addr);
java.io.InputStream is;
is = url.openConnection().getInputStream();
java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(is));
String buf = "";
String line = null;
while ((line = reader.readLine()) != null)
{
buf += "\n" + line;
}
reader.close();
return buf;
}
catch (IOException e)
{
e.printStackTrace();
}
return null;
}
private static <T> T[] concat(T[] first, T[] second)
{
T[] result = Arrays.copyOf(first, first.length + second.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}

View File

@ -1,22 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
--- minecraft\net\minecraft\client\Minecraft.java
+++ minecraft_patched\net\minecraft\client\Minecraft.java
@@ -695,9 +695,7 @@
while(true) {
try {
- if(!this.field_71425_J) {
- break;
- }
+ while(this.field_71425_J) {
if(!this.field_71434_R || this.field_71433_S == null) {
try {
@@ -711,6 +709,7 @@
}
this.func_71377_b(this.field_71433_S);
+ }
} catch (MinecraftError var12) {
break;
} catch (ReportedException var13) {

View File

@ -1,12 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\Minecraft.java minecraft_patched\net\minecraft\client\Minecraft.java
--- minecraft\net\minecraft\client\Minecraft.java
+++ minecraft_patched\net\minecraft\client\Minecraft.java
@@ -326,7 +326,7 @@
while(true) {
try {
- if(this.field_71425_J) {
+ while(this.field_71425_J) {
if(!this.field_71434_R || this.field_71433_S == null) {
try {
this.func_71411_J();

View File

@ -1,21 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\gui\FontRenderer.java minecraft_patched\net\minecraft\client\gui\FontRenderer.java
--- minecraft\net\minecraft\client\gui\FontRenderer.java
+++ minecraft_patched\net\minecraft\client\gui\FontRenderer.java
@@ -592,8 +592,6 @@
case 10:
--var5;
break;
- case 32:
- var6 = var5;
case 167:
if(var5 < var3 - 1) {
++var5;
@@ -607,6 +605,8 @@
}
}
break;
+ case 32:
+ var6 = var5;
default:
var4 += this.func_78263_a(var8);
if(var7) {

View File

@ -1,37 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\network\NetHandlerPlayClient.java minecraft_patched\net\minecraft\client\network\NetHandlerPlayClient.java
--- minecraft\net\minecraft\client\network\NetHandlerPlayClient.java
+++ minecraft_patched\net\minecraft\client\network\NetHandlerPlayClient.java
@@ -1275,14 +1275,14 @@
private static final String __OBFID = "CL_00002622";
public void func_73878_a(boolean p_73878_1_, int p_73878_2_) {
- NetHandlerPlayClient.thisxxx.field_147299_f = Minecraft.func_71410_x();
+ NetHandlerPlayClient.this.field_147299_f = Minecraft.func_71410_x();
if(p_73878_1_) {
- if(NetHandlerPlayClient.thisxx.field_147299_f.func_147104_D() != null) {
- NetHandlerPlayClient.thisxxxxxxx.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.ENABLED);
+ if(NetHandlerPlayClient.this.field_147299_f.func_147104_D() != null) {
+ NetHandlerPlayClient.this.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.ENABLED);
}
NetHandlerPlayClient.this.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3, C19PacketResourcePackStatus.Action.ACCEPTED));
- Futures.addCallback(NetHandlerPlayClient.thisx.field_147299_f.func_110438_M().func_180601_a(var2, var3), new FutureCallback() {
+ Futures.addCallback(NetHandlerPlayClient.this.field_147299_f.func_110438_M().func_180601_a(var2, var3), new FutureCallback() {
private static final String __OBFID = "CL_00002621";
@@ -1294,11 +1294,11 @@
}
});
} else {
- if(NetHandlerPlayClient.thisxxxx.field_147299_f.func_147104_D() != null) {
- NetHandlerPlayClient.thisxxxxx.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.DISABLED);
+ if(NetHandlerPlayClient.this.field_147299_f.func_147104_D() != null) {
+ NetHandlerPlayClient.this.field_147299_f.func_147104_D().func_152584_a(ServerData.ServerResourceMode.DISABLED);
}
- NetHandlerPlayClient.thisxxxxxx.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3x, C19PacketResourcePackStatus.Action.DECLINED));
+ NetHandlerPlayClient.this.field_147302_e.func_179290_a(new C19PacketResourcePackStatus(var3, C19PacketResourcePackStatus.Action.DECLINED));
}
ServerList.func_147414_b(NetHandlerPlayClient.this.field_147299_f.func_147104_D());

View File

@ -1,13 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\particle\EffectRenderer.java minecraft_patched\net\minecraft\client\particle\EffectRenderer.java
--- minecraft\net\minecraft\client\particle\EffectRenderer.java
+++ minecraft_patched\net\minecraft\client\particle\EffectRenderer.java
@@ -242,7 +242,8 @@
GlStateManager.func_179112_b(770, 771);
GlStateManager.func_179092_a(516, 0.003921569F);
- for(final int var8 = 0; var8 < 3; ++var8) {
+ for(int var8_nf = 0; var8_nf < 3; ++var8_nf) {
+ final int var8 = var8_nf;
for(int var9 = 0; var9 < 2; ++var9) {
if(!this.field_78876_b[var8][var9].isEmpty()) {
switch(var9) {

View File

@ -1,12 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java minecraft_patched\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
--- minecraft\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
+++ minecraft_patched\net\minecraft\client\renderer\block\model\ModelBlockDefinition.java
@@ -82,7 +82,7 @@
public ModelBlockDefinition func_178336_a(JsonElement p_178336_1_, Type p_178336_2_, JsonDeserializationContext p_178336_3_) {
JsonObject var4 = p_178336_1_.getAsJsonObject();
List var5 = this.func_178334_a(p_178336_3_, var4);
- return new ModelBlockDefinition(var5);
+ return new ModelBlockDefinition((Collection)var5);
}
protected List func_178334_a(JsonDeserializationContext p_178334_1_, JsonObject p_178334_2_) {

View File

@ -1,30 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\renderer\texture\TextureManager.java minecraft_patched\net\minecraft\client\renderer\texture\TextureManager.java
--- minecraft\net\minecraft\client\renderer\texture\TextureManager.java
+++ minecraft_patched\net\minecraft\client\renderer\texture\TextureManager.java
@@ -57,13 +57,14 @@
public boolean func_110579_a(ResourceLocation p_110579_1_, final ITextureObject p_110579_2_) {
boolean var3 = true;
-
+ ITextureObject p_110579_2_2 = p_110579_2_;
+
try {
((ITextureObject)p_110579_2_).func_110551_a(this.field_110582_d);
} catch (IOException var8) {
field_147646_a.warn("Failed to load texture: " + p_110579_1_, var8);
- p_110579_2_ = TextureUtil.field_111001_a;
- this.field_110585_a.put(p_110579_1_, p_110579_2_);
+ p_110579_2_2 = TextureUtil.field_111001_a;
+ this.field_110585_a.put(p_110579_1_, p_110579_2_2);
var3 = false;
} catch (Throwable var9) {
CrashReport var5 = CrashReport.func_85055_a(var9, "Registering texture");
@@ -80,7 +81,7 @@
throw new ReportedException(var5);
}
- this.field_110585_a.put(p_110579_1_, p_110579_2_);
+ this.field_110585_a.put(p_110579_1_, p_110579_2_2);
return var3;
}

View File

@ -1,12 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\client\resources\FolderResourcePack.java minecraft_patched\net\minecraft\client\resources\FolderResourcePack.java
--- minecraft\net\minecraft\client\resources\FolderResourcePack.java
+++ minecraft_patched\net\minecraft\client\resources\FolderResourcePack.java
@@ -31,7 +31,7 @@
HashSet var1 = Sets.newHashSet();
File var2 = new File(this.field_110597_b, "assets/");
if(var2.isDirectory()) {
- File[] var3 = var2.listFiles(DirectoryFileFilter.DIRECTORY);
+ File[] var3 = var2.listFiles((java.io.FileFilter)DirectoryFileFilter.DIRECTORY);
int var4 = var3.length;
for(int var5 = 0; var5 < var4; ++var5) {

View File

@ -1,100 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\command\PlayerSelector.java minecraft_patched\net\minecraft\command\PlayerSelector.java
--- minecraft\net\minecraft\command\PlayerSelector.java
+++ minecraft_patched\net\minecraft\command\PlayerSelector.java
@@ -135,7 +135,7 @@
private static List func_179663_a(Map p_179663_0_, String p_179663_1_) {
ArrayList var2 = Lists.newArrayList();
- final String var3 = func_179651_b(p_179663_0_, "type");
+ String var3 = func_179651_b(p_179663_0_, "type");
final boolean var4 = var3 != null && var3.startsWith("!");
if(var4) {
var3 = var3.substring(1);
@@ -159,12 +159,13 @@
});
}
} else {
+ final String var3_f = var3;
var2.add(new Predicate() {
private static final String __OBFID = "CL_00002362";
public boolean func_179613_a(Entity p_179613_1_) {
- return EntityList.func_180123_a(p_179613_1_, var3) != var4;
+ return EntityList.func_180123_a(p_179613_1_, var3_f) != var4;
}
// $FF: synthetic method
public boolean apply(Object p_apply_1_) {
@@ -231,13 +232,14 @@
private static List func_179659_d(Map p_179659_0_) {
ArrayList var1 = Lists.newArrayList();
- final String var2 = func_179651_b(p_179659_0_, "team");
+ String var2 = func_179651_b(p_179659_0_, "team");
final boolean var3 = var2 != null && var2.startsWith("!");
if(var3) {
var2 = var2.substring(1);
}
if(var2 != null) {
+ final String var2_f = var2;
var1.add(new Predicate() {
private static final String __OBFID = "CL_00002355";
@@ -249,7 +251,7 @@
EntityLivingBase var2x = (EntityLivingBase)p_179621_1_;
Team var3x = var2x.func_96124_cp();
String var4 = var3x == null?"":var3x.func_96661_b();
- return var4.equals(var2) != var3;
+ return var4.equals(var2_f) != var3;
}
}
// $FF: synthetic method
@@ -321,19 +323,20 @@
private static List func_179647_f(Map p_179647_0_) {
ArrayList var1 = Lists.newArrayList();
- final String var2 = func_179651_b(p_179647_0_, "name");
+ String var2 = func_179651_b(p_179647_0_, "name");
final boolean var3 = var2 != null && var2.startsWith("!");
if(var3) {
var2 = var2.substring(1);
}
if(var2 != null) {
+ final String var2_f = var2;
var1.add(new Predicate() {
private static final String __OBFID = "CL_00002353";
public boolean func_179600_a(Entity p_179600_1_) {
- return p_179600_1_.func_70005_c_().equals(var2) != var3;
+ return p_179600_1_.func_70005_c_().equals(var2_f) != var3;
}
// $FF: synthetic method
public boolean apply(Object p_apply_1_) {
@@ -372,11 +375,9 @@
private static List func_179662_g(Map p_179662_0_) {
ArrayList var1 = Lists.newArrayList();
- final int var2;
- final int var3;
if(p_179662_0_.containsKey("rym") || p_179662_0_.containsKey("ry")) {
- var2 = func_179650_a(func_179653_a(p_179662_0_, "rym", 0));
- var3 = func_179650_a(func_179653_a(p_179662_0_, "ry", 359));
+ final int var2 = func_179650_a(func_179653_a(p_179662_0_, "rym", 0));
+ final int var3 = func_179650_a(func_179653_a(p_179662_0_, "ry", 359));
var1.add(new Predicate() {
private static final String __OBFID = "CL_00002351";
@@ -393,8 +394,8 @@
}
if(p_179662_0_.containsKey("rxm") || p_179662_0_.containsKey("rx")) {
- var2 = func_179650_a(func_179653_a(p_179662_0_, "rxm", 0));
- var3 = func_179650_a(func_179653_a(p_179662_0_, "rx", 359));
+ final int var2 = func_179650_a(func_179653_a(p_179662_0_, "rxm", 0));
+ final int var3 = func_179650_a(func_179653_a(p_179662_0_, "rx", 359));
var1.add(new Predicate() {
private static final String __OBFID = "CL_00002361";

View File

@ -1,34 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\inventory\ContainerPlayer.java minecraft_patched\net\minecraft\inventory\ContainerPlayer.java
--- minecraft\net\minecraft\inventory\ContainerPlayer.java
+++ minecraft_patched\net\minecraft\inventory\ContainerPlayer.java
@@ -28,7 +28,7 @@
this.field_82862_h = p_i1819_3_;
this.func_75146_a(new SlotCrafting(p_i1819_1_.field_70458_d, this.field_75181_e, this.field_75179_f, 0, 144, 36));
- final int var4;
+ int var4;
int var5;
for(var4 = 0; var4 < 2; ++var4) {
for(var5 = 0; var5 < 2; ++var5) {
@@ -37,6 +37,7 @@
}
for(var4 = 0; var4 < 4; ++var4) {
+ final int var44 = var4;
this.func_75146_a(new Slot(p_i1819_1_, p_i1819_1_.func_70302_i_() - 1 - var4, 8, 8 + var4 * 18) {
private static final String __OBFID = "CL_00001755";
@@ -45,11 +46,11 @@
return 1;
}
public boolean func_75214_a(ItemStack p_75214_1_) {
- return p_75214_1_ == null?false:(p_75214_1_.func_77973_b() instanceof ItemArmor?((ItemArmor)p_75214_1_.func_77973_b()).field_77881_a == var4:(p_75214_1_.func_77973_b() != Item.func_150898_a(Blocks.field_150423_aK) && p_75214_1_.func_77973_b() != Items.field_151144_bL?false:var4 == 0));
+ return p_75214_1_ == null?false:(p_75214_1_.func_77973_b() instanceof ItemArmor?((ItemArmor)p_75214_1_.func_77973_b()).field_77881_a == var44:(p_75214_1_.func_77973_b() != Item.func_150898_a(Blocks.field_150423_aK) && p_75214_1_.func_77973_b() != Items.field_151144_bL?false:var44 == 0));
}
@SideOnly(Side.CLIENT)
public String func_178171_c() {
- return ItemArmor.field_94603_a[var4];
+ return ItemArmor.field_94603_a[var44];
}
});
}

View File

@ -1,14 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\network\PacketBuffer.java minecraft_patched\net\minecraft\network\PacketBuffer.java
--- minecraft\net\minecraft\network\PacketBuffer.java
+++ minecraft_patched\net\minecraft\network\PacketBuffer.java
@@ -799,10 +799,4 @@
public boolean release(int p_release_1_) {
return this.field_150794_a.release(p_release_1_);
}
-
- // $FF: synthetic method
- // $FF: bridge method
- public int compareTo(Object p_compareTo_1_) {
- return this.compareTo((ByteBuf)p_compareTo_1_);
- }
}

View File

@ -1,14 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\server\network\NetHandlerLoginServer.java minecraft_patched\net\minecraft\server\network\NetHandlerLoginServer.java
--- minecraft\net\minecraft\server\network\NetHandlerLoginServer.java
+++ minecraft_patched\net\minecraft\server\network\NetHandlerLoginServer.java
@@ -95,10 +95,6 @@
public void operationComplete(ChannelFuture p_operationComplete_1_) {
NetHandlerLoginServer.this.field_147333_a.func_179289_a(NetHandlerLoginServer.this.field_147327_f.func_175577_aI());
}
- // $FF: synthetic method
- public void operationComplete(Future p_operationComplete_1_) {
- this.operationComplete((ChannelFuture)p_operationComplete_1_);
- }
}, new GenericFutureListener[0]);
}

View File

@ -1,12 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\util\BlockPos.java minecraft_patched\net\minecraft\util\BlockPos.java
--- minecraft\net\minecraft\util\BlockPos.java
+++ minecraft_patched\net\minecraft\util\BlockPos.java
@@ -194,7 +194,7 @@
protected BlockPos.MutableBlockPos func_179313_a() {
if(this.field_179314_b == null) {
- this.field_179314_b = new BlockPos.MutableBlockPos(var2xxx.func_177958_n(), var2.func_177956_o(), var2x.func_177952_p(), null);
+ this.field_179314_b = new BlockPos.MutableBlockPos(var2.func_177958_n(), var2.func_177956_o(), var2.func_177952_p(), null);
return this.field_179314_b;
} else if(this.field_179314_b.equals(var3)) {
return (BlockPos.MutableBlockPos)this.endOfData();

View File

@ -1,11 +0,0 @@
diff -r -U 3 minecraft\net\minecraft\world\storage\ThreadedFileIOBase.java minecraft_patched\net\minecraft\world\storage\ThreadedFileIOBase.java
--- minecraft\net\minecraft\world\storage\ThreadedFileIOBase.java
+++ minecraft_patched\net\minecraft\world\storage\ThreadedFileIOBase.java
@@ -25,6 +25,7 @@
}
public void run() {
+ while(true)
this.func_75736_b();
}

View File

@ -1,4 +0,0 @@
[VERSION]
MCPVersion = 9.10
ClientVersion = 1.8
ServerVersion = 1.8

Binary file not shown.

Binary file not shown.

164
fml/gradlew vendored
View File

@ -1,164 +0,0 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
fml/gradlew.bat vendored
View File

@ -1,90 +0,0 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -5,13 +5,9 @@ buildscript {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT'
}
}
@ -43,6 +39,14 @@ dependencies {
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// the 'provided' configuration is for optioanl dependencies
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
// except that these dependencies get remapped to your current MCP mappings
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

View File

<