- Java Development Kit 8 (latest version)
- Forge 1.8.9 MDK (latest version) MDK (latest version)
- Eclipse for Java
- Install
Minecraft
- if you haven't already - Install
Java Development Kit 8
- Install
Eclipse for Java
- wait with starting it
- Set an environment variable under
Win
+Break
>Advances System Settings
>Environment Variables
- Add a
JAVA_HOME
variable in the top part of the window with the value of yourjdk 8
folder path - Add the
jdk 8 \ bin
folder path to thePath
variable in the bottom part of the window- The
jdk 8
folder path should look something like this:C:\Program Files\Java\jdk1.8.0_311
- The
- Add a
- Log into github
- Fork this repository
- Clone the forked project to your local machine
- git command, Eclipse or some GUI (I for example used SourceTree)
- Download and Extract the
Forge 1.8.9 MDK
- Copy the
eclipse
folder to the folder you cloned this project into - Open the command line (cmd)
- Navigate to that folder you cloned this project into using
cd <your folder path>
- Tip: you can change drives using e.g.
C:
,D:
,E:
, etc.
- Tip: you can change drives using e.g.
- Setup the Eclipse development environment by typing
gradlew setupDecompWorkspace eclipse
- Start
Eclipse
- Select
<your folder path>\Modding Workspace\eclipse
as eclipse workspace - Switch to Dark Mode if you like:
Window > Preferences > General > Appearance > Theme: Dark
- Rightclick your Forge project in eclipse and go to
Show in > Terminal
- Build the projects jar file with
gradlew build
- the jar file can be found under
build \ libs
- the jar file can be found under
- Create a new branch and switch to it
- git command, Eclipse or some GUI (e.g. SourceTree)
- Now you are all set. You can read a little bit about the structure of this Forge mod down below, start changing things, test your changes by building the mod and putting the jar in the mod folder (sadly the multiplayer testing environment is broken due to the new Mirosoft login changes), commit and push to your new branch and in the next step when you are all set, create a pull request.
- Once you are you are happy with your result, you can commit and push everything to a new branch of your forked project
- If you want to create a pull request you can do that on the github page of your forked project
- github automatically offers you that option once you've made changes to your forked project
The main Java class is logically me.hyblockrnganalyzer.Main
. Here the initial functions executed on startup / initialisation of the mod are defined. The key part is what is in public void init(FMLInitializationEvent event)
. Here commands - using ClientCommandHandler.instance.registerCommand()
- and event handlers - using MinecraftForge.EVENT_BUS.register()
- are registered.
The core event handler is the me.hyblockrnganalyzer.HypixelEventHandler
. This one subscibes to standard Forge events like ClientChatReceivedEvent
, GuiScreenEvent.InitGuiEvent.Post
, PlaySoundEvent
. If these events fulfill special criteria, they are used to trigger custom events listed in me.hyblockrnganalyzer.event
using MinecraftForge.EVENT_BUS.post()
.
Custom event handlers in me.hyblockrnganalyzer.eventhandler
then subscribe to these custom events like the NucleusLootEvent
or the OpenCustomChestEvent
.
Finally the data contained in these events gets extracted, parsed and put into one of the files.
Commands are found in me.hyblockrnganalyzer.command
. One of those would be the CsvFileCreationCommand
which when triggered creates csv files fom the txt ones.
me.hyblockrnganalyzer.util
contains all sorts of Java files that provide some kind of - more or less universal - functionality. Some also provide functionality used in more than one event like the HypixelEntityExtractor
that extracts and summarizes the stacked armor stands Hypixel - among other servers - likes so much. Others like the DungeonChestStatus
are more specific to one event.
- for the step by step setup guide