This mod uses the Main Java Conventions for everything Java related. Resources on the other hand...
For SCPs its always
scp<number>
And if they have a glow layer, it's appended with_glow<variant>(<variant>being for multicoloured glows) Everything else its just what it is and spaces replaced with "_"
This mod uses all Java Conventions, however with a few tweaks to satisfy Connor's "OCD"
public class SomeClass {
public void numVariables() {
//Floats and Doubles are to be formatted like so
double x = 0.2D; //Correct!
x = .2; //Incorrect!
x = .2D; //Incorrect!
//If you use a Full number as a double the .0 can be ignored
x = 2D; //Correct!
x = 2.0D; //Incorrect!
//Autogenerated variables are to be left untouched as that is an exception
}
public void registeringSCPs() {
//When registering an SCP, make sure that you do not use its name or put a _ after SCP
//Here's an Example
var SCP106; //Correct!
var SCP_106; //Incorrect!
var scp106; //Incorrect! (This would be incorrect to the convention since all the registration vars are final)
}
public static void someMethod(int i, boolean b, float f) {}
public static void referencingFunctions() {
//When referencing a function with multiple variables, make sure to have each variable one space away from the ,
//Here are some examples
someMethod(1, true, 5.2F); //Correct!
someMethod(1,true,5.2F); //Incorrect!
someMethod(1 ,true ,5.2F); //Incorrect!
}
public void logicCode() {
//When using logic on entities/blocks etc... make sure to use these
if (level.isClientSide) return;
//Code
//Is Preferred Over
if (!level.isClientSide) { /*Code*/ }
//This isn't a MUST, but the first one is preferred
//Be sure to check the overtime.core.util.CommonCode file as it contains a few useful functions used throughout commonly throughout the mod
}
}