Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Created by .ignore support plugin (hsz.mobi)
### Eclipse template
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
eclipse

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch


### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml

## Directory-based project format:
.idea/

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/


### Gradle template
.gradle
build/
gradle/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

### Java template
*.class

# Package Files #
*.jar
*.war
*.ear

libs/
run/
118 changes: 118 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
ToggleSneak
=================
Shotbows ToggleSneak mod for Minecraft.

### Technical Info
- [Setup Java](#setup-java)
- [Setup Gradle](#setup-gradle)
- [Setup Git](#setup-git)
- [Setup ToggleSneak](#setup-togglesneak)
- [Compile ToggleSneak](#compile-togglesneak)
- [Updating Your Repository](#updating-your-repository)

#### Setup Java
The Java JDK is used to compile ToggleSneak.

1. Download and install the Java JDK.
* [Windows/Mac download link](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). Scroll down, accept the `Oracle Binary Code License Agreement for Java SE`, and download it (if you have a 64-bit OS, please download the 64-bit version).
* Linux: Installation methods for certain popular flavors of Linux are listed below. If your distribution is not listed, follow the instructions specific to your package manager or install it manually [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).
* Gentoo: `emerge dev-java/oracle-jdk-bin`
* Archlinux: `pacman -S jdk8-openjdk`
* Ubuntu/Debian: `apt-get install openjdk-8-jdk`
* Fedora: `yum install java-1.8.0-openjdk`
2. Set up the environment.
* Windows: Set environment variables for the JDK.
1. Go to `Control Panel\System and Security\System`, and click on `Advanced System Settings` on the left-hand side.
2. Click on `Environment Variables`.
3. Under `System Variables`, click `New`.
4. For `Variable Name`, input `JAVA_HOME`.
5. For `Variable Value`, input something similar to `C:\Program Files\Java\jdk1.8.0_91` exactly as shown (or wherever your Java JDK installation is), and click `Ok`.
6. Scroll down to a variable named `Path`, and double-click on it.
7. Append `;%JAVA_HOME%\bin` EXACTLY AS SHOWN and click `Ok`. Make sure the location is correct; double-check just to make sure.
3. Open up your command line and run `javac`. If it spews out a bunch of possible options and the usage, then you're good to go. If not try the steps again.

#### Setup Gradle
Gradle is used to execute the various build tasks when compiling ToggleSneak.

1. Download and install Gradle.
* [Windows/Mac download link](http://www.gradle.org/downloads). You only need the binaries, but choose whatever flavor you want.
* Unzip the package and put it wherever you want, eg `C:\Gradle`.
* Linux: Installation methods for certain popular flavors of Linux are listed below. If your distribution is not listed, follow the instructions specific to your package manager or install it manually [here](http://www.gradle.org/downloads).
* Gentoo: `emerge dev-java/gradle-bin`
* Archlinux: You'll have to install it from the [AUR](https://aur.archlinux.org/packages/gradle).
* Ubuntu/Debian: `apt-get install gradle`
* Fedora: Install Gradle manually from its website (see above), as Fedora ships a "broken" version of Gradle. Use `yum install gradle` only if you know what you're doing.
2. Set up the environment.
* Windows: Set environment variables for Gradle.
1. Go back to `Environment Variables` and then create a new system variable.
2. For `Variable Name`, input `GRADLE_HOME`.
3. For `Variable Value`, input something similar to `C:\Gradle-1.10` exactly as shown (or wherever your Gradle installation is), and click `Ok`.
4. Scroll down to `Path` again, and append `;%GRADLE_HOME%\bin` EXACTLY AS SHOWN and click `Ok`. Once again, double-check the location.
3. Open up your command line and run `gradle`. If it says "Welcome to Gradle [version].", then you're good to go. If not try the steps again.

#### Setup Git
Git is used to clone ToggleSneak and update your local copy.

1. Download and install Git [here](http://git-scm.com/download/).
2. *Optional* Download and install a Git GUI client, such as Github for Windows/Mac, SmartGitHg, TortoiseGit, etc. A nice list is available [here](http://git-scm.com/downloads/guis).

#### Setup ToggleSneak
This section assumes that you're using the command-line version of Git.

1. Open up your command line.
2. Navigate to a place where you want to download ToggleSneak's source (eg `C:\Development\Github\Minecraft\`) by executing `cd [folder location]`. This location is known as `mcdev` from now on.
3. Execute `git clone git@github.com:Shotbow/ToggleSneak.git`. This will download ToggleSneak's source into `mcdev`.
4. Right now, you should have a directory that looks something like:

***
mcdev
\-ToggleSneak
\-ToggleSneak's files (should have build.gradle)
***

#### Compile ToggleSneak
1. Execute `gradle setupDecompWorkspace`. This sets up Forge and downloads the necessary libraries to build ToggleSneak. This might take some time, be patient.
* You will generally only have to do this once until the Forge version in `build.properties` changes.
2. Execute `gradle build`. If you did everything right, `BUILD SUCCESSFUL` will be displayed after it finishes. This should be relatively quick.
* If you see `BUILD FAILED`, check the error output (it should be right around `BUILD FAILED`), fix everything (if possible), and try again.
3. Go to `mcdev\ToggleSneak\build\libs`.
* You should see a `.jar` file named `ToggleSneak-<mc version>-<version>.jar`.
4. Copy the jar into your Minecraft mods folder, and you are done!

#### Updating Your Repository
In order to get the most up-to-date builds, you'll have to periodically update your local repository.

1. Open up your command line.
2. Navigate to `mcdev` in the console.
3. Make sure you have not made any changes to the local repository, or else there might be issues with Git.
* If you have, try reverting them to the status that they were when you last updated your repository.
4. Execute `git pull master`. This pulls all commits from the official repository that do not yet exist on your local repository and updates it.

### Contributing
#### Submitting a Pull Request (PR)
So you found a bug in the code? Think you can make it more efficient? Want to help in general? Great!

1. If you haven't already, create a [GitHub account](https://github.com/signup/free).
2. Click the `Fork` icon located at the top-right of this page (below your username).
3. Make the changes that you want to and commit them.
* If you're making changes locally, you'll have to do `git add -A`, `git commit` and `git push` in your command line.
4. Click `Pull Request` at the right-hand side of the gray bar directly below your fork's name.
5. Click `Click to create a pull request for this comparison`, enter your pull request title, and create a detailed description explaining what you changed.
6. Click `Send pull request`, and wait for feedback!

#### Creating an Issue
Crashing? Have a suggestion? Found a bug? Create an issue now!

1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
2. Go to the issues page.
3. Click `New Issue` right below `Star` and `Fork`.
4. Enter your issue title (something that summarizes your issue), and then add a detailed description ("Hey, could you add/change xxx?" or "Hey, found an exploit: stuff").
* If you are reporting a bug, make sure you include the following:
* Version (can be found in the mcmod.info file or in the mod list)
* ForgeModLoader log (please use [gists](https://gist.github.com/) for large amounts of text!)
* Detailed description of the bug
5. Click `Submit new issue`, and wait for feedback!

this README was based on [bspkrs'](https://github.com/bspkrs/bspkrsCore/blob/master/README.md)

<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.
54 changes: 54 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "3.2.0"
group= "deez.togglesneak"
archivesBaseName = "ToggleSneak"

minecraft {
version = "1.8.9-11.15.1.1722"
runDir = "run"
mappings = "stable_22"
}

dependencies {
provided fileTree(dir: 'flat', includes: ['*.jar','*.zip'])
}

jar {
manifest {
attributes 'ModSide':'CLIENT'
}
}

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'
}
}
2 changes: 2 additions & 0 deletions flat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.jar
*.zip
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 @@
#Wed Apr 27 19:09:11 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip
Loading