https://github.com/neoforged/MDK/blob/7e54020d1a2777d3ebffc0e1d224632aa2b5ae9d/src/main/java/com/example/examplemod/ExampleMod.java#L70
This is technically wrong because static stuff (the <clinit> method) is run before the constructor. In the MDK that is the MODID, LOGGER and all the DeferredThing fields being filled.
It doesn't change the result much but its still technically wrong :nerd_face:. (also this isn't counting coremodding stuff, but I feel like that can generally be considered a separate part of your mod as sharing anything between them is a major recipe for classloading disaster)
Some parentheses could be added for clarification, like
// The constructor for the mod class is the first code that is run when your mod is loaded (after static blocks and fields are executed)
https://github.com/neoforged/MDK/blob/7e54020d1a2777d3ebffc0e1d224632aa2b5ae9d/src/main/java/com/example/examplemod/ExampleMod.java#L70 This is technically wrong because static stuff (the
<clinit>
method) is run before the constructor. In the MDK that is the MODID, LOGGER and all the DeferredThing fields being filled. It doesn't change the result much but its still technically wrong :nerd_face:. (also this isn't counting coremodding stuff, but I feel like that can generally be considered a separate part of your mod as sharing anything between them is a major recipe for classloading disaster)Some parentheses could be added for clarification, like