添加/修改
- 添加entityHasFamily,getPlayerDestroyBlockProgress接口 - 修改6事件名
This commit is contained in:
+25
-1
@@ -339,7 +339,11 @@ const GMLIB_API = {
|
||||
/** 玩家是否拥有NBT @type {function(string):boolean} */
|
||||
hasPlayerNbt: ll.import("GMLIB_API", "hasPlayerNbt"),
|
||||
/** 获取物品最大堆叠数量 @type {function(Item):number} */
|
||||
getItemMaxCount: ll.import("GMLIB_API", "getItemMaxCount")
|
||||
getItemMaxCount: ll.import("GMLIB_API", "getItemMaxCount"),
|
||||
/** 实体包含在某族里 @type {function(Entity,string):boolean} */
|
||||
entityHasFamily: ll.import("GMLIB_API", "entityHasFamily"),
|
||||
/** 获取玩家破坏方块所需时间 @type {function(Player,Block):number} */
|
||||
getPlayerDestroyBlockProgress: ll.import("GMLIB_API", "getPlayerDestroyBlockProgress")
|
||||
}
|
||||
|
||||
/** 静态悬浮字类列表 @type {Map<number,StaticFloatingText>} */
|
||||
@@ -2504,6 +2508,26 @@ LLSE_Item.prototype.getMaxCount =
|
||||
return GMLIB_API.getItemMaxCount(this);
|
||||
}
|
||||
|
||||
LLSE_Entity.prototype.hasFamily =
|
||||
/**
|
||||
* 实体是否拥包含在某族里
|
||||
* @param {string} family 实体族
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function (family) {
|
||||
return GMLIB_API.entityHasFamily(this, family);
|
||||
}
|
||||
|
||||
LLSE_Player.prototype.getDestroyProgress =
|
||||
/**
|
||||
* 获取玩家破坏方块所需时间
|
||||
* @param {Block} block
|
||||
* @returns {number}
|
||||
*/
|
||||
function (block) {
|
||||
return GMLIB_API.getPlayerDestroyBlockProgress(this, block);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
StaticFloatingText,
|
||||
DynamicFloatingText,
|
||||
|
||||
Reference in New Issue
Block a user