User Tools

Site Tools


zh_cn:documentation:entrypoint

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
Last revisionBoth sides next revision
zh_cn:documentation:entrypoint [2021/09/06 14:05] – [内置入口点协议类型] solidblockzh_cn:documentation:entrypoint [2023/09/23 06:34] – ↷ Links adapted because of a move operation rawdiamondmc
Line 1: Line 1:
 ====== 入口点 ====== ====== 入口点 ======
  
-入口点是在模组的 [[zh_cn:documentation:fabric_mod_json|fabric.mod.json]] 中声明的,以将部分代码用于 Fabric 加载器或者其他模组加载。入口点最初用于使部分代码在游戏初始化过程中运行以初始化模组,虽然入口点系统也有其他用途。入口点由语言接收器(language adapters)加载,这些语言接收器会使用代码对象的名称产生一个指定类型的 Java 对象。+入口点是在模组的 [[zh_cn:documentation:fabric_mod_json_spec|fabric.mod.json]] 中声明的,以将部分代码用于 Fabric 加载器或者其他模组加载。入口点最初用于使部分代码在游戏初始化过程中运行以初始化模组,虽然入口点系统也有其他用途。入口点由语言接收器(language adapters)加载,这些语言接收器会使用代码对象的名称产生一个指定类型的 Java 对象。
  
 An entrypoint is exposed under some name, refers to some code object and must be based on a familiar **entrypoint prototype**. An entrypoint prototype defines the name (such as "main" or "client") and the expected type of object that the entrypoint should refer to (such as the ''ModInitializer'' interface). An **entrypoint prototype provider** declares an entrypoint prototype and is responsible for accessing entrypoints, and can state how the they will be used. Fabric Loader provides some built-in entrypoint prototypes, while mods can also provide their own. An entrypoint is exposed under some name, refers to some code object and must be based on a familiar **entrypoint prototype**. An entrypoint prototype defines the name (such as "main" or "client") and the expected type of object that the entrypoint should refer to (such as the ''ModInitializer'' interface). An **entrypoint prototype provider** declares an entrypoint prototype and is responsible for accessing entrypoints, and can state how the they will be used. Fabric Loader provides some built-in entrypoint prototypes, while mods can also provide their own.
zh_cn/documentation/entrypoint.txt · Last modified: 2024/01/02 10:32 by solidblock