Kiwi233 / Schematica

Import schematics, export schematics, build schematics. All inside Minecraft!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to Schematica!

Planned future additions:

  • Add compatibility with the Lord of the Rings mod (fix a few edge cases with the printer)
  • Add the Fairplay mode to the base build script

Changes from Original:

  • Store Coordinates per world/server. No more re-entering coordinates for large builds!
  • README update

Compiling Schematica - for those that want the latest unreleased features

Contributing - for those that want to help out

Compiling

Setup Java

Setup Git

Setup Schematica

Compile Schematica

Updating Your Repository

Setup Java

The Java JDK is used to compile Schematica.

  1. Download and install the Java JDK.
  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\8u332 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 Git

Git is used to clone Schematica and update your local copy.

  1. Download and install Git here.
  2. Optional Download and install a Git GUI client, such as Github for Windows/Mac, SmartGitHg, TortoiseGit, etc. A nice list is available here.

Setup Schematica

IntelliJ

Import this repository. or, if you're planning modifications, a fork. IntelliJ will automatically execute the gradlew setupDevWorkspace task. After that there's a high chance the following error is thrown: Could not find :forgeBin:1.7.10-10.13.4.1614-1.7.10. or something similar. If that happens, execute ./gradlew setupDecompWorkspace in your terminal. After this refresh gradle, and you should be ready to go.

Command line

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 Schematica'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:Lunatrius/Schematica.git. This will download Schematica's source into mcdev.
  4. Right now, you should have a directory that looks something like:

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

Compile Schematica

If you use IntelliJ IDEA you can skip step one

  1. Execute gradlew setupDevWorkspace. This sets up Forge and downloads the necessary libraries to build Schematica. 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 gradlew 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\Schematica\build\libs.
    • You should see a .jar file named Schematica-#.#.#-#.#.#.#-universal.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.
  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!
Instructions/Advice when submitting a Pull Request (PR)

I use this IDEA formatting. To be short:

  • spaces for indentation
  • braces on same lines

When you finish up your PR you'll want to squash them into a single commit (unless it makes sense to have them split).

  1. Make sure your working directory is clean by executing git status.
  2. Execute git rebase -i HEAD~X where X is the amount of your commits. This will make sure you squash only your own commits.
  3. You should now see a list of all your commits, prefixed with pick. Change all instances of pick (excluding the first!) into squash or simply s. Then save/quit the editor once.
  4. A second screen should show up, displaying all the commit messages (you may edit them, delete or add some). After your done save/quit the editor again.
  5. If git successfully rebased things simply push your cleaned up commits by executing git push -f.

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 for large amounts of text!)
      • Detailed description of the bug
  5. Click Submit new issue, and wait for feedback!

Shamelessly based off this README off pahimar's version.

About

Import schematics, export schematics, build schematics. All inside Minecraft!

License:MIT License


Languages

Language:Java 99.9%Language:GLSL 0.1%