Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
Initial commit (re-git)
Browse files Browse the repository at this point in the history
  • Loading branch information
TehNut committed Jun 13, 2015
0 parents commit 1a98dbd
Show file tree
Hide file tree
Showing 77 changed files with 2,935 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# General use .gitignore for Minecraft modding.

# Folders
/.gradle/*
/build/*
/eclipse/*
/run/*
/out/*
/asm/*
/bin/*
/libs/*

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

# Specific files
Thumbs.db
128 changes: 128 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
Minecraft Mod Public License
============================

Version 2.0.2

0. Definitions
--------------

**Game**: Computer software which provides diversion or amusement. Often a form of play.

**Minecraft**: The Minecraft Game, the Minecraft server, associated software or derivatives, as defined by Mojang.

**Mod**: Software which modifies the Game, in any form (source, compiled binary, etc).

**User**: Anyone who that interacts with the Game, Minecraft, or the Mod in any way.

**Dependency**: Software required for the Mod to execute, compile, or otherwise "work" correctly.

**API**: Software intermediary for interaction with the Mod.

**Derivative**: Software which includes any portion of the Mod other than the API, with modifications, additions, or subtractions.

**Addon**: Software that extends the Mod, but is not a derivative.

**Modpack**: A collection of mods and configuration files pre-tested to work when installed together.

**Modpack Creator**: An individual who creates modpacks.

**Author(s)**: Original Programmer or programmers responsible for writing the Mod.

**Contributor**: Programmer or programmers who contribute code to the Mod, but are not the Author.

**Codebase**: The Mod source code, complete with source history and Contributor records.

**Distributor**: Anyone who distributes the compiled mod.

1. Scope
--------

The present license is granted to any User of the Mod.

Should the Mod be for Minecraft, as a prerequisite, the User is expected to comply with the Mojang EULA as it exists at the time the Mod is distributed.

This license is separate from the license of any Mod it depends on and does not invalidate any license requirement of the dependency.

2. Liability
--------

The User accepts the following liability:
- The Mod is provided 'as is' with no warranties, implied or otherwise.
- The Author is not responsible for dragon, troll, pirate, or ninja attacks.
- Slaying any and all mythological creatures is the sole responsibility of the User.
- The Author takes no responsibility for any damages incurred from the use or misues of the Mod.
- The Mod may alter fundamental parts of the Game.
- The User is liable for all damages resulting from the use or misuse of the Mod.
- The Author may not be held responsible for the incompetency or sadism of a Modpack Creator.

3. Right to use
--------

The User is allowed to install the Mod and play without restriction.
The User may not limit access to the Mod in any way, except as provided by the Game.

4. Right to examine
--------

The User may decompile compiled binaries of the Mod.
The User may examine the Mod's source code.

5. Right to distribute
--------

The Author reserves the right to distribute the Mod.
The Author may designate a person or organization as a Distributor.
A Distributor is granted the right to distribute the Mod.
The Author may require that a Distributor provides a direct link to the Codebase.
The User may not distribute the Mod without being granted distribution rights from the Author.
The Author may revoke distribution rights from any Distributor.

6. Right to contribute
--------

The User may "fork" the Codebase.
The User may compile the Codebase.
The User may submit contributions to the Author for inclusion in the Mod.
The User grants the Author all rights to any contribution.
The User renounces all rights to their contribution except as specified under this license.
The User retains the right to re-use code they've written.
The Author may specify a Contributor License Agreement allowing a Contributor to retain some or all rights.

7. Right to derive
--------

The User may create Derivative(s) based on the Mod.
A Derivative must contain changes which a reasonably informed person would consider significant.

The User may distribute a Derivative if the following conditions are met:
- The Derivative does not generate revenue.
- The Derivative provides credit to the Author.
- The Derivative complies with the Mod license.

8. Right to distribute addons
--------

The User may develop non-Derivative Addons.
An Addon may include the Mod API without being considered a Derivative.
The Addon may be distributed under a different license.

9. Right to create Modpack(s)
--------

The User may create Modpack(s) which include the Mod.

Modpacks containing the Mod may not be used to generate revenue unless specifically granted this right by the Author.

Modpacks containing the Mod may be made and distributed by the Modpack Creator through any distribution channel they choose.

10. Author responsibilities
--------

The Author must make the Mod source freely and publically available.

11. Author rights
--------

The Author may grant a User the status of Contributor or Author.
The Author retains the right to the Mod name.
The Author may change the Mod license, but cannot do so retroactively.
76 changes: 76 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#Resourceful Crops

**Simply JSON based crops. No fluff, no problems.**

Uses only 2 Block ID's and 5 Item ID's. Everything else is done through NBT or Metadata.

##Example File

The current system will find any `.json` file in `../config/ResourcefulCrops/seeds` and attempt to read it. This can be useful for sorting.

Each file must start with a `seeds` field which contains a list of seeds. After that, specify as many seeds as you want in each file.

```
{
"seeds": [
{
"name": "Example", // Sets the name to Example
"tier": 2, // Sets the tier to 2: Magical
"amount": 4, // Number of seeds to give when crafting them
"input": "ingotIron", // Input OreDict entry
"output": "minecraft:rotten_flesh:0#8", // Output ItemStack. Syntax is: domain:name:meta#amount
"color": "#D0CBC7" // Color of the seed/crop/shard/pouch
},
{
"name": "Example 2", // Sets the name to Example 2
"tier": 1, // Sets the tier to 1: Mundane
"amount": 8, // Number of seeds to give when crafting them
"input": "minecraft:iron_ingot:0#0", // Input ItemStack. Syntax is: domain:name:meta#amount
"output": "ingotGold#8", // Output OreDict entry. Syntax is: entry#amount
"color": "#D0CBC7" // Color of the seed/crop/shard/pouch
}
]
}
```

##Field Explanations

| Field | Type | Explanation |
|----------|--------|-------------------------------------------------------------------------------------------------------------------------------|
| `seeds` | List | List of seeds to add to the game |
| `name` | String | Name of the seed. Gets run through the localization process, so if you have a resource loader, you can use unlocalized names. |
| `tier` | int | Tier of the seed. Determines how far into the game the user must be to craft that seed. |
| `amount` | int | Amount of seeds to return in a craft. |
| `input` | String | OreDict entry or ItemStack of the item used to craft the seeds. See below for syntax. |
| `output` | String | OreDict entry or ItemStack of the item returned from the shard crafting. See below for syntax. |
| `color` | String | Hex color of the seeds. I suggest [this](http://www.color-hex.com/) page for getting your colors. Does require the "#". |

###Custom ItemStack
ItemStacks determine the Amount and Meta of an item. The syntax is:

`domain:reg_name:meta#amount`

* domain
* Generally the modid of the Block/Item. *EG: minecraft*
* reg_name
* The registered name of the Block/Item. *EG: wheat_seeds*
* meta
* The meta data (or damage value) of the Block/Item. *EG: 0*
* amount
* The amount of the item you want to return. For input, this does not matter, but is still required. *EG: 4*

###Custom OreDict
Using the OreDict for input/output is also viable.

**For input:**
`shapeType` *EG: `ingotIron`*

**For output:**
The only difference is defining the size of the output.
`shapeType#amount` *EG: `ingotIron#8`*

##Data Caching

A cache is kept to ensure that adding/removing crops does not mess with Seed/Shard/Pouch meta's. The cache is global, meaning across all worlds the user creates.

To reset this cache, delete `ResourcefulCropsCache.dat` from `../saves/`.
140 changes: 140 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
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'
}
}

plugins {
id 'com.matthewprenger.cursegradle' version '1.0.1'
}

apply plugin: 'forge'
apply plugin: 'maven-publish'

def build_number = 'CUSTOM'

if (System.getenv('BUILD_NUMBER') != null)
build_number = System.getenv('BUILD_NUMBER')

group = package_group
archivesBaseName = mod_name
version = "${mc_version}-${mod_version}-${build_number}"

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
}

repositories {
maven { url "http://mobiusstrip.eu/maven" }
}

dependencies {
compile "org.projectlombok:lombok:1.16.4"
compile "mcp.mobius.waila:Waila:${waila_version}_${mc_version}:dev"
}

minecraft {
version = "${mc_version}-${forge_version}"
runDir = "run"

replace "@VERSION@", project.version
replaceIn "ModInformation.java"

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'
}
}

jar {
classifier = ''
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
)
}

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

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

// Deobfuscated jar
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'
}

publishing {
tasks.publish.dependsOn 'build'
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
artifact deobfJar
}
}
repositories {
if (project.hasProperty('maven_repo')) {
maven { url maven_repo }
} else {
mavenLocal()
}
}
}

curseforge {
if (project.hasProperty('curse_key'))
apiKey = project.curse_key

project {
id = "${curse_id}"
changelog = project.hasProperty('changelog') ? project.changelog : ''
releaseType = 'release'

addArtifact deobfJar
addArtifact sourceJar
addArtifact javadocJar
}
}
8 changes: 8 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mod_name=ResourcefulCrops
package_group=info.tehnut.resourcefulcrops
mod_version=1.0.0
mc_version=1.7.10
forge_version=latest
curse_id=0

waila_version=1.5.11-RC2-NONEI
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.3-bin.zip
Loading

0 comments on commit 1a98dbd

Please sign in to comment.