|
|
|
@@ -1,437 +1,439 @@
|
|
|
|
|
/** LRCA导出接口 */
|
|
|
|
|
const GMLIB_API = {
|
|
|
|
|
/** 创建悬浮字 @type {function(FloatPos,string,boolean):number} */
|
|
|
|
|
createFloatingText: ll.import("GMLIB_API", "createFloatingText"),
|
|
|
|
|
createFloatingText: ll.imports("GMLIB_API", "createFloatingText"),
|
|
|
|
|
/** 删除悬浮字 @type {function(number):boolean} */
|
|
|
|
|
deleteFloatingText: ll.import("GMLIB_API", "deleteFloatingText"),
|
|
|
|
|
deleteFloatingText: ll.imports("GMLIB_API", "deleteFloatingText"),
|
|
|
|
|
/** 设置悬浮字文本 @type {function(number,string):boolean} */
|
|
|
|
|
setFloatingTextData: ll.import("GMLIB_API", "setFloatingTextData"),
|
|
|
|
|
setFloatingTextData: ll.imports("GMLIB_API", "setFloatingTextData"),
|
|
|
|
|
/** 发送悬浮字给玩家 @type {function(number,Player):boolean} */
|
|
|
|
|
sendFloatingTextToPlayer: ll.import("GMLIB_API", "sendFloatingTextToPlayer"),
|
|
|
|
|
sendFloatingTextToPlayer: ll.imports("GMLIB_API", "sendFloatingTextToPlayer"),
|
|
|
|
|
/** 发送悬浮字给所有玩家 @type {function(number):boolean} */
|
|
|
|
|
sendFloatingText: ll.import("GMLIB_API", "sendFloatingText"),
|
|
|
|
|
sendFloatingText: ll.imports("GMLIB_API", "sendFloatingText"),
|
|
|
|
|
/** 删除玩家的悬浮字 @type {function(number,Player):boolean} */
|
|
|
|
|
removeFloatingTextFromPlayer: ll.import("GMLIB_API", "removeFloatingTextFromPlayer"),
|
|
|
|
|
removeFloatingTextFromPlayer: ll.imports("GMLIB_API", "removeFloatingTextFromPlayer"),
|
|
|
|
|
/** 删除所有玩家悬浮字 @type {function(number):boolean} */
|
|
|
|
|
removeFloatingText: ll.import("GMLIB_API", "removeFloatingText"),
|
|
|
|
|
removeFloatingText: ll.imports("GMLIB_API", "removeFloatingText"),
|
|
|
|
|
/** 更新玩家的悬浮字 @type {function(number,Player):boolean} */
|
|
|
|
|
updateClientFloatingTextData: ll.import("GMLIB_API", "updateClientFloatingTextData"),
|
|
|
|
|
updateClientFloatingTextData: ll.imports("GMLIB_API", "updateClientFloatingTextData"),
|
|
|
|
|
/** 更新所有玩家的悬浮字 @type {function(number):boolean} */
|
|
|
|
|
updateAllClientsFloatingTextData: ll.import("GMLIB_API", "updateAllClientsFloatingTextData"),
|
|
|
|
|
updateAllClientsFloatingTextData: ll.imports("GMLIB_API", "updateAllClientsFloatingTextData"),
|
|
|
|
|
/** 获取服务器Mspt @type {function():number} */
|
|
|
|
|
getServerMspt: ll.import("GMLIB_API", "getServerMspt"),
|
|
|
|
|
getServerMspt: ll.imports("GMLIB_API", "getServerMspt"),
|
|
|
|
|
/** 获取服务器当前tps @type {function():number} */
|
|
|
|
|
getServerCurrentTps: ll.import("GMLIB_API", "getServerCurrentTps"),
|
|
|
|
|
getServerCurrentTps: ll.imports("GMLIB_API", "getServerCurrentTps"),
|
|
|
|
|
/** 获取服务器平均tps @type {function():number} */
|
|
|
|
|
getServerAverageTps: ll.import("GMLIB_API", "getServerAverageTps"),
|
|
|
|
|
getServerAverageTps: ll.imports("GMLIB_API", "getServerAverageTps"),
|
|
|
|
|
/** 获取存档内所有玩家的uuid @type {function():Array<string>} */
|
|
|
|
|
getAllPlayerUuids: ll.import("GMLIB_API", "getAllPlayerUuids"),
|
|
|
|
|
getAllPlayerUuids: ll.imports("GMLIB_API", "getAllPlayerUuids"),
|
|
|
|
|
/** 获取玩家NBT @type {function(string):NbtCompound} */
|
|
|
|
|
getPlayerNbt: ll.import("GMLIB_API", "getPlayerNbt"),
|
|
|
|
|
getPlayerNbt: ll.imports("GMLIB_API", "getPlayerNbt"),
|
|
|
|
|
/** 设置玩家NBT @type {function(string,NbtCompound,boolean):boolean} */
|
|
|
|
|
setPlayerNbt: ll.import("GMLIB_API", "setPlayerNbt"),
|
|
|
|
|
setPlayerNbt: ll.imports("GMLIB_API", "setPlayerNbt"),
|
|
|
|
|
/** 覆盖玩家的特定nbtTags @type {function(string,NbtCompound,Array.<string>):boolean} */
|
|
|
|
|
setPlayerNbtTags: ll.import("GMLIB_API", "setPlayerNbtTags"),
|
|
|
|
|
setPlayerNbtTags: ll.imports("GMLIB_API", "setPlayerNbtTags"),
|
|
|
|
|
/** 删除玩家所有的NBT @type {function(string):boolean} */
|
|
|
|
|
deletePlayerNbt: ll.import("GMLIB_API", "deletePlayerNbt"),
|
|
|
|
|
deletePlayerNbt: ll.imports("GMLIB_API", "deletePlayerNbt"),
|
|
|
|
|
/** 使用特定语言翻译资源包文本 @type {function(string,Array.<string>,string):string} */
|
|
|
|
|
resourcePackTranslate: ll.import("GMLIB_API", "resourcePackTranslate"),
|
|
|
|
|
resourcePackTranslate: ll.imports("GMLIB_API", "resourcePackTranslate"),
|
|
|
|
|
/** 使用默认语言翻译资源包文本 @type {function(string,Array.<string>):string} */
|
|
|
|
|
resourcePackDefaultTranslate: ll.import("GMLIB_API", "resourcePackDefaultTranslate"),
|
|
|
|
|
resourcePackDefaultTranslate: ll.imports("GMLIB_API", "resourcePackDefaultTranslate"),
|
|
|
|
|
/** 获取资源包默认语言 @type {function():string} */
|
|
|
|
|
getResourcePackI18nLanguage: ll.import("GMLIB_API", "getResourcePackI18nLanguage"),
|
|
|
|
|
getResourcePackI18nLanguage: ll.imports("GMLIB_API", "getResourcePackI18nLanguage"),
|
|
|
|
|
/** 设置资源包默认语言 @type {function(string):void} */
|
|
|
|
|
chooseResourcePackI18nLanguage: ll.import("GMLIB_API", "chooseResourcePackI18nLanguage"),
|
|
|
|
|
chooseResourcePackI18nLanguage: ll.imports("GMLIB_API", "chooseResourcePackI18nLanguage"),
|
|
|
|
|
/** 启用教育版内容 @type {function():void} */
|
|
|
|
|
setEducationFeatureEnabled: ll.import("GMLib_ServerAPI", "setEducationFeatureEnabled"),
|
|
|
|
|
setEducationFeatureEnabled: ll.imports("GMLib_ServerAPI", "setEducationFeatureEnabled"),
|
|
|
|
|
/** 注册Ability命令 @type {function():void} */
|
|
|
|
|
registerAbilityCommand: ll.import("GMLib_ServerAPI", "registerAbilityCommand"),
|
|
|
|
|
registerAbilityCommand: ll.imports("GMLib_ServerAPI", "registerAbilityCommand"),
|
|
|
|
|
/** 启用Xbox成就 @type {function():void} */
|
|
|
|
|
setEnableAchievement: ll.import("GMLib_ServerAPI", "setEnableAchievement"),
|
|
|
|
|
setEnableAchievement: ll.imports("GMLib_ServerAPI", "setEnableAchievement"),
|
|
|
|
|
/** 信任所有玩家皮肤 @type {function():void} */
|
|
|
|
|
setForceTrustSkins: ll.import("GMLib_ServerAPI", "setForceTrustSkins"),
|
|
|
|
|
setForceTrustSkins: ll.imports("GMLib_ServerAPI", "setForceTrustSkins"),
|
|
|
|
|
/** 资源包双端共存 @type {function():void} */
|
|
|
|
|
enableCoResourcePack: ll.import("GMLib_ServerAPI", "enableCoResourcePack"),
|
|
|
|
|
enableCoResourcePack: ll.imports("GMLib_ServerAPI", "enableCoResourcePack"),
|
|
|
|
|
/** 获取存档名字 @type {function():string} */
|
|
|
|
|
getLevelName: ll.import("GMLib_ServerAPI", "getLevelName"),
|
|
|
|
|
getLevelName: ll.imports("GMLib_ServerAPI", "getLevelName"),
|
|
|
|
|
/** 设置存档名字 @type {function(string):boolean} */
|
|
|
|
|
setLevelName: ll.import("GMLib_ServerAPI", "setLevelName"),
|
|
|
|
|
setLevelName: ll.imports("GMLib_ServerAPI", "setLevelName"),
|
|
|
|
|
/** 设置假种子 @type {function(number):void} */
|
|
|
|
|
setFakeSeed: ll.import("GMLib_ServerAPI", "setFakeSeed"),
|
|
|
|
|
setFakeSeed: ll.imports("GMLib_ServerAPI", "setFakeSeed"),
|
|
|
|
|
/** 强制生成实体 @type {function(FloatPos,string):Entity} */
|
|
|
|
|
spawnEntity: ll.import("GMLib_ServerAPI", "spawnEntity"),
|
|
|
|
|
spawnEntity: ll.imports("GMLib_ServerAPI", "spawnEntity"),
|
|
|
|
|
/** 射弹投射物 @type {function(Entity,string,number,number):boolean} */
|
|
|
|
|
shootProjectile: ll.import("GMLib_ServerAPI", "shootProjectile"),
|
|
|
|
|
shootProjectile: ll.imports("GMLib_ServerAPI", "shootProjectile"),
|
|
|
|
|
/** 投掷实体 @type {function(Entity,Entity,number,number):boolean} */
|
|
|
|
|
throwEntity: ll.import("GMLib_ServerAPI", "throwEntity"),
|
|
|
|
|
throwEntity: ll.imports("GMLib_ServerAPI", "throwEntity"),
|
|
|
|
|
/** 根据玩家对象获取实体对象 @type {function(Player):Entity} */
|
|
|
|
|
PlayerToEntity: ll.import("GMLib_ServerAPI", "PlayerToEntity"),
|
|
|
|
|
PlayerToEntity: ll.imports("GMLib_ServerAPI", "PlayerToEntity"),
|
|
|
|
|
/** 启用错误方块清理 @type {function():void} */
|
|
|
|
|
setUnknownBlockCleaner: ll.import("GMLib_ModAPI", "setUnknownBlockCleaner"),
|
|
|
|
|
setUnknownBlockCleaner: ll.imports("GMLib_ModAPI", "setUnknownBlockCleaner"),
|
|
|
|
|
/** 获取实验性功能ID列表 @type {function():Array<number>} */
|
|
|
|
|
getAllExperiments: ll.import("GMLIB_API", "getAllExperiments"),
|
|
|
|
|
getAllExperiments: ll.imports("GMLIB_API", "getAllExperiments"),
|
|
|
|
|
/** 获取实验性功能文本的键名 @type {function(number):string} */
|
|
|
|
|
getExperimentTranslateKey: ll.import("GMLIB_API", "getExperimentTranslateKey"),
|
|
|
|
|
getExperimentTranslateKey: ll.imports("GMLIB_API", "getExperimentTranslateKey"),
|
|
|
|
|
/** 获取实验性功能启用状态 @type {function(number):boolean} */
|
|
|
|
|
getExperimentEnabled: ll.import("GMLib_ModAPI", "getExperimentEnabled"),
|
|
|
|
|
getExperimentEnabled: ll.imports("GMLib_ModAPI", "getExperimentEnabled"),
|
|
|
|
|
/** 设置实验性功能启用状态 @type {function(number,boolean):void} */
|
|
|
|
|
setExperimentEnabled: ll.import("GMLib_ModAPI", "setExperimentEnabled"),
|
|
|
|
|
setExperimentEnabled: ll.imports("GMLib_ModAPI", "setExperimentEnabled"),
|
|
|
|
|
/** 注销合成表 @type {function(string):boolean} */
|
|
|
|
|
unregisterRecipe: ll.import("GMLIB_API", "unregisterRecipe"),
|
|
|
|
|
unregisterRecipe: ll.imports("GMLIB_API", "unregisterRecipe"),
|
|
|
|
|
/** 设置实验性依赖 @type {function(number):void} */
|
|
|
|
|
registerExperimentsRequire: ll.import("GMLib_ModAPI", "registerExperimentsRequire"),
|
|
|
|
|
registerExperimentsRequire: ll.imports("GMLib_ModAPI", "registerExperimentsRequire"),
|
|
|
|
|
/** 注册切石机合成表 @type {function(string,string,number,string,number,number):boolean} */
|
|
|
|
|
registerStoneCutterRecipe: ll.import("GMLib_ModAPI", "registerStoneCutterRecipe"),
|
|
|
|
|
registerStoneCutterRecipe: ll.imports("GMLib_ModAPI", "registerStoneCutterRecipe"),
|
|
|
|
|
/** 注册锻造纹饰合成表 @type {function(string,string,string,string):boolean} */
|
|
|
|
|
registerSmithingTrimRecipe: ll.import("GMLib_ModAPI", "registerSmithingTrimRecipe"),
|
|
|
|
|
registerSmithingTrimRecipe: ll.imports("GMLib_ModAPI", "registerSmithingTrimRecipe"),
|
|
|
|
|
/** 注册锻造配方合成表 @type {function(string,string,string,string):boolean} */
|
|
|
|
|
registerSmithingTransformRecipe: ll.import("GMLib_ModAPI", "registerSmithingTransformRecipe"),
|
|
|
|
|
registerSmithingTransformRecipe: ll.imports("GMLib_ModAPI", "registerSmithingTransformRecipe"),
|
|
|
|
|
/** 注册酿造容器表 @type {function(string,string,string,string):boolean} */
|
|
|
|
|
registerBrewingContainerRecipe: ll.import("GMLib_ModAPI", "registerBrewingContainerRecipe"),
|
|
|
|
|
registerBrewingContainerRecipe: ll.imports("GMLib_ModAPI", "registerBrewingContainerRecipe"),
|
|
|
|
|
/** 注册酿造混合表 @type {function(string,string,string,string):boolean} */
|
|
|
|
|
registerBrewingMixRecipe: ll.import("GMLib_ModAPI", "registerBrewingMixRecipe"),
|
|
|
|
|
registerBrewingMixRecipe: ll.imports("GMLib_ModAPI", "registerBrewingMixRecipe"),
|
|
|
|
|
/** 注册熔炼合成表 @type {function(string,string,string,Array.<string>):boolean} */
|
|
|
|
|
registerFurnaceRecipe: ll.import("GMLib_ModAPI", "registerFurnaceRecipe"),
|
|
|
|
|
registerFurnaceRecipe: ll.imports("GMLib_ModAPI", "registerFurnaceRecipe"),
|
|
|
|
|
/** 注册有序合成表 @type {function(string,Array.<string>,Array.<string>,string,number,string)} */
|
|
|
|
|
registerShapedRecipe: ll.import("GMLib_ModAPI", "registerShapedRecipe"),
|
|
|
|
|
registerShapedRecipe: ll.imports("GMLib_ModAPI", "registerShapedRecipe"),
|
|
|
|
|
/** 注册无序合成表 @type {function(string,Array.<string>,Array.<string>,string,number,string)} */
|
|
|
|
|
registerShapelessRecipe: ll.import("GMLib_ModAPI", "registerShapelessRecipe"),
|
|
|
|
|
registerShapelessRecipe: ll.imports("GMLib_ModAPI", "registerShapelessRecipe"),
|
|
|
|
|
/** 注册有序合成表 @type {function(string,Array.<string>,Array.<string>,string,number,string)} */
|
|
|
|
|
registerCustomShapedRecipe: ll.import("GMLIB_API", "registerCustomShapedRecipe"),
|
|
|
|
|
registerCustomShapedRecipe: ll.imports("GMLIB_API", "registerCustomShapedRecipe"),
|
|
|
|
|
/** 注册无序合成表 @type {function(string,Array.<string>,Array.<string>,string,number,string)} */
|
|
|
|
|
registerCustomShapelessRecipe: ll.import("GMLIB_API", "registerCustomShapelessRecipe"),
|
|
|
|
|
registerCustomShapelessRecipe: ll.imports("GMLIB_API", "registerCustomShapelessRecipe"),
|
|
|
|
|
/** 检测LRCA版本是否大于或等于此版本 @type {function(number,number,number):boolean} */
|
|
|
|
|
isVersionMatched: ll.import("GMLIB_API", "isVersionMatched"),
|
|
|
|
|
isVersionMatched: ll.imports("GMLIB_API", "isVersionMatched"),
|
|
|
|
|
/** 获取LRCA版本 @type {function():string} */
|
|
|
|
|
getVersion_LRCA: ll.import("GMLIB_API", "getVersion_LRCA"),
|
|
|
|
|
getVersion_LRCA: ll.imports("GMLIB_API", "getVersion_LRCA"),
|
|
|
|
|
/** 获取GMLIB版本 @type {function():string} */
|
|
|
|
|
getVersion_GMLIB: ll.import("GMLIB_API", "getVersion_GMLIB"),
|
|
|
|
|
getVersion_GMLIB: ll.imports("GMLIB_API", "getVersion_GMLIB"),
|
|
|
|
|
/** 获取玩家坐标 @type {function(string):IntPos} */
|
|
|
|
|
getPlayerPosition: ll.import("GMLIB_API", "getPlayerPosition"),
|
|
|
|
|
getPlayerPosition: ll.imports("GMLIB_API", "getPlayerPosition"),
|
|
|
|
|
/** 设置玩家坐标 @type {function(string,IntPos):boolean} */
|
|
|
|
|
setPlayerPosition: ll.import("GMLIB_API", "setPlayerPosition"),
|
|
|
|
|
setPlayerPosition: ll.imports("GMLIB_API", "setPlayerPosition"),
|
|
|
|
|
/** 玩家是否存在于计分板 @type {function(string,string):boolean} */
|
|
|
|
|
playerHasScore: ll.import("GMLIB_API", "playerHasScore"),
|
|
|
|
|
playerHasScore: ll.imports("GMLIB_API", "playerHasScore"),
|
|
|
|
|
/** 获取玩家在计分板中的值 @type {function(string,string):number} */
|
|
|
|
|
getPlayerScore: ll.import("GMLIB_API", "getPlayerScore"),
|
|
|
|
|
getPlayerScore: ll.imports("GMLIB_API", "getPlayerScore"),
|
|
|
|
|
/** 增加玩家在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
addPlayerScore: ll.import("GMLIB_API", "addPlayerScore"),
|
|
|
|
|
addPlayerScore: ll.imports("GMLIB_API", "addPlayerScore"),
|
|
|
|
|
/** 减少玩家在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
reducePlayerScore: ll.import("GMLIB_API", "reducePlayerScore"),
|
|
|
|
|
reducePlayerScore: ll.imports("GMLIB_API", "reducePlayerScore"),
|
|
|
|
|
/** 设置玩家在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
setPlayerScore: ll.import("GMLIB_API", "setPlayerScore"),
|
|
|
|
|
setPlayerScore: ll.imports("GMLIB_API", "setPlayerScore"),
|
|
|
|
|
/** 重置玩家在计分板中的数据 @type {function(string,string):boolean} */
|
|
|
|
|
resetPlayerScore: ll.import("GMLIB_API", "resetPlayerScore"),
|
|
|
|
|
resetPlayerScore: ll.imports("GMLIB_API", "resetPlayerScore"),
|
|
|
|
|
/** 重置玩家所有的计分板数据 @type {function(string):boolean} */
|
|
|
|
|
resetPlayerScores: ll.import("GMLIB_API", "resetPlayerScores"),
|
|
|
|
|
resetPlayerScores: ll.imports("GMLIB_API", "resetPlayerScores"),
|
|
|
|
|
/** 实体是否存在于计分板中 @type {function(string,string):boolean} */
|
|
|
|
|
entityHasScore: ll.import("GMLIB_API", "entityHasScore"),
|
|
|
|
|
entityHasScore: ll.imports("GMLIB_API", "entityHasScore"),
|
|
|
|
|
/** 获取实体在计分板中的值 @type {function(string,string):number} */
|
|
|
|
|
getEntityScore: ll.import("GMLIB_API", "getEntityScore"),
|
|
|
|
|
getEntityScore: ll.imports("GMLIB_API", "getEntityScore"),
|
|
|
|
|
/** 增加实体在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
addEntityScore: ll.import("GMLIB_API", "addEntityScore"),
|
|
|
|
|
addEntityScore: ll.imports("GMLIB_API", "addEntityScore"),
|
|
|
|
|
/** 减少实体在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
reduceEntityScore: ll.import("GMLIB_API", "reduceEntityScore"),
|
|
|
|
|
reduceEntityScore: ll.imports("GMLIB_API", "reduceEntityScore"),
|
|
|
|
|
/** 设置实体在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
setEntityScore: ll.import("GMLIB_API", "setEntityScore"),
|
|
|
|
|
setEntityScore: ll.imports("GMLIB_API", "setEntityScore"),
|
|
|
|
|
/** 重置实体在计分板中的数据 @type {function(string,string):boolean} */
|
|
|
|
|
resetEntityScore: ll.import("GMLIB_API", "resetEntityScore"),
|
|
|
|
|
resetEntityScore: ll.imports("GMLIB_API", "resetEntityScore"),
|
|
|
|
|
/** 重置实体所有的计分板数据 @type {function(string):boolean} */
|
|
|
|
|
resetEntityScores: ll.import("GMLIB_API", "resetEntityScores"),
|
|
|
|
|
resetEntityScores: ll.imports("GMLIB_API", "resetEntityScores"),
|
|
|
|
|
/** 字符串是否存在于计分板 @type {function(string,string):boolean} */
|
|
|
|
|
fakePlayerHasScore: ll.import("GMLIB_API", "fakePlayerHasScore"),
|
|
|
|
|
fakePlayerHasScore: ll.imports("GMLIB_API", "fakePlayerHasScore"),
|
|
|
|
|
/** 获取字符串在计分板中的值 @type {function(string,string):number} */
|
|
|
|
|
getFakePlayerScore: ll.import("GMLIB_API", "getFakePlayerScore"),
|
|
|
|
|
getFakePlayerScore: ll.imports("GMLIB_API", "getFakePlayerScore"),
|
|
|
|
|
/** 增加字符串在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
addFakePlayerScore: ll.import("GMLIB_API", "addFakePlayerScore"),
|
|
|
|
|
addFakePlayerScore: ll.imports("GMLIB_API", "addFakePlayerScore"),
|
|
|
|
|
/** 减少字符串在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
reduceFakePlayerScore: ll.import("GMLIB_API", "reduceFakePlayerScore"),
|
|
|
|
|
reduceFakePlayerScore: ll.imports("GMLIB_API", "reduceFakePlayerScore"),
|
|
|
|
|
/** 设置字符串在计分板中的值 @type {function(string,string,number):boolean} */
|
|
|
|
|
setFakePlayerScore: ll.import("GMLIB_API", "setFakePlayerScore"),
|
|
|
|
|
setFakePlayerScore: ll.imports("GMLIB_API", "setFakePlayerScore"),
|
|
|
|
|
/** 重置字符串在计分板中的数据 @type {function(string,string):boolean} */
|
|
|
|
|
resetFakePlayerScore: ll.import("GMLIB_API", "resetFakePlayerScore"),
|
|
|
|
|
resetFakePlayerScore: ll.imports("GMLIB_API", "resetFakePlayerScore"),
|
|
|
|
|
/** 重置字符串所有的计分板数据 @type {function(string):boolean} */
|
|
|
|
|
resetFakePlayerScores: ll.import("GMLIB_API", "resetFakePlayerScores"),
|
|
|
|
|
resetFakePlayerScores: ll.imports("GMLIB_API", "resetFakePlayerScores"),
|
|
|
|
|
/** 创建计分板 @type {function(string):boolean} */
|
|
|
|
|
addObjective: ll.import("GMLIB_API", "addObjective"),
|
|
|
|
|
addObjective: ll.imports("GMLIB_API", "addObjective"),
|
|
|
|
|
/** 创建带有显示名称的计分板 @type {function(string,string):boolean} */
|
|
|
|
|
addObjectiveWithDisplayName: ll.import("GMLIB_API", "addObjectiveWithDisplayName"),
|
|
|
|
|
addObjectiveWithDisplayName: ll.imports("GMLIB_API", "addObjectiveWithDisplayName"),
|
|
|
|
|
/** 获取计分板显示名字 @type {function(string):string} */
|
|
|
|
|
getDisplayName: ll.import("GMLIB_API", "getDisplayName"),
|
|
|
|
|
getDisplayName: ll.imports("GMLIB_API", "getDisplayName"),
|
|
|
|
|
/** 设置计分板显示名字 @type {function(string,string):boolean} */
|
|
|
|
|
setDisplayName: ll.import("GMLIB_API", "setDisplayName"),
|
|
|
|
|
setDisplayName: ll.imports("GMLIB_API", "setDisplayName"),
|
|
|
|
|
/** 删除计分板 @type {function(string):boolean} */
|
|
|
|
|
removeObjective: ll.import("GMLIB_API", "removeObjective"),
|
|
|
|
|
removeObjective: ll.imports("GMLIB_API", "removeObjective"),
|
|
|
|
|
/** 设置计分板显示 @type {function(string,"list"|"sidebar"|"belowname",0|1):void} */
|
|
|
|
|
setDisplayObjective: ll.import("GMLIB_API", "setDisplayObjective"),
|
|
|
|
|
setDisplayObjective: ll.imports("GMLIB_API", "setDisplayObjective"),
|
|
|
|
|
/** 清除计分板显示 @type {function("list"|"sidebar"|"belowname"):void} */
|
|
|
|
|
clearDisplayObjective: ll.import("GMLIB_API", "clearDisplayObjective"),
|
|
|
|
|
clearDisplayObjective: ll.imports("GMLIB_API", "clearDisplayObjective"),
|
|
|
|
|
/** 获取所有计分板 @type {function():Array.<string>} */
|
|
|
|
|
getAllObjectives: ll.import("GMLIB_API", "getAllObjectives"),
|
|
|
|
|
getAllObjectives: ll.imports("GMLIB_API", "getAllObjectives"),
|
|
|
|
|
/** 获取所有跟踪目标 @type {function():Array.<{"Type":"Player","Uuid":string}|{"Type":"FakePlayer","Name":string}|{"Type":"Entity","UniqueId":string}>} */
|
|
|
|
|
getAllTrackedTargets: ll.import("GMLIB_API", "getAllTrackedTargets"),
|
|
|
|
|
getAllTrackedTargets: ll.imports("GMLIB_API", "getAllTrackedTargets"),
|
|
|
|
|
/** 获取所有跟踪玩家 @type {function():Array.<string>} */
|
|
|
|
|
getAllScoreboardPlayers: ll.import("GMLIB_API", "getAllScoreboardPlayers"),
|
|
|
|
|
getAllScoreboardPlayers: ll.imports("GMLIB_API", "getAllScoreboardPlayers"),
|
|
|
|
|
/** 获取所有跟踪字符串 @type {function():Array.<string>} */
|
|
|
|
|
getAllScoreboardFakePlayers: ll.import("GMLIB_API", "getAllScoreboardFakePlayers"),
|
|
|
|
|
getAllScoreboardFakePlayers: ll.imports("GMLIB_API", "getAllScoreboardFakePlayers"),
|
|
|
|
|
/** 获取所有跟踪实体 @type {function():Array.<string>} */
|
|
|
|
|
getAllScoreboardEntities: ll.import("GMLIB_API", "getAllScoreboardEntities"),
|
|
|
|
|
getAllScoreboardEntities: ll.imports("GMLIB_API", "getAllScoreboardEntities"),
|
|
|
|
|
/** 根据uuid获取玩家对象 @type {function(string):Player} */
|
|
|
|
|
getPlayerFromUuid: ll.import("GMLIB_API", "getPlayerFromUuid"),
|
|
|
|
|
getPlayerFromUuid: ll.imports("GMLIB_API", "getPlayerFromUuid"),
|
|
|
|
|
/** 根据UniqueId获取玩家对象 @type {function(string):Player} */
|
|
|
|
|
getPlayerFromUniqueId: ll.import("GMLIB_API", "getPlayerFromUniqueId"),
|
|
|
|
|
getPlayerFromUniqueId: ll.imports("GMLIB_API", "getPlayerFromUniqueId"),
|
|
|
|
|
/** 根据UniqueId获取实体对象 @type {function(string):Entity} */
|
|
|
|
|
getEntityFromUniqueId: ll.import("GMLIB_API", "getEntityFromUniqueId"),
|
|
|
|
|
getEntityFromUniqueId: ll.imports("GMLIB_API", "getEntityFromUniqueId"),
|
|
|
|
|
/** 获取世界出生点 @type {function():IntPos} */
|
|
|
|
|
getWorldSpawn: ll.import("GMLIB_API", "getWorldSpawn"),
|
|
|
|
|
getWorldSpawn: ll.imports("GMLIB_API", "getWorldSpawn"),
|
|
|
|
|
/** 设置世界出生点 @type {function(IntPos):void} */
|
|
|
|
|
setWorldSpawn: ll.import("GMLIB_API", "setWorldSpawn"),
|
|
|
|
|
setWorldSpawn: ll.imports("GMLIB_API", "setWorldSpawn"),
|
|
|
|
|
/** 获取玩家重生点 @type {function(Player):IntPos} */
|
|
|
|
|
getPlayerSpawnPoint: ll.import("GMLIB_API", "getPlayerSpawnPoint"),
|
|
|
|
|
getPlayerSpawnPoint: ll.imports("GMLIB_API", "getPlayerSpawnPoint"),
|
|
|
|
|
/** 设置玩家重生点 @type {function(Player,IntPos):void} */
|
|
|
|
|
setPlayerSpawnPoint: ll.import("GMLIB_API", "setPlayerSpawnPoint"),
|
|
|
|
|
setPlayerSpawnPoint: ll.imports("GMLIB_API", "setPlayerSpawnPoint"),
|
|
|
|
|
/** 清除玩家重生点 @type {function(Player):void} */
|
|
|
|
|
clearPlayerSpawnPoint: ll.import("GMLIB_API", "clearPlayerSpawnPoint"),
|
|
|
|
|
clearPlayerSpawnPoint: ll.imports("GMLIB_API", "clearPlayerSpawnPoint"),
|
|
|
|
|
/** 设置资源包路径 @type {function(string):void} */
|
|
|
|
|
setCustomPackPath: ll.import("GMLIB_API", "setCustomPackPath"),
|
|
|
|
|
setCustomPackPath: ll.imports("GMLIB_API", "setCustomPackPath"),
|
|
|
|
|
/** 获取支持的语言标识符 @type {function():Array.<string>} */
|
|
|
|
|
getSupportedLanguages: ll.import("GMLIB_API", "getSupportedLanguages"),
|
|
|
|
|
getSupportedLanguages: ll.imports("GMLIB_API", "getSupportedLanguages"),
|
|
|
|
|
/** 加载语言翻译 @type {function(string,string):void} */
|
|
|
|
|
loadLanguage: ll.import("GMLIB_API", "loadLanguage"),
|
|
|
|
|
loadLanguage: ll.imports("GMLIB_API", "loadLanguage"),
|
|
|
|
|
/** 更新或创建语言文件 @type {function(string,string,string):void} */
|
|
|
|
|
updateOrCreateLanguageFile: ll.import("GMLIB_API", "updateOrCreateLanguageFile"),
|
|
|
|
|
updateOrCreateLanguageFile: ll.imports("GMLIB_API", "updateOrCreateLanguageFile"),
|
|
|
|
|
/** 加载语言文件目录 @type {function(string):void} */
|
|
|
|
|
loadLanguagePath: ll.import("GMLIB_API", "loadLanguagePath"),
|
|
|
|
|
loadLanguagePath: ll.imports("GMLIB_API", "loadLanguagePath"),
|
|
|
|
|
/** 合并json @type {function(string,string):string} */
|
|
|
|
|
mergePatchJson: ll.import("GMLIB_API", "mergePatchJson"),
|
|
|
|
|
mergePatchJson: ll.imports("GMLIB_API", "mergePatchJson"),
|
|
|
|
|
/** 根据uuid获取xuid @type {function(string):string} */
|
|
|
|
|
getXuidByUuid: ll.import("GMLIB_API", "getXuidByUuid"),
|
|
|
|
|
getXuidByUuid: ll.imports("GMLIB_API", "getXuidByUuid"),
|
|
|
|
|
/** 根据uuid获取名字 @type {function(string):string} */
|
|
|
|
|
getNameByUuid: ll.import("GMLIB_API", "getNameByUuid"),
|
|
|
|
|
getNameByUuid: ll.imports("GMLIB_API", "getNameByUuid"),
|
|
|
|
|
/** 根据xuid获取uuid @type {function(string):string} */
|
|
|
|
|
getUuidByXuid: ll.import("GMLIB_API", "getUuidByXuid"),
|
|
|
|
|
getUuidByXuid: ll.imports("GMLIB_API", "getUuidByXuid"),
|
|
|
|
|
/** 根据xuid获取名字 @type {function(string):string} */
|
|
|
|
|
getNameByXuid: ll.import("GMLIB_API", "getNameByXuid"),
|
|
|
|
|
getNameByXuid: ll.imports("GMLIB_API", "getNameByXuid"),
|
|
|
|
|
/** 根据名字获取xuid @type {function(string):string} */
|
|
|
|
|
getXuidByName: ll.import("GMLIB_API", "getXuidByName"),
|
|
|
|
|
getXuidByName: ll.imports("GMLIB_API", "getXuidByName"),
|
|
|
|
|
/** 根据名字获取uuid @type {function(string):string} */
|
|
|
|
|
getUuidByName: ll.import("GMLIB_API", "getUuidByName"),
|
|
|
|
|
getUuidByName: ll.imports("GMLIB_API", "getUuidByName"),
|
|
|
|
|
/** 获取所有已记录的玩家信息 @type {function():Array.<{"Uuid":string,"Xuid":string,"Name":string}>} */
|
|
|
|
|
getAllPlayerInfo: ll.import("GMLIB_API", "getAllPlayerInfo"),
|
|
|
|
|
getAllPlayerInfo: ll.imports("GMLIB_API", "getAllPlayerInfo"),
|
|
|
|
|
/** 获取方块RuntimeId @type {function(string,number):number} */
|
|
|
|
|
getBlockRuntimeId: ll.import("GMLIB_API", "getBlockRuntimeId"),
|
|
|
|
|
getBlockRuntimeId: ll.imports("GMLIB_API", "getBlockRuntimeId"),
|
|
|
|
|
/** 添加虚假列表玩家 @type {function(string,string):boolean} */
|
|
|
|
|
addFakeList: ll.import("GMLIB_API", "addFakeList"),
|
|
|
|
|
addFakeList: ll.imports("GMLIB_API", "addFakeList"),
|
|
|
|
|
/** 删除虚假列表玩家 @type {function(string):boolean} */
|
|
|
|
|
removeFakeList: ll.import("GMLIB_API", "removeFakeList"),
|
|
|
|
|
removeFakeList: ll.imports("GMLIB_API", "removeFakeList"),
|
|
|
|
|
/** 删除所有虚假列表玩家 @type {function():void} */
|
|
|
|
|
removeAllFakeLists: ll.import("GMLIB_API", "removeAllFakeList"),
|
|
|
|
|
removeAllFakeLists: ll.imports("GMLIB_API", "removeAllFakeList"),
|
|
|
|
|
/** 启用I18n修复 @type {function():void} */
|
|
|
|
|
setFixI18nEnabled: ll.import("GMLib_ModAPI", "setFixI18nEnabled"),
|
|
|
|
|
setFixI18nEnabled: ll.imports("GMLib_ModAPI", "setFixI18nEnabled"),
|
|
|
|
|
/** 获取方块翻译键名 @type {function(Block):string} */
|
|
|
|
|
getBlockTranslateKey: ll.import("GMLIB_API", "getBlockTranslateKey"),
|
|
|
|
|
getBlockTranslateKey: ll.imports("GMLIB_API", "getBlockTranslateKey"),
|
|
|
|
|
/** 获取物品翻译键名 @type {function(Item):string} */
|
|
|
|
|
getItemTranslateKey: ll.import("GMLIB_API", "getItemTranslateKey"),
|
|
|
|
|
getItemTranslateKey: ll.imports("GMLIB_API", "getItemTranslateKey"),
|
|
|
|
|
/** 获取实体翻译键名 @type {function(Entity):string} */
|
|
|
|
|
getEntityTranslateKey: ll.import("GMLIB_API", "getEntityTranslateKey"),
|
|
|
|
|
getEntityTranslateKey: ll.imports("GMLIB_API", "getEntityTranslateKey"),
|
|
|
|
|
/** 从文件中读取NBT @type {function(string,boolean):NbtCompound} */
|
|
|
|
|
readNbtFromFile: ll.import("GMLIB_API", "readNbtFromFile"),
|
|
|
|
|
readNbtFromFile: ll.imports("GMLIB_API", "readNbtFromFile"),
|
|
|
|
|
/** 保存NBT至文件 @type {function(string,NbtCompound,boolean):void} */
|
|
|
|
|
saveNbtToFile: ll.import("GMLIB_API", "saveNbtToFile"),
|
|
|
|
|
saveNbtToFile: ll.imports("GMLIB_API", "saveNbtToFile"),
|
|
|
|
|
/** 获取方块硬度 @type {function(Block):number} */
|
|
|
|
|
getBlockDestroySpeed: ll.import("GMLIB_API", "getBlockDestroySpeed"),
|
|
|
|
|
getBlockDestroySpeed: ll.imports("GMLIB_API", "getBlockDestroySpeed"),
|
|
|
|
|
/** 获取物品挖掘方块速度 @type {function(Item,Block):number} */
|
|
|
|
|
getDestroyBlockSpeed: ll.import("GMLIB_API", "getDestroyBlockSpeed"),
|
|
|
|
|
getDestroyBlockSpeed: ll.imports("GMLIB_API", "getDestroyBlockSpeed"),
|
|
|
|
|
/** 使玩家挖掘方块 @type {function(Block,IntPos,Player):void} */
|
|
|
|
|
playerDestroyBlock: ll.import("GMLIB_API", "playerDestroyBlock"),
|
|
|
|
|
playerDestroyBlock: ll.imports("GMLIB_API", "playerDestroyBlock"),
|
|
|
|
|
/** 物品冒险模式下是否可以挖掘方块 @type {function(Item,Block):boolean} */
|
|
|
|
|
itemCanDestroyBlock: ll.import("GMLIB_API", "itemCanDestroyBlock"),
|
|
|
|
|
itemCanDestroyBlock: ll.imports("GMLIB_API", "itemCanDestroyBlock"),
|
|
|
|
|
/** 物品是否能破坏方块 @type {function(Item):boolean} */
|
|
|
|
|
itemCanDestroyInCreative: ll.import("GMLIB_API", "itemCanDestroyInCreative"),
|
|
|
|
|
itemCanDestroyInCreative: ll.imports("GMLIB_API", "itemCanDestroyInCreative"),
|
|
|
|
|
/** 物品是否可以采集方块 @type {function(Item,Block):boolean} */
|
|
|
|
|
itemCanDestroySpecial: ll.import("GMLIB_API", "itemCanDestroySpecial"),
|
|
|
|
|
itemCanDestroySpecial: ll.imports("GMLIB_API", "itemCanDestroySpecial"),
|
|
|
|
|
/** @type {function(Block):boolean} */
|
|
|
|
|
blockCanDropWithAnyTool: ll.import("GMLIB_API", "blockCanDropWithAnyTool"),
|
|
|
|
|
blockCanDropWithAnyTool: ll.imports("GMLIB_API", "blockCanDropWithAnyTool"),
|
|
|
|
|
/** @type {function(Block,Player,IntPos):boolean} */
|
|
|
|
|
blockPlayerWillDestroy: ll.import("GMLIB_API", "blockPlayerWillDestroy"),
|
|
|
|
|
blockPlayerWillDestroy: ll.imports("GMLIB_API", "blockPlayerWillDestroy"),
|
|
|
|
|
/** 使玩家攻击实体 @type {function(Entity,Player):boolean} */
|
|
|
|
|
playerAttack: ll.import("GMLIB_API", "playerAttack"),
|
|
|
|
|
playerAttack: ll.imports("GMLIB_API", "playerAttack"),
|
|
|
|
|
/** @type {function(Player,Entity):void} */
|
|
|
|
|
playerPullInEntity: ll.import("GMLIB_API", "playerPullInEntity"),
|
|
|
|
|
playerPullInEntity: ll.imports("GMLIB_API", "playerPullInEntity"),
|
|
|
|
|
/** 根据命令空间获取翻译键名 @type {function(string):string} */
|
|
|
|
|
getBlockTranslateKeyFromName: ll.import("GMLIB_API", "getBlockTranslateKeyFromName"),
|
|
|
|
|
getBlockTranslateKeyFromName: ll.imports("GMLIB_API", "getBlockTranslateKeyFromName"),
|
|
|
|
|
/** 获取存档种子 @type {function():string} */
|
|
|
|
|
getLevelSeed: ll.import("GMLib_ServerAPI", "getLevelSeed"),
|
|
|
|
|
getLevelSeed: ll.imports("GMLib_ServerAPI", "getLevelSeed"),
|
|
|
|
|
/** 获取方块亮度 @type {function(string,number):number} */
|
|
|
|
|
getBlockLightEmission: ll.import("GMLIB_API", "getBlockLightEmission"),
|
|
|
|
|
getBlockLightEmission: ll.imports("GMLIB_API", "getBlockLightEmission"),
|
|
|
|
|
/** 获取游戏规则列表 @type {function():Array.<{Name:string,Value:string,Type:"Bool"|"Float"|"Int"}>} */
|
|
|
|
|
getGameRules: ll.import("GMLIB_API", "getGameRules"),
|
|
|
|
|
getGameRules: ll.imports("GMLIB_API", "getGameRules"),
|
|
|
|
|
/** 给物品添加附魔 @type {function(Item,string,number,boolean):boolean} */
|
|
|
|
|
applyEnchant: ll.import("GMLIB_API", "applyEnchant"),
|
|
|
|
|
applyEnchant: ll.imports("GMLIB_API", "applyEnchant"),
|
|
|
|
|
/** 删除物品所有附魔 @type {function(Item):void} */
|
|
|
|
|
removeEnchants: ll.import("GMLIB_API", "removeEnchants"),
|
|
|
|
|
removeEnchants: ll.imports("GMLIB_API", "removeEnchants"),
|
|
|
|
|
/** 判断物品是否拥有附魔 @type {function(Item,string):boolean} */
|
|
|
|
|
hasEnchant: ll.import("GMLIB_API", "hasEnchant"),
|
|
|
|
|
hasEnchant: ll.imports("GMLIB_API", "hasEnchant"),
|
|
|
|
|
/** 获取附魔等级 @type {function(Item,string):number} */
|
|
|
|
|
getEnchantLevel: ll.import("GMLIB_API", "getEnchantLevel"),
|
|
|
|
|
getEnchantLevel: ll.imports("GMLIB_API", "getEnchantLevel"),
|
|
|
|
|
/** 获取附魔名字 @type {function(string,number):number} */
|
|
|
|
|
getEnchantNameAndLevel: ll.import("GMLIB_API", "getEnchantNameAndLevel"),
|
|
|
|
|
getEnchantNameAndLevel: ll.imports("GMLIB_API", "getEnchantNameAndLevel"),
|
|
|
|
|
/** 通过ID获取附魔命名空间ID @type {function(number):string} */
|
|
|
|
|
getEnchantTypeNameFromId: ll.import("GMLIB_API", "getEnchantTypeNameFromId"),
|
|
|
|
|
getEnchantTypeNameFromId: ll.imports("GMLIB_API", "getEnchantTypeNameFromId"),
|
|
|
|
|
/** 获取最大玩家数 @type {function():number} */
|
|
|
|
|
getMaxPlayers: ll.import("GMLib_ServerAPI", "getMaxPlayers"),
|
|
|
|
|
getMaxPlayers: ll.imports("GMLib_ServerAPI", "getMaxPlayers"),
|
|
|
|
|
/** 丢出玩家背包内物品 @type {function(Player,Item,boolean):boolean} */
|
|
|
|
|
dropPlayerItem: ll.import("GMLIB_API", "dropPlayerItem"),
|
|
|
|
|
dropPlayerItem: ll.imports("GMLIB_API", "dropPlayerItem"),
|
|
|
|
|
/** 获取玩家的RuntimeId @type {function(Player):number} */
|
|
|
|
|
getPlayerRuntimeId: ll.import("GMLIB_API", "getPlayerRuntimeId"),
|
|
|
|
|
getPlayerRuntimeId: ll.imports("GMLIB_API", "getPlayerRuntimeId"),
|
|
|
|
|
/** 获取实体的RuntimeId @type {function(Entity):number} */
|
|
|
|
|
getEntityRuntimeId: ll.import("GMLIB_API", "getEntityRuntimeId"),
|
|
|
|
|
getEntityRuntimeId: ll.imports("GMLIB_API", "getEntityRuntimeId"),
|
|
|
|
|
/** 获取实体命名 @type {function(Entity):string} */
|
|
|
|
|
getEntityNameTag: ll.import("GMLIB_API", "getEntityNameTag"),
|
|
|
|
|
getEntityNameTag: ll.imports("GMLIB_API", "getEntityNameTag"),
|
|
|
|
|
/** 物品是否有不可破坏标签 @type {function(Item):boolean} */
|
|
|
|
|
ItemisUnbreakable: ll.import("GMLIB_API", "ItemisUnbreakable"),
|
|
|
|
|
ItemisUnbreakable: ll.imports("GMLIB_API", "ItemisUnbreakable"),
|
|
|
|
|
/** 设置物品不可破坏标签 @type {function(Item,boolean):void} */
|
|
|
|
|
setItemUnbreakable: ll.import("GMLIB_API", "setItemUnbreakable"),
|
|
|
|
|
setItemUnbreakable: ll.imports("GMLIB_API", "setItemUnbreakable"),
|
|
|
|
|
/** 物品是否死亡不会掉落 @type {function(Item):boolean} */
|
|
|
|
|
getItemShouldKeepOnDeath: ll.import("GMLIB_API", "getItemShouldKeepOnDeath"),
|
|
|
|
|
getItemShouldKeepOnDeath: ll.imports("GMLIB_API", "getItemShouldKeepOnDeath"),
|
|
|
|
|
/** 设置物品死亡不掉落 @type {function(Item,boolean):void} */
|
|
|
|
|
setItemShouldKeepOnDeath: ll.import("GMLIB_API", "setItemShouldKeepOnDeath"),
|
|
|
|
|
setItemShouldKeepOnDeath: ll.imports("GMLIB_API", "setItemShouldKeepOnDeath"),
|
|
|
|
|
/** 获取物品锁定模式 @type {function(Item):number} */
|
|
|
|
|
getItemLockMode: ll.import("GMLIB_API", "getItemLockMode"),
|
|
|
|
|
getItemLockMode: ll.imports("GMLIB_API", "getItemLockMode"),
|
|
|
|
|
/** 设置物品锁定模式 @type {function(Item,number):void} */
|
|
|
|
|
setItemLockMode: ll.import("GMLIB_API", "setItemLockMode"),
|
|
|
|
|
setItemLockMode: ll.imports("GMLIB_API", "setItemLockMode"),
|
|
|
|
|
/** 获取物品惩罚等级 @type {function(Item):number} */
|
|
|
|
|
getItemRepairCost: ll.import("GMLIB_API", "getItemRepairCost"),
|
|
|
|
|
getItemRepairCost: ll.imports("GMLIB_API", "getItemRepairCost"),
|
|
|
|
|
/** 设置物品惩罚等级 @type {function(Item,number):void} */
|
|
|
|
|
setItemRepairCost: ll.import("GMLIB_API", "setItemRepairCost"),
|
|
|
|
|
setItemRepairCost: ll.imports("GMLIB_API", "setItemRepairCost"),
|
|
|
|
|
/** 获取物品冒险模式下可破坏的方块 @type {function(Item):Array.<string>} */
|
|
|
|
|
getItemCanDestroy: ll.import("GMLIB_API", "getItemCanDestroy"),
|
|
|
|
|
getItemCanDestroy: ll.imports("GMLIB_API", "getItemCanDestroy"),
|
|
|
|
|
/** 设置物品冒险模式下可破坏的方块 @type {function(Item,Array.<string>):void} */
|
|
|
|
|
setItemCanDestroy: ll.import("GMLIB_API", "setItemCanDestroy"),
|
|
|
|
|
setItemCanDestroy: ll.imports("GMLIB_API", "setItemCanDestroy"),
|
|
|
|
|
/** 获取物品冒险模式下能放置在什么方块上 @type {function(Item):Array.<string>} */
|
|
|
|
|
getItemCanPlaceOn: ll.import("GMLIB_API", "getItemCanPlaceOn"),
|
|
|
|
|
getItemCanPlaceOn: ll.imports("GMLIB_API", "getItemCanPlaceOn"),
|
|
|
|
|
/** 设置物品冒险模式下能放置在什么方块上 @type {function(Item,Array.<string>):void} */
|
|
|
|
|
setItemCanPlaceOn: ll.import("GMLIB_API", "setItemCanPlaceOn"),
|
|
|
|
|
setItemCanPlaceOn: ll.imports("GMLIB_API", "setItemCanPlaceOn"),
|
|
|
|
|
/** 获取玩家饥饿值 @type {function(Player):number} */
|
|
|
|
|
getPlayerHungry: ll.import("GMLIB_API", "getPlayerHungry"),
|
|
|
|
|
getPlayerHungry: ll.imports("GMLIB_API", "getPlayerHungry"),
|
|
|
|
|
/** 获取玩家盔甲覆盖百分比 @type {function(Player):number} */
|
|
|
|
|
getPlayerArmorCoverPercentage: ll.import("GMLIB_API", "getPlayerArmorCoverPercentage"),
|
|
|
|
|
getPlayerArmorCoverPercentage: ll.imports("GMLIB_API", "getPlayerArmorCoverPercentage"),
|
|
|
|
|
/** 获取玩家盔甲值 @type {function(Player):number} */
|
|
|
|
|
getPlayerArmorValue: ll.import("GMLIB_API", "getPlayerArmorValue"),
|
|
|
|
|
getPlayerArmorValue: ll.imports("GMLIB_API", "getPlayerArmorValue"),
|
|
|
|
|
/** 获取实体主人的UniqueID @type {function(Entity):Entity} */
|
|
|
|
|
getEntityOwnerUniqueId: ll.import("GMLIB_API", "getEntityOwnerUniqueId"),
|
|
|
|
|
getEntityOwnerUniqueId: ll.imports("GMLIB_API", "getEntityOwnerUniqueId"),
|
|
|
|
|
/** 获取物品分类名称 @type {function(Item):string} */
|
|
|
|
|
getItemCategoryName: ll.import("GMLIB_API", "getItemCategoryName"),
|
|
|
|
|
getItemCategoryName: ll.imports("GMLIB_API", "getItemCategoryName"),
|
|
|
|
|
/** 获取物品的命名 @type {function(Item):string} */
|
|
|
|
|
getItemCustomName: ll.import("GMLIB_API", "getItemCustomName"),
|
|
|
|
|
getItemCustomName: ll.imports("GMLIB_API", "getItemCustomName"),
|
|
|
|
|
/** 获取物品BUFF效果名称 @type {function(Item):string} */
|
|
|
|
|
getItemEffecName: ll.import("GMLIB_API", "getItemEffecName"),
|
|
|
|
|
getItemEffecName: ll.imports("GMLIB_API", "getItemEffecName"),
|
|
|
|
|
/** 物品是否为食物 @type {function(Item):boolean} */
|
|
|
|
|
itemIsFood: ll.import("GMLIB_API", "itemIsFood"),
|
|
|
|
|
itemIsFood: ll.imports("GMLIB_API", "itemIsFood"),
|
|
|
|
|
/** 设置玩家UI栏物品 @type {function(Player,number,Item):void} */
|
|
|
|
|
setPlayerUIItem: ll.import("GMLIB_API", "setPlayerUIItem"),
|
|
|
|
|
setPlayerUIItem: ll.imports("GMLIB_API", "setPlayerUIItem"),
|
|
|
|
|
/** 获取玩家UI栏物品 @type {function(Player,number):Item} */
|
|
|
|
|
getPlayerUIItem: ll.import("GMLIB_API", "getPlayerUIItem"),
|
|
|
|
|
getPlayerUIItem: ll.imports("GMLIB_API", "getPlayerUIItem"),
|
|
|
|
|
/** 更新玩家容器物品 @type {function(Player,number,number,Item):void} */
|
|
|
|
|
sendInventorySlotPacket: ll.import("GMLIB_API", "sendInventorySlotPacket"),
|
|
|
|
|
sendInventorySlotPacket: ll.imports("GMLIB_API", "sendInventorySlotPacket"),
|
|
|
|
|
/** 获取容器类型 @type {function(Container):string} */
|
|
|
|
|
getContainerType: ll.import("GMLIB_API", "getContainerType"),
|
|
|
|
|
getContainerType: ll.imports("GMLIB_API", "getContainerType"),
|
|
|
|
|
/** 玩家是否拥有NBT @type {function(string):boolean} */
|
|
|
|
|
hasPlayerNbt: ll.import("GMLIB_API", "hasPlayerNbt"),
|
|
|
|
|
hasPlayerNbt: ll.imports("GMLIB_API", "hasPlayerNbt"),
|
|
|
|
|
/** 获取物品最大堆叠数量 @type {function(Item):number} */
|
|
|
|
|
getItemMaxCount: ll.import("GMLIB_API", "getItemMaxCount"),
|
|
|
|
|
getItemMaxCount: ll.imports("GMLIB_API", "getItemMaxCount"),
|
|
|
|
|
/** 实体包含在某族里 @type {function(Entity,string):boolean} */
|
|
|
|
|
entityHasFamily: ll.import("GMLIB_API", "entityHasFamily"),
|
|
|
|
|
entityHasFamily: ll.imports("GMLIB_API", "entityHasFamily"),
|
|
|
|
|
/** 获取玩家破坏方块所需时间 @type {function(Player,Block):number} */
|
|
|
|
|
getPlayerDestroyBlockProgress: ll.import("GMLIB_API", "getPlayerDestroyBlockProgress"),
|
|
|
|
|
getPlayerDestroyBlockProgress: ll.imports("GMLIB_API", "getPlayerDestroyBlockProgress"),
|
|
|
|
|
/** 获取实体的buff是否显示 @type {function(Player,number):boolean} */
|
|
|
|
|
getEntityEffectVisible: ll.import("GMLIB_API", "getEntityEffectVisible"),
|
|
|
|
|
getEntityEffectVisible: ll.imports("GMLIB_API", "getEntityEffectVisible"),
|
|
|
|
|
/** 获取实体的buff持续时间 @type {function(Player,number):number} */
|
|
|
|
|
getEntityEffectDuration: ll.import("GMLIB_API", "getEntityEffectDuration"),
|
|
|
|
|
getEntityEffectDuration: ll.imports("GMLIB_API", "getEntityEffectDuration"),
|
|
|
|
|
/** 获取实体的buff简单模式下的持续时间 @type {function(Player,number):number} */
|
|
|
|
|
getEntityEffectDurationEasy: ll.import("GMLIB_API", "getEntityEffectDuration"),
|
|
|
|
|
getEntityEffectDurationEasy: ll.imports("GMLIB_API", "getEntityEffectDuration"),
|
|
|
|
|
/** 获取实体的buff困难模式下的持续时间 @type {function(Player,number):number} */
|
|
|
|
|
getEntityEffectDurationHard: ll.import("GMLIB_API", "getEntityEffectDurationHard"),
|
|
|
|
|
getEntityEffectDurationHard: ll.imports("GMLIB_API", "getEntityEffectDurationHard"),
|
|
|
|
|
/** 获取实体的buff普通模式下的持续时间 @type {function(Player,number):number} */
|
|
|
|
|
getEntityEffectDurationNormal: ll.import("GMLIB_API", "getEntityEffectDurationNormal"),
|
|
|
|
|
getEntityEffectDurationNormal: ll.imports("GMLIB_API", "getEntityEffectDurationNormal"),
|
|
|
|
|
/** 获取实体的buff效果等级 @type {function(Entity,number):number} */
|
|
|
|
|
getEntityEffectAmplifier: ll.import("GMLIB_API", "getEntityEffectAmplifier"),
|
|
|
|
|
getEntityEffectAmplifier: ll.imports("GMLIB_API", "getEntityEffectAmplifier"),
|
|
|
|
|
/** 获取实体的buff是否为信标给予 @type {function(Entity,number):boolean} */
|
|
|
|
|
getEntityEffectAmbient: ll.import("GMLIB_API", "getEntityEffectAmbient"),
|
|
|
|
|
getEntityEffectAmbient: ll.imports("GMLIB_API", "getEntityEffectAmbient"),
|
|
|
|
|
/** 实体是否拥有buff效果 @type {function(Entity,number):boolean} */
|
|
|
|
|
entityHasEffect: ll.import("GMLIB_API", "entityHasEffect"),
|
|
|
|
|
entityHasEffect: ll.imports("GMLIB_API", "entityHasEffect"),
|
|
|
|
|
/** 获取实体所有buff效果 @type {function(Entity):Array.<number>} */
|
|
|
|
|
getEntityAllEffects: ll.import("GMLIB_API", "getEntityAllEffects"),
|
|
|
|
|
getEntityAllEffects: ll.imports("GMLIB_API", "getEntityAllEffects"),
|
|
|
|
|
/** 获取游戏难度 @type {function():number} */
|
|
|
|
|
getGameDifficulty: ll.import("GMLIB_API", "getGameDifficulty"),
|
|
|
|
|
getGameDifficulty: ll.imports("GMLIB_API", "getGameDifficulty"),
|
|
|
|
|
/** 设置游戏难度 @type {function(difficulty):void} */
|
|
|
|
|
setGameDifficulty: ll.import("GMLIB_API", "setGameDifficulty"),
|
|
|
|
|
setGameDifficulty: ll.imports("GMLIB_API", "setGameDifficulty"),
|
|
|
|
|
/** 获取默认游戏模式 @type {function():number} */
|
|
|
|
|
getDefaultGameMode: ll.import("GMLIB_API", "getDefaultGameMode"),
|
|
|
|
|
getDefaultGameMode: ll.imports("GMLIB_API", "getDefaultGameMode"),
|
|
|
|
|
/** 设置默认游戏模式 @type {function(mode):void} */
|
|
|
|
|
setDefaultGameMode: ll.import("GMLIB_API", "setDefaultGameMode"),
|
|
|
|
|
setDefaultGameMode: ll.imports("GMLIB_API", "setDefaultGameMode"),
|
|
|
|
|
/** 实体是否为某类型 @type {function(Entity, number):boolean} */
|
|
|
|
|
entityIsType: ll.import("GMLIB_API", "entityIsType"),
|
|
|
|
|
entityIsType: ll.imports("GMLIB_API", "entityIsType"),
|
|
|
|
|
/** 实体是包含某类型 @type {function(Entity, number):boolean} */
|
|
|
|
|
entityHasType: ll.import("GMLIB_API", "entityHasType"),
|
|
|
|
|
entityHasType: ll.imports("GMLIB_API", "entityHasType"),
|
|
|
|
|
/** 获取实体类型ID @type {function(Entity):number} */
|
|
|
|
|
getEntityTypeId: ll.import("GMLIB_API", "getEntityTypeId"),
|
|
|
|
|
getEntityTypeId: ll.imports("GMLIB_API", "getEntityTypeId"),
|
|
|
|
|
/** 获取实体类型ID @type {function(Entity):number} */
|
|
|
|
|
getPlayerProtocolVersion: ll.imports("GMLIB_API", "getPlayerProtocolVersion"),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** LRCA的二进制流数据包导出接口 */
|
|
|
|
|
const GMLIB_BinaryStream_API = {
|
|
|
|
|
/** 创建二进制流数据包 @type {function():number} */
|
|
|
|
|
create: ll.import("GMLIB_BinaryStream_API", "create"),
|
|
|
|
|
create: ll.imports("GMLIB_BinaryStream_API", "create"),
|
|
|
|
|
/** 拷贝二进制流数据包 @type {function(number):number} */
|
|
|
|
|
copy: ll.import("GMLIB_BinaryStream_API", "copy"),
|
|
|
|
|
copy: ll.imports("GMLIB_BinaryStream_API", "copy"),
|
|
|
|
|
/** 发送二进制流数据包 @type {function(number,player):void} */
|
|
|
|
|
sendTo: ll.import("GMLIB_BinaryStream_API", "sendTo"),
|
|
|
|
|
sendTo: ll.imports("GMLIB_BinaryStream_API", "sendTo"),
|
|
|
|
|
/** 销毁二进制流数据包 @type {function(number):void} */
|
|
|
|
|
destroy: ll.import("GMLIB_BinaryStream_API", "destroy"),
|
|
|
|
|
destroy: ll.imports("GMLIB_BinaryStream_API", "destroy"),
|
|
|
|
|
/** 重置二进制流数据包 @type {function(number):void} */
|
|
|
|
|
reset: ll.import("GMLIB_BinaryStream_API", "reset"),
|
|
|
|
|
reset: ll.imports("GMLIB_BinaryStream_API", "reset"),
|
|
|
|
|
/** 写入二进制流数据包头部 @type {function(number, number):void} */
|
|
|
|
|
writePacketHeader: ll.import("GMLIB_BinaryStream_API", "writePacketHeader"),
|
|
|
|
|
writePacketHeader: ll.imports("GMLIB_BinaryStream_API", "writePacketHeader"),
|
|
|
|
|
/** 写入UUID @type {function(number, string):void} */
|
|
|
|
|
writeUuid: ll.import("GMLIB_BinaryStream_API", "writeUuid"),
|
|
|
|
|
writeUuid: ll.imports("GMLIB_BinaryStream_API", "writeUuid"),
|
|
|
|
|
/** 写入物品 @type {function(number, Item):void} */
|
|
|
|
|
writeItem: ll.import("GMLIB_BinaryStream_API", "writeItem"),
|
|
|
|
|
writeItem: ll.imports("GMLIB_BinaryStream_API", "writeItem"),
|
|
|
|
|
/** 写入NBT @type {function(NbtCompound, Item):void} */
|
|
|
|
|
writeCompoundTag: ll.import("GMLIB_BinaryStream_API", "writeCompoundTag"),
|
|
|
|
|
writeCompoundTag: ll.imports("GMLIB_BinaryStream_API", "writeCompoundTag"),
|
|
|
|
|
/** 写入字符串 @type {function(number, string):void} */
|
|
|
|
|
writeString: ll.import("GMLIB_BinaryStream_API", "writeString"),
|
|
|
|
|
writeString: ll.imports("GMLIB_BinaryStream_API", "writeString"),
|
|
|
|
|
/** 写入布尔值 @type {function(number, boolean):void} */
|
|
|
|
|
writeBool: ll.import("GMLIB_BinaryStream_API", "writeBool"),
|
|
|
|
|
writeBool: ll.imports("GMLIB_BinaryStream_API", "writeBool"),
|
|
|
|
|
/** 写入字节 @type {function(number, number):void} */
|
|
|
|
|
writeByte: ll.import("GMLIB_BinaryStream_API", "writeByte"),
|
|
|
|
|
writeByte: ll.imports("GMLIB_BinaryStream_API", "writeByte"),
|
|
|
|
|
/** 写入双精度浮点数 @type {function(number, number):void} */
|
|
|
|
|
writeDouble: ll.import("GMLIB_BinaryStream_API", "writeDouble"),
|
|
|
|
|
writeDouble: ll.imports("GMLIB_BinaryStream_API", "writeDouble"),
|
|
|
|
|
/** 写入浮点数 @type {function(number, number):void} */
|
|
|
|
|
writeFloat: ll.import("GMLIB_BinaryStream_API", "writeFloat"),
|
|
|
|
|
writeFloat: ll.imports("GMLIB_BinaryStream_API", "writeFloat"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeSignedBigEndianInt: ll.import("GMLIB_BinaryStream_API", "writeSignedBigEndianInt"),
|
|
|
|
|
writeSignedBigEndianInt: ll.imports("GMLIB_BinaryStream_API", "writeSignedBigEndianInt"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeSignedInt: ll.import("GMLIB_BinaryStream_API", "writeSignedInt"),
|
|
|
|
|
writeSignedInt: ll.imports("GMLIB_BinaryStream_API", "writeSignedInt"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeSignedInt64: ll.import("GMLIB_BinaryStream_API", "writeSignedInt64"),
|
|
|
|
|
writeSignedInt64: ll.imports("GMLIB_BinaryStream_API", "writeSignedInt64"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeSignedShort: ll.import("GMLIB_BinaryStream_API", "writeSignedShort"),
|
|
|
|
|
writeSignedShort: ll.imports("GMLIB_BinaryStream_API", "writeSignedShort"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedChar: ll.import("GMLIB_BinaryStream_API", "writeUnsignedChar"),
|
|
|
|
|
writeUnsignedChar: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedChar"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedInt: ll.import("GMLIB_BinaryStream_API", "writeUnsignedInt"),
|
|
|
|
|
writeUnsignedInt: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedInt"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedInt64: ll.import("GMLIB_BinaryStream_API", "writeUnsignedInt64"),
|
|
|
|
|
writeUnsignedInt64: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedInt64"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedShort: ll.import("GMLIB_BinaryStream_API", "writeUnsignedShort"),
|
|
|
|
|
writeUnsignedShort: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedShort"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedVarInt: ll.import("GMLIB_BinaryStream_API", "writeUnsignedVarInt"),
|
|
|
|
|
writeUnsignedVarInt: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedVarInt"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeUnsignedVarInt64: ll.import("GMLIB_BinaryStream_API", "writeUnsignedVarInt64"),
|
|
|
|
|
writeUnsignedVarInt64: ll.imports("GMLIB_BinaryStream_API", "writeUnsignedVarInt64"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeVarInt: ll.import("GMLIB_BinaryStream_API", "writeVarInt"),
|
|
|
|
|
writeVarInt: ll.imports("GMLIB_BinaryStream_API", "writeVarInt"),
|
|
|
|
|
/** @type {function(number, number):void} */
|
|
|
|
|
writeVarInt64: ll.import("GMLIB_BinaryStream_API", "writeVarInt64"),
|
|
|
|
|
writeVarInt64: ll.imports("GMLIB_BinaryStream_API", "writeVarInt64"),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 静态悬浮字类列表 @type {Map<number,StaticFloatingText>} */
|
|
|
|
@@ -3034,6 +3036,15 @@ LLSE_Player.prototype.sendInventorySlotPacket =
|
|
|
|
|
GMLIB_API.sendInventorySlotPacket(this, containerId, slot, item);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
LLSE_Player.prototype.getNetworkProtocolVersion =
|
|
|
|
|
/**
|
|
|
|
|
* 获取客户端版本协议
|
|
|
|
|
* @returns {number}
|
|
|
|
|
*/
|
|
|
|
|
function (containerId, slot, item) {
|
|
|
|
|
GMLIB_API.getPlayerProtocolVersion(this);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
LLSE_Container.prototype.getContainerType =
|
|
|
|
|
/**
|
|
|
|
|
* 获取容器类型
|
|
|
|
|