添加getItemMaxCount接口
This commit is contained in:
@@ -870,7 +870,7 @@ void Export_Compatibility_API() {
|
||||
RemoteCall::exportAs(
|
||||
"GMLIB_API",
|
||||
"sendInventorySlotPacket",
|
||||
[](Player* player, int containerId, int slot, ItemStack* item) -> void {
|
||||
[](Player* player, int containerId, int slot, ItemStack const* item) -> void {
|
||||
InventorySlotPacket((ContainerID)containerId, slot, *item).sendTo(*player);
|
||||
}
|
||||
);
|
||||
@@ -881,4 +881,7 @@ void Export_Compatibility_API() {
|
||||
auto uid = mce::UUID::fromString(uuid);
|
||||
return GMLIB_Player::getPlayerNbt(uid) ? true : false;
|
||||
});
|
||||
RemoteCall::exportAs("GMLIB_API", "getItemMaxCount", [](ItemStack const* item) -> int {
|
||||
return item->getMaxStackSize();
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user