commit 7cf632a721a0aef2f83f84a14ed263742dbfa668 Author: cpw Date: Sun Aug 2 00:03:47 2015 -0400 Vestigal fml-ectomy. diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..b45931f --- /dev/null +++ b/README.txt @@ -0,0 +1,59 @@ +------------------------------------------- +Source installation information for modders +------------------------------------------- +This code follows the Minecraft Forge installation methodology. It will apply +some small patches to the vanilla MCP source code, giving you and it access +to some of the data and functions you need to build a successful mod. + +Note also that the patches are built against "unrenamed" MCP source code (aka +srgnames) - this means that you will not be able to read them directly against +normal code. + +Source pack installation information: + +Standalone source installation +============================== + +Step 1: Open your command-line and browse to the folder where you extracted the zip file. + +Step 2: Once you have a command window up in the folder that the downloaded material was placed, type: + +Windows: "gradlew setupDecompWorkspace" +Linux/Mac OS: "./gradlew setupDecompWorkspace" + +Step 3: After all that finished, you're left with a choice. +For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux) + +If you preffer to use IntelliJ, steps are a little different. +1. Open IDEA, and import project. +2. Select your build.gradle file and have it import. +3. Once it's finished you must close IntelliJ and run the following command: + +"gradlew genIntellijRuns" (./gradlew genIntellijRuns if you are on Mac/Linux) + +Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project) + +If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not effect your code} and then start the processs again. + +Should it still not work, +Refer to #ForgeGradle on EsperNet for more information about the gradle environment. + +Tip: +If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following: +"setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code. +"setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work. + +Tip: +When using Decomp workspace, the Minecraft source code is NOT added to your workspace in a editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes and usually can be accessed under the 'referenced libraries' section of your IDE. + +Forge source installation +========================= +MinecraftForge ships with this code and installs it as part of the forge +installation process, no further action is required on your part. + +LexManos' Install Video +======================= +https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be + +For more details update more often refer to the Forge Forums: +http://www.minecraftforge.net/forum/index.php/topic,14048.0.html diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..1b50aeb --- /dev/null +++ b/build.gradle @@ -0,0 +1,74 @@ +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' + } +} + +apply plugin: '${name}' + +version = "1.0" +group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = "modid" + +minecraft { + version = "${version}" + runDir = "eclipse" + + // the mappings can be changed at any time, and must be in the following format. + // snapshot_YYYYMMDD snapshot are built nightly. + // stable_# stables are built at the discretion of the MCP team. + // Use non-default mappings at your own risk. they may not allways work. + // simply re-run your setup task after changing the mappings to update your workspace. + mappings = "${mappings}" +} + +dependencies { + // you may put jars on which you depend on in ./libs + // or you may define them like so.. + //compile "some.group:artifact:version:classifier" + //compile "some.group:artifact:version" + + // real examples + //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 + +} + +processResources +{ + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand 'version':project.version, 'mcversion':project.minecraft.version + } + + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } +} diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.location b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.projects/Minecraft/.location new file mode 100644 index 0000000..e69de29 diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/0.tree b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/0.tree new file mode 100644 index 0000000..897e2b8 Binary files /dev/null and b/eclipse/.metadata/.plugins/org.eclipse.core.resources/.root/0.tree differ diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..466d7f9 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +#Sun Jun 05 18:58:07 CEST 2011 +version=1 +eclipse.preferences.version=1 +refresh.enabled=true diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs new file mode 100644 index 0000000..94c5676 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -0,0 +1,7 @@ +#Sun Jun 05 19:03:53 CEST 2011 +eclipse.preferences.version=1 +org.eclipse.debug.ui.UseContextualLaunch=false +Console.highWaterMark=88000 +org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\r\n\r\n +org.eclipse.debug.ui.user_view_bindings=\r\n\r\n\r\n\r\n\r\n\r\n +StringVariablePreferencePage=130,107,107,86, diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs new file mode 100644 index 0000000..333b991 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs @@ -0,0 +1,3 @@ +#Sun Jun 05 18:58:07 CEST 2011 +eclipse.preferences.version=1 +org.eclipse.epp.usagedata.gathering.enabled=false diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..12ec368 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +#Sun Sep 18 16:44:39 NZST 2011 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=ignore +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs new file mode 100644 index 0000000..316ef6f --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs @@ -0,0 +1,4 @@ +#Sun Jun 05 18:58:05 CEST 2011 +spacesForTabs=true +eclipse.preferences.version=1 +overviewRuler_migration=migrated_3.1 diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000..ae368ab --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,9 @@ +#Sun Jun 05 18:58:07 CEST 2011 +IMPORT_FILES_AND_FOLDERS_MODE=prompt +IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt +SAVE_ALL_BEFORE_BUILD=true +eclipse.preferences.version=1 +tipsAndTricks=true +platformState=1287081747687 +quickStart=false +PROBLEMS_FILTERS_MIGRATE=true diff --git a/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs new file mode 100644 index 0000000..cbc5953 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs @@ -0,0 +1,3 @@ +#Sun Jun 05 18:50:08 CEST 2011 +eclipse.preferences.version=1 +showIntro=false diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch new file mode 100644 index 0000000..a639572 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Client.launch @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch new file mode 100644 index 0000000..395f317 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.debug.core/.launches/Server.launch @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml new file mode 100644 index 0000000..1208f60 --- /dev/null +++ b/eclipse/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java new file mode 100644 index 0000000..82123bc --- /dev/null +++ b/src/main/java/com/example/examplemod/ExampleMod.java @@ -0,0 +1,20 @@ +package com.example.examplemod; + +import net.minecraft.init.Blocks; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; + +@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) +public class ExampleMod +{ + public static final String MODID = "examplemod"; + public static final String VERSION = "1.0"; + + @EventHandler + public void init(FMLInitializationEvent event) + { + // some example code + System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName()); + } +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000..f480667 --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,16 @@ +[ +{ + "modid": "examplemod", + "name": "Example Mod", + "description": "Example placeholder mod.", + "version": "${version}", + "mcversion": "${mcversion}", + "url": "", + "updateUrl": "", + "authorList": ["ExampleDude"], + "credits": "The Forge and FML guys, for making this example", + "logoFile": "", + "screenshots": [], + "dependencies": [] +} +]