新增/修改

新增
  - getContainerType
修改
  - HandleRequestActionEvent
This commit is contained in:
子沐呀
2024-07-23 05:59:08 +08:00
Unverified
parent 7a0e3d8019
commit f427f2f5e1
5 changed files with 32 additions and 9 deletions
+8
View File
@@ -1,6 +1,7 @@
#include "Global.h"
#include "magic_enum.hpp"
#include "mc/network/packet/InventorySlotPacket.h"
#include "mc/world/Container.h"
#include <map>
#include <regex>
#include <vector>
@@ -878,4 +879,11 @@ void Export_Compatibility_API() {
InventorySlotPacket((ContainerID)containerId, slot, *item).sendTo(*player);
}
);
RemoteCall::exportAs(
"GMLIB_API",
"getContainerType",
[](Container* container) -> std::string {
return magic_enum::enum_name(container->getContainerType()).data();
}
);
}