Minecraft Mod Loader
Our goal with Paper is to create a modern Minecraft mod loader, utilizing the latest Java standards, in a lightweight fashion.
- 4 spaces should be used in place of tabs.
- Braces must be placed on the same line, for example:
public void doSomething() {
if (this.condition) {
this.doAnotherThing();
} else {
this.doSomethingElse();
}
}
- 'this.' should be used wherever possible.
- Bad:
greeting = "Hello World"
- Good:
this.greeting = "Hello World"
- Bad:
- If a singleton is made, it should be made using an enum.
- Bad:
public class Singleton { public static Singleton INSTANCE; }
- Good:
public enum Singleton { INSTANCE; }
- All static field names should be uppercased and use underscores. For example,
SOME_VALUE
would be used instead ofsomeValue
- Static fields should be referenced with their parent class name, even when inside that class.
- Bad:
public class Something { public static String STRING = "A String!"; public void doSomething() { System.out.println(STRING); } }
- Good:
public class Something { public static String STRING = "A String!"; public void doSomething() { System.out.println(Something.STRING); } }
- JavaDocs should be made for everything, with a few exceptions.
- A description for a getter does not need to be made (although can be), as the @return should already describe what the method does.
- A description for a constructor does not need to be made (although can be), as the class JavaDoc should describe the class.
- Fork Paper
- Create your feature branch:
git checkout -b my-new-feature
- Setup paper:
gradlew.bat setupPaper setupIDEA --refresh-dependencies
- Commit your changes:
git commit -m "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request