This repository contains a specially crafted toolkit to modify the original version of Minecraft in a way that allows multiple contributors to collaborate.
You can learn more about the project and its assumptions on minecraftplus.org.
Clone or download this repository and run:
./gradlew buildAll
or when working on Windows:
./gradlew.bat buildAll
This task will download all necessary files (tools, libraries, game assets, etc.) and decompile game. Decompiled source code will be stored inside subproject in /project
directory.
To run build script You need:
- Java (JRE or JDK) installed (version 8 and 11 is confirmed stable)
Is the most important part (because the changes introduced as part of the project are made in it).
Subproject stored in /project
directory has it own build.gradle
buildscript configuring tasks needed to compile and assemble client and server JARs.
Game source code files are stored in subproject under /src/main/java
directory.
Resources used in game are stored in subproject under /src/main/resources
, simultaneously keeping them in division into internal
(stored in game JAR file) and remote
(indexed, downloadable assets).
Running game client or server implementation from source code in project is automated by gradle tasks in group mcplus run
. These can be listed by command:
./gradlew tasks --group="mcplus run"
------------------------------------------------------------
Tasks runnable from root project 'minecraftplus'
------------------------------------------------------------
Mcplus run tasks
----------------
runClient - Run project client application
runServer - Run project server application
Using these tasks is useful especially in running client side - which needs to pass needed arguments from version manifest (normally prepared by game launcher).
Changes to the game code are stored inside the project in the form of patches
(diff files). Patches are stored in the src/patches/
folder.
No commit history is stored with patches as in case with patches generated by git format-patch
.
At any time, using the patchesMake
task, you can generate a new set of patches based on the current state of source code in /project/src
directory.
Once the patches are generated manually, they must also be manually placed in the project repository by creating a new command
Manually generating patches and storing them in a repository commit can be cumbersome when storing complex changes (consisting of a set of commits).
For this purpose, the SmartPatch
mechanism has been prepared, which enables the automation of generating patches along with the transfer of history from the subproject.
It consists of a set of tasks for:
creating
the configuration of scriptextracting
the commit smart-list from the subproject repositorymaking
a set of patches for each of the extracted commitscommitting
the generated patch sets to the main project, keeping the original commit message and the scope of changes made to it
Available tasks can be listed by command:
./gradlew tasks --group="mcplus smartpatch"
------------------------------------------------------------
Tasks runnable from root project 'minecraftplus'
------------------------------------------------------------
Mcplus smartpatch tasks
------------------------------
smartpatchCreateConfig - Create configuration for SmartPatch scripts
smartpatchExtractCommits - Extract commits list from the subproject repository
smartpatchMakePatches - Make sets of patches of all sourcesets in subproject, one for each commit
smartpatchCommitPatches - Commit all generated patch sets to the main project, with one commit per set