User Tools

Site Tools


tutorial:terms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:terms [2022/03/20 13:33] – external edit 127.0.0.1tutorial:terms [2022/12/22 18:51] (current) – add link to dedicated entrypoint doc page basil4088
Line 21: Line 21:
 Fabric Loader use ''fabric.mod.json'' to detect and load your mod. Fabric Loader use ''fabric.mod.json'' to detect and load your mod.
  
-A mod usually contains at least one initializer class which should implement one of ''ModInitializer'', ''ClientInitializer'' and ''ServerInitializer''. The interfaces are all in the ''net.fabricmc.api'' package. In order to change or add initializers, you need to edit ''fabric.mod.json'' and find ''entrypoints'' block, then edit them accordingly. ''main'' block is for Mod Initializers, ''client'' block is for Client Mod Initializers and ''server'' block is for Server Mod Initializers.+A mod usually contains at least one initializer class which should implement one of ''ModInitializer'', ''ClientModInitializer'' and ''DedicatedServerModInitializer''. The interfaces are all in the ''net.fabricmc.api'' package. In order to change or add initializers, you need to edit ''fabric.mod.json'' and find ''entrypoints'' block, then edit them accordingly. ''main'' block is for Mod Initializers, ''client'' block is for Client Mod Initializers and ''server'' block is for Server Mod Initializers.
  
 <code java> <code java>
Line 40: Line 40:
 By implementing Mod Initializer interfaces, you must implement an ''onInitializing()'' (or ''onInitializeClient()'' for Client, ''onInitializeServer()'' for Server) function. You can then write your codes there. By implementing Mod Initializer interfaces, you must implement an ''onInitializing()'' (or ''onInitializeClient()'' for Client, ''onInitializeServer()'' for Server) function. You can then write your codes there.
  
-Also, there is a block called ''initializers''.+Also, there is a block called ''initializers''. For more information on entry points, see the [[documentation:entrypoint|dedicated page]].
  
 ==== Maven Group & Package Names ==== ==== Maven Group & Package Names ====
 According to Oracle's Java documentation, they are written in all lower case to avoid conflict with the names of classes or interfaces. The reverse of your domain name is used to start the names. Read more at [[https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html]]. According to Oracle's Java documentation, they are written in all lower case to avoid conflict with the names of classes or interfaces. The reverse of your domain name is used to start the names. Read more at [[https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html]].
tutorial/terms.1647783184.txt.gz · Last modified: 2022/03/20 13:33 by 127.0.0.1