1新增 2修复

- 新增getEntityOwnerUniqueId接口
- 修复注册PAPI变量无法使用匿名函数
- 修复注册相同PAPI名字无法重载
This commit is contained in:
子沐呀
2024-07-18 21:39:49 +08:00
Unverified
parent a47f8c729d
commit 52897a25a7
5 changed files with 47 additions and 12 deletions
+5
View File
@@ -1,5 +1,9 @@
#include "Global.h"
#include "magic_enum.hpp"
#include "mc/entity/systems/common/ServerCameraStateSystem.h"
#include "mc/enums/AbilitiesIndex.h"
#include "mc/scripting/modules/minecraft/ScriptCameraSetLocationOptions.h"
#include "mc/world/actor/common/CameraInstruction.h"
#include <regex>
#include <vector>
@@ -843,4 +847,5 @@ void Export_Compatibility_API() {
RemoteCall::exportAs("GMLIB_API", "getPlayerArmorValue", [](Player* player) -> int {
return player->getArmorValue();
});
RemoteCall::exportAs("GMLIB_API", "getEntityOwnerUniqueId", [](Actor* entity) -> int64 { return entity->getOwnerId().id; });
}