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
tutorial:terms [2024/08/25 12:01] solidblocktutorial:terms [2024/08/25 12:10] (current) solidblock
Line 6: Line 6:
 Throughout the documentation, we'll often refer to a **Mod ID**, or **modid** in code. Mod ID stands for "Mod Identifier," and it is a string that should uniquely identify your mod. Mod IDs are commonly associated with identifier namespaces of the same name, and as such, follow the same restrictions. Mod IDs can consist only of lowercase characters ''a-z'', numbers ''0-9'', and the symbols ''_-''. For example, Minecraft uses the ''minecraft'' namespace. Additionally, a mod ID must consist of at least two characters. Throughout the documentation, we'll often refer to a **Mod ID**, or **modid** in code. Mod ID stands for "Mod Identifier," and it is a string that should uniquely identify your mod. Mod IDs are commonly associated with identifier namespaces of the same name, and as such, follow the same restrictions. Mod IDs can consist only of lowercase characters ''a-z'', numbers ''0-9'', and the symbols ''_-''. For example, Minecraft uses the ''minecraft'' namespace. Additionally, a mod ID must consist of at least two characters.
  
-A mod ID is often a compact version of the name of the mod which makes it short but recognizable and prevents naming conflicts. Conventionally, a project named "My Project" could be called ''myproject'', ''my_project'', or ''my-project''. You should usually register items and blocks using this mod ID as a registry namespace.+A mod ID is often a compact version of the name of the mod which makes it short but recognizable and prevents naming conflicts. Conventionally, a project named "My Project" could be called ''myproject'', ''my_project'', or ''my-project''. You should usually register items and blocks (or any other things) using this mod ID as the namespace of identifiers.
  
 Some of the starter tutorials will use a placeholder mod ID and register items and blocks under a placeholder namespace, and you can think of it as a starter template. In Fabric Wiki, we use ''tutorial'' as the mod ID. While leaving this unchanged is not dangerous for testing, remember to change it if you intend to release your project. Some of the starter tutorials will use a placeholder mod ID and register items and blocks under a placeholder namespace, and you can think of it as a starter template. In Fabric Wiki, we use ''tutorial'' as the mod ID. While leaving this unchanged is not dangerous for testing, remember to change it if you intend to release your project.
Line 14: Line 14:
 **Tags** are groups of blocks, items, fluids, entities and so on. For example, the block tag ''minecraft:saplings'' contains all of the game's saplings. In Minecraft, any type of things that has a registry can have tags. **Tags** are groups of blocks, items, fluids, entities and so on. For example, the block tag ''minecraft:saplings'' contains all of the game's saplings. In Minecraft, any type of things that has a registry can have tags.
  
-Minecraft uses tags to determine many things. For example, blocks with tag ''minecraft:mineable/pickaxe'' can be mined quickly with pickaxes. Fabric API also provides some conventional tags. More information about tags can be found in [[tags|tags tutorial]] and [[https://minecraft.gamepedia.com/Tag|"Tag" page in Minecraft Wiki]].+Minecraft uses tags to determine many things. For example, blocks with tag ''minecraft:mineable/pickaxe'' can be mined quickly with pickaxes. Fabric API also provides some conventional tags. More information about tags can be found in [[tags|tags tutorial]] and [[https://minecraft.wiki/w/Tag|"Tag" page in Minecraft Wiki]].
  
 ===== Entrypoints and Initializers ===== ===== Entrypoints and Initializers =====
-Fabric Loader uses ''fabric.mod.json'' to detect and load your mod. 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 these tutorials, we usually use ''ExampleMod'' as the mod's initializer, as done in Fabric Example Mod.+Fabric Loader uses ''fabric.mod.json'' to detect and load your mod. 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 Fabric Wiki tutorials, we usually use ''ExampleMod'' as the mod's initializer, as done in Fabric Example Mod.
  
 In order to change or add initializers, you need to edit ''fabric.mod.json'' and find ''entrypoints'' field, then edit them accordingly. The ''main'' block is for Mod Initializers, ''client'' block is for Client Mod Initializers and ''server'' block is for Server Mod Initializers. For more information see [[documentation:fabric_mod_json]]. In order to change or add initializers, you need to edit ''fabric.mod.json'' and find ''entrypoints'' field, then edit them accordingly. The ''main'' block is for Mod Initializers, ''client'' block is for Client Mod Initializers and ''server'' block is for Server Mod Initializers. For more information see [[documentation:fabric_mod_json]].
Line 36: Line 36:
 </code> </code>
  
-By implementing ''ModInitializer'', ''ClientModInitializer'' or ''DedicatedServerModInitializer'', interfaces, you must implement an ''onInitializing()'' (or ''onInitializeClient()'' for Client, ''onInitializeServer()'' for Server) function. You can then write your codes in it.+By implementing ''ModInitializer'', ''ClientModInitializer'' or ''DedicatedServerModInitializer'', interfaces, you must implement an ''onInitialize()'' (or ''onInitializeClient()'' for Client, ''onInitializeServer()'' for Server) function. You can then write your codes in it.
  
 For more information on entry points, see [[documentation:entrypoint]]. For more information on entry points, see [[documentation:entrypoint]].
tutorial/terms.1724587284.txt.gz · Last modified: 2024/08/25 12:01 by solidblock