Codebase

From Electrical Age
Revision as of 18:01, 9 February 2019 by Grissess (talk | contribs) (Created page with "First, if you haven't read it yet, see Developing for how to make your own local copy of a project. If you're just browsing the source, read on. For the remainder of this...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

First, if you haven't read it yet, see Developing for how to make your own local copy of a project. If you're just browsing the source, read on.

For the remainder of this document, I'll be using the forward slash (/) as the path separator, as it is on most UNIX-like operating systems. This should be equally valid on Windows, despite its normal path separator being the backslash (\). If you're on Windows, take note that some of the paths you see may appear different as a result. Similarly, the "absolute paths" (starting with /) will be relative to the repository root--wherever you cloned that, or are viewing it. Finally, if a path ends with a slash, it means that it's a directory.

Code and Assets

Everything of this sort lives in /src/main/. When building, you may find some siblings in /src/, like api/ or test/ appear--you can safely ignore these.

Under /src/main/, you will find two directories, java/ and resources/. The former is the code, and the latter is the assets.

Code

In /src/main/java/, you may find a few directories, many of which are APIs linked to by ELN, such as ComputerCraft and OpenComputers APIs. The main content lives in mods/eln/; there, you will find:

  • Eln.java: The main mod file. It is absolutely enormous as of this writing, and we are sorry. This is where all the blocks, items, recipes, etc. get registered. If you're going to add a completely new block, item, recipe, etc., you will have to add it somewhere in this file.