Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 4.89 KB

README.md

File metadata and controls

74 lines (63 loc) · 4.89 KB

SimElectricity

Build Status

A Minecraft mod aiming to bring real world electrical systems into the Minecraft world

Presented by the Chinese Institution of Scientific Minecraft Mod (CISM)

Currently Supported Version: Minecraft Forge 1.11.2

Image

Addons: Image

  1. BuildCraft Extension: Install BuildCraft facades to SimElectricity cable. This Mod must be installed with BuildCraft and SimElectricity Essential at the sametime, otherwise BuildCraft API will not work.
  2. ThermalExpension Extension: Install ThermalDynamics facades to SimElectricity cable, already included in the SimElectricity Essential Mod.

Setup the Environment Image

  1. Ensure Java (found here) and Git (found here) are properly installed on your system.
  2. Create a base directory for the repo (anywhere you like)
  3. On Windows, open either 'CMD' or Windows PowerShell, on Linux and MacOS, launch a terminal, then navigate to the directory just created, and type the following commands:
  4. git clone https://github.com/RoyalAliceAcademyOfSciences/SimElectricity
  5. git submodule init and git submodule update to get LibRikka
  6. gradlew setupDecompWorkspace to setup a complete development environment.
  • On Windows: use gradlew.bat instead of gradlew
  • If you don't need the source code of Minecraft and Minecraft Forge, or just want to build the code, use gradlew setupDeVWorkspace instead.

Compile and Test Image

  1. On Windows, open either 'CMD' or Windows PowerShell, on Linux and MacOS, launch a terminal, then navigate to the SimElectricity directory (the one contains README.MD and Jenkinsfile)
  2. Execute gradlew build to generate SimElectricity jars
  3. Switch to the librikka directory under the SimElectricity directory
  4. Execute gradlew build again to build LibRikka jars
  5. Jars files are in SimElectricity/build/libs and SimElectricity\librikka\build\libs
  6. Copy SimElectricity-xx.xx.xx.jar and LibRikka-1.0.0.jar to the mods folder under your .minecraft directory
  7. Launch your Minecraft and enjoy
  • Both Obfuscated and deobfuscated jars needs corresponding version of LibRikka to work properly
  • SimElectricity-full.jar includes LibRikka

For Developers Image

For API Usage, Please refer to the SimElectricity Github Wiki Pages and comments in the API source code (package simelectricity.api).

Eclipse

  1. Setup the environment first (See section "Setup Environment")
  2. In the SimElectricity directory execute gradlew eclipse to generate the workspace and launch configuration
  3. Launch Eclipse and set your workspace to .eclipse folder under the SimElectricity directory
  4. Open any source file and hit the debug button to test if it works

IntelliJ IDEA

  1. Launch IDEA and clone the SimElectricity git repository to your local disk
  2. IDEA should prompt you for importing Gradle project, choose YES
  3. After IDEA finishes setting up Gradle, open Gradle panel
  4. Double click setupDecompWorkspace under Tasks->forgegradle
  5. After finish this, double click genIntellijRuns
  6. You are ready to go

Notes

  1. You MUST set the compatibility level of Java compiler to 1.8. By default, Minecraft Forge(1.11.2 - 13.20.1.2386) sets the compatibility level to 1.6. To do this, change sourceCompatibility = targetCompatibility = "1.6" in build.gradle to sourceCompatibility = targetCompatibility = "1.8".
  2. Advanced users only: There are two hidden gradlew tasks: energyNetDevJar and energyNetJar, which can generate Jars without the essential mod.

Special Thanks To: Image