SimElectricity
A Minecraft mod aiming to bring real world electrical systems into the Minecraft world
Brought to you by the Chinese Institution of Scientific Minecraft Mod (CISM)
Current Supported Version: Minecraft Forge 1.18.1
Legacy versions: Minecraft Forge 1.17.1, 1.16.5(1.16.2 to 1.16.5), 1.15.2, 1.14.4, 1.12.2, 1.11.2, 1.7.10
Addons:
- BuildCraft Extension:
Install BuildCraft facades to SimElectricity cable, already included in the SimElectricity Essential Mod.
- ThermalExpension Extension: Install ThermalDynamics facades to SimElectricity cable, already included in the SimElectricity Essential Mod.
Setup the Environment
- Ensure
Java
(found here) and Git
(found here) are properly installed on your system.
- Create a base directory for the repo (anywhere you like)
- 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:
git clone https://github.com/RoyalAliceAcademyOfSciences/SimElectricity
git submodule init
and git submodule update
to get LibRikka
- On Windows: use
gradlew.bat
instead of gradlew
Build and Test
- Complete the steps in "Setup the Environment" section.
- In the repo root folder, execute
gradlew runData
to launch the data generator, generated resource files will be located at "/src/generated"
- If you just want to try this mod, run
gradlew runClient
to launch the game, otherwise skip this step.
- Execute
gradlew build
to build SimElectricity.
- Switch to the librikka directory under the repo root:
cd librikka
- Execute
gradlew build
again to build LibRikka jars
- Jars files are in
SimElectricity/build/libs
and SimElectricity\librikka\build\libs
- The suffix of deobfuscated jars is "dev".
- Obfuscated jars don't have any suffix, these jars are supposed to be used in normal minecraft games, copy them toyour
.minecraft\mods
directory
For Developers
For API Usage, Please refer to the SimElectricity Github Wiki Pages
and comments in the API source code (package simelectricity.api
).
Eclipse
- Setup the environment first (See section "Setup Environment")
- In the SimElectricity directory execute
gradlew genEclipseRuns
to generate the workspace and launch configuration
- Launch Eclipse, then
Import > Existing Gradle Project > Select Folder
- Go to
Debug Configuration
(Next to the debug icon), edit MOD_CLASSES
in the Environment
tab:
Replace simelectricity%%<SomePath>\SimElectricity\bin\main;simelectricity%%<SomePath>\SimElectricity\bin\main
with
simelectricity%%<SomePath>\SimElectricity\bin\main;librikka%%<SomePath>\SimElectricity\librikka\bin\main
.
IntelliJ IDEA
- Setup the environment first (See section "Setup Environment")
- Execute
gradlew genIntellijRuns
- In IDEA, import build.gradle as a gradle project
Notes
- Advanced users only: There are two hidden gradlew tasks:
energyNetDevJar
and energyNetJar
,
which can generate Jars without the essential mod.
- Since 1.15.2, Mojang introduces "DataGenerators", they generate json resource files such as blockstates and models.
They are invoked separately. Before building or testing this Mod, you have to execute the gradle task "runData".
Checkout: https://minecraft.gamepedia.com/Tutorials/Running_the_Data_Generator
- Since 1.18.1, Minecraft requires Java 17. To specify JRE path, use './gradlew -Dorg.gradle.java.home=/path_to_jdk_directory '.
Special Thanks To: