Reg

ID是游戏运行中动态生成的正整数数值。ID在游戏过程中不会变化,但是在每次启动游戏时ID会发生变化。因此需要注意:任何情况下都不允许将ID存储到文件或存档内。

若需要存储ID,请使用GetXXXName(int id)来获取并存储其ID的字符串名称。若需要读取ID,请使用GetXXXID(string name)来获取其动态生成的ID。

函数

函数

int Reg.ItemID(string name) 根据物品名返回注册的动态ID。

int Reg.BlockID(string name) 根据方块名返回注册的动态ID。

int Reg.BlockGroupID(string name) 根据方块组名返回注册的动态ID。

int Reg.BlockSubGroupID(string name) 根据方块子组名返回注册的动态ID。

int Reg.BlockEntityID(string name) 根据方块实体名返回注册的动态ID。

int Reg.EffectID(string name) 根据特效名返回注册的动态ID。

int Reg.BuffID(string name) 根据BUFF名返回注册的动态ID。

int Reg.EnchantmentID(string name) 根据附魔名返回注册的动态ID。

int Reg.NpcID(string name) 根据NPC名返回注册的动态ID。

int Reg.ProjectileID(string name) 根据抛射物名返回注册的动态ID。

int Reg.SoundID(string name) 根据音效名返回注册的动态ID。

int Reg.SoundGroupID(string name) 根据音效组名返回注册的动态ID。

int Reg.LiquidID(string name) 根据流体名返回注册的动态ID。

int Reg.SkeletonJointID(string skeletonName, string jointName) 根据骨骼模型名关节名返回关节在该骨骼模型注册的动态ID。

int Reg.ModTextureID(string name) 根据模组贴图名返回注册的动态贴图ID。服务端总是返回0。

Last updated