Skip to content

Latest commit

 

History

History
63 lines (54 loc) · 4.79 KB

CONTRIBUTING.md

File metadata and controls

63 lines (54 loc) · 4.79 KB

Contributing to HyblockRngAnalyzer

Required Software

Getting Started (Steps for Windows)

Part 1 - Software Installations

  1. Install Minecraft - if you haven't already
  2. Install Java Development Kit 8
  3. Install Eclipse for Java - wait with starting it

Part 2 - Operating System Configuration

  1. 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 your jdk 8 folder path
    • Add the jdk 8 \ bin folder path to the Path 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

Part 3 - Fork and clone this github project

  1. Log into github
  2. Fork this repository
  3. Clone the forked project to your local machine
    • git command, Eclipse or some GUI (I for example used SourceTree)

Part 4 - Forge MDK: How to setup the eclipse workspace

  1. Download and Extract the Forge 1.8.9 MDK
  2. Copy the eclipse folder to the folder you cloned this project into
  3. Open the command line (cmd)
  4. 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.
  5. Setup the Eclipse development environment by typing gradlew setupDecompWorkspace eclipse
  6. Start Eclipse
  7. Select <your folder path>\Modding Workspace\eclipse as eclipse workspace
  8. Switch to Dark Mode if you like: Window > Preferences > General > Appearance > Theme: Dark

Part 5 - Build the mod to a .jar file

  1. Rightclick your Forge project in eclipse and go to Show in > Terminal
  2. Build the projects jar file with gradlew build
    • the jar file can be found under build \ libs

Part 6 - Git branch

  1. Create a new branch and switch to it
    • git command, Eclipse or some GUI (e.g. SourceTree)

Part 7 - The coding

  1. 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.

Part 8 - Contribute to this project

  1. Once you are you are happy with your result, you can commit and push everything to a new branch of your forked project
  2. 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

An introduction to the structure of this Forge mod

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.

Sources