Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gr8pefish committed Dec 28, 2014
0 parents commit 1a50fa4
Show file tree
Hide file tree
Showing 36 changed files with 1,063 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# General use .gitignore for Minecraft modding.

# Directories
/.gradle/
/build/
/eclipse/
/run/
/out/
/asm/
/bin/
/.idea/
/.metadata/
/.settings/

# File Extensions
*.psd
*.iml
*.ipr
*.iws
*.classpath
*.project
*.class

# Specific files
Thumbs.db
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
License can be found here: http://www.wtfpl.net/




DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.




I only ask that you don't sell it. I'm not saying you can't, I'm just asking from the deepest parts of
my soul that you refrain from doing so. I will also tell you that everytime you sell it, a puppy sheds
a tear and a kitten loses out on catnip. You don't want to be the cause of that, do you? :(
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#A Base to Build From!

Comes with most basic requirements for a mod.

This is simply a base for people to build from and includes no content, aside from a few example recipes.

My hope is that it is simple to understand and easy to use.

##How to use:

1. Clone that repository using any Git client. (alternatively, download the zip)
2. Setup your Gradle workspace. I suggest following [this](https://www.youtube.com/watch?v=8VEdtQLuLO0) tutorial by LexManos. I also suggest running `setupDecompWorkspace` instead of `setupDevWorkspace`. Look in gradlew for what everything does.
3. Open it up in your IDE and refactor everything.

EG: BaseMod.java -> YourModName.java
4. Write the content of your mod.
5. Release to your loving fans and hope you didn't screw anything up.

I *do not* require any credit for this. I wrote it primarily for myself to use in my own mods and there's literally no reason for it to not be public.

##Suggestions or Feedback?

[Join my channel](https://webchat.esper.net/?channels=tehnut) (#TehNut) on [Espernet](https://www.esper.net/) and discuss there.

##FAQ:

* __Oh no! I found a bug/leak with it! D:__

Please feel free to make a PR with a fix or open an issue on GitHub.

* __Can you include X feature?__

Possibly. I don't want to do all the work for modders, and I don't want this to become a coremod/dependency.

* __Why should I use this?__

I feel it saves time for beginning modders so they don't have to rewrite everything whenever they start a new project. If you don't feel it's useful, don't use it. Simple as that.

* __Can you port to Minecraft 1.X.X?__

Sure, why not. However, most of this will work in all versions. One large exception being the config GUI.

* __Who the heck are you?__

I am the lead dev of [Redstone Armory](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2111983-).

I am working on a BigReactors addon-overhaul called [NuclearCubes](https://github.com/TehNut/NuclearCubes).

I am a maintainer of [Tombenpotter's](https://github.com/Tombenpotter) Electro-Magic Tools.

I am also the newest TPPI dev.

##Additional Tips:

* __How to update the Forge version-__

View [this](http://www.minecraftforge.net/forum/index.php?topic=14048.0#post_update_forge) forum post for information on that.

* __How to update the ForgeGradle version-__

View [this](http://www.minecraftforge.net/forum/index.php?topic=14048.0#post_update_forgegradle) forum post for information on that.
109 changes: 109 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
buildscript {
repositories {
mavenCentral()
maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'org.ajoberstar:gradle-git:0.10.1'
}
}

apply plugin: 'forge'

ext.configFile = file "build.properties"
configFile.withReader {
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}

version = config.mc_version + "-" + config.mod_version + "-" + config.build_number
group= config.package_group
archivesBaseName = config.mod_name

import org.ajoberstar.grgit.Grgit

def gitHash = 'unknown'
if (new File(projectDir, '.git').exists()) {
def repo = Grgit.open(project.file('.'))
gitHash = repo.log().find().abbreviatedId
}

minecraft {
version = config.mc_version + "-" + config.forge_version
runDir = "run"

if (project.hasProperty('mappings_version'))
mappings = project.mappings_version
}

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
include '**/*.properties'

expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.properties'
exclude '**/*.db'
}
}

jar {
dependsOn "incrementBuildNumber"
classifier = 'universal'
manifest.mainAttributes(
"Built-By": System.getProperty('user.name'),
"Created-By": "${System.getProperty('java.vm.version')} + (${System.getProperty('java.vm.vendor')})",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Git-Hash": gitHash
)
}

// add a source jar
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

// add a javadoc jar
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}

// because the normal output has been made to be obfuscated
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}

tasks.build.dependsOn sourceJar, javadocJar, deobfJar

tasks.withType(JavaCompile) { task ->
task.options.encoding = 'UTF-8'
}

task("incrementBuildNumber") {
// increment build number
doFirst {
// increment
config.build_number = (config.build_number.toString().toInteger()) + 1

// write back to the file
configFile.withWriter {
config.toProperties().store(it, "")
}
}
}

// Uncomment this line if you want to auto-upload to CurseForge when you build. This requires you to setup curse.gradle yourself.
// fileTree('gradle').include('curse.gradle').collect().sort().each { apply from: it }
6 changes: 6 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package_group=com.package.modid
mc_version=1.7.10
forge_version=10.13.0.1208
build_number=1
mod_version=0.0.0
mod_name=ModName
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Fri Sep 26 11:20:52 CDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
Loading

0 comments on commit 1a50fa4

Please sign in to comment.