feat: adapt to GMLIB v1.0.2

This commit is contained in:
KobeBryant114514
2025-05-07 21:22:34 +08:00
Unverified
parent 8aefbf335b
commit 9a31f363f8
5 changed files with 53 additions and 15 deletions
+11
View File
@@ -376,6 +376,8 @@ const GMLIB_API = {
entityHasType: ll.import("GMLIB_API", "entityHasType"),
/** 获取实体类型ID @type {function(Entity):number} */
getEntityTypeId: ll.import("GMLIB_API", "getEntityTypeId"),
/** 获取实体类型ID @type {function(Entity):number} */
getPlayerProtocolVersion: ll.import("GMLIB_API", "getPlayerProtocolVersion"),
};
/** LRCA的二进制流数据包导出接口 */
@@ -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 =
/**
* 获取容器类型