Compare commits
3 Commits
+48
-45
@@ -1,51 +1,54 @@
|
|||||||
/**
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
const getPluginName = () => {
|
const getPluginName = () => {
|
||||||
// quickjs
|
if (getPluginName.PluginNameCache) return getPluginName.PluginNameCache;
|
||||||
try {
|
|
||||||
throw new Error("getPluginName");
|
|
||||||
} catch (error) {
|
|
||||||
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
|
||||||
if (line.includes("<anonymous>")) {
|
|
||||||
return line.slice(
|
|
||||||
line.indexOf("(") + 1,
|
|
||||||
line.indexOf("\\")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (line.includes("<eval>")) {
|
|
||||||
return line.slice(
|
|
||||||
line.indexOf("/", line.indexOf("/") + 1) + 1,
|
|
||||||
line.indexOf("\\")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// nodejs
|
return getPluginName.PluginNameCache = (() => {
|
||||||
try {
|
if (ll.getCurrentPluginInfo) return ll.getCurrentPluginInfo().name;
|
||||||
const path = require('path');
|
|
||||||
const selfFileName = path.basename(__filename);
|
const error = new Error("getPluginName");
|
||||||
const pluginDirectory = Object.entries(
|
switch (ll.scriptEngineVersion) {
|
||||||
require('module')._pathCache
|
case "QuickJS": {
|
||||||
).find(
|
if (!error.stack) break;
|
||||||
([key, _]) =>
|
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
||||||
key.includes(selfFileName)
|
if (line.includes("<anonymous>")) {
|
||||||
)[0].split("\u0000")[1];
|
return line.slice(
|
||||||
const directories = pluginDirectory.split("\\");
|
line.indexOf("(") + 1,
|
||||||
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
line.indexOf("\\")
|
||||||
if (pluginName) return pluginName;
|
);
|
||||||
} catch { }
|
}
|
||||||
try {
|
if (line.includes("<eval>")) {
|
||||||
throw new Error("getPluginName");
|
return line.slice(
|
||||||
} catch (error) {
|
line.indexOf("/", line.indexOf("/") + 1) + 1,
|
||||||
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
line.indexOf("\\")
|
||||||
if (line.includes(".js") && /:\d+:\d+$/.test(line)) {
|
);
|
||||||
const directories = line.split("\\");
|
}
|
||||||
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
break;
|
||||||
if (pluginName) return pluginName;
|
}
|
||||||
|
case "V8 12.4.254.21-node.21": {
|
||||||
|
try {
|
||||||
|
const selfFileName = require('path').basename(__filename);
|
||||||
|
const pluginDirectory = Object.entries(
|
||||||
|
require('module')._pathCache
|
||||||
|
).find(
|
||||||
|
([key, _]) => key.includes(selfFileName)
|
||||||
|
)[0].split("\u0000")[1];
|
||||||
|
const directories = pluginDirectory.split("\\");
|
||||||
|
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
||||||
|
if (pluginName) return pluginName;
|
||||||
|
} catch { }
|
||||||
|
|
||||||
|
if (!error.stack) break;
|
||||||
|
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
||||||
|
if (line.includes(".js") && /:\d+:\d+$/.test(line)) {
|
||||||
|
const directories = line.split("\\");
|
||||||
|
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
||||||
|
if (pluginName) return pluginName;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
return "Unknown";
|
||||||
return "Unknown";
|
})();
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
+48
-42
@@ -1,50 +1,56 @@
|
|||||||
/// <reference path='d:/dts/dts/helperlib/src/index.d.ts'/>
|
/// <reference path='d:/dts/dts/helperlib/src/index.d.ts'/>
|
||||||
|
|
||||||
const getPluginName = () => {
|
const getPluginName = () => {
|
||||||
// quickjs
|
if (getPluginName.PluginNameCache) return getPluginName.PluginNameCache;
|
||||||
try {
|
|
||||||
throw new Error("getPluginName");
|
|
||||||
} catch (error) {
|
|
||||||
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
|
||||||
if (line.includes("<anonymous>")) {
|
|
||||||
return line.slice(
|
|
||||||
line.indexOf("(") + 1,
|
|
||||||
line.indexOf("\\")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (line.includes("<eval>")) {
|
|
||||||
return line.slice(
|
|
||||||
line.indexOf("/", line.indexOf("/") + 1) + 1,
|
|
||||||
line.indexOf("\\")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// nodejs
|
return getPluginName.PluginNameCache = (() => {
|
||||||
try {
|
if (ll.getCurrentPluginInfo) return ll.getCurrentPluginInfo().name;
|
||||||
const path = require('path');
|
|
||||||
const selfFileName = path.basename(__filename);
|
const error = new Error("getPluginName");
|
||||||
const pluginDirectory = Object.entries(
|
switch (ll.scriptEngineVersion) {
|
||||||
require('module')._pathCache
|
case "QuickJS": {
|
||||||
).find(
|
if (!error.stack) break;
|
||||||
([key, _]) =>
|
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
||||||
key.includes(selfFileName)
|
if (line.includes("<anonymous>")) {
|
||||||
)[0].split("\u0000")[1];
|
return line.slice(
|
||||||
const directories = pluginDirectory.split("\\");
|
line.indexOf("(") + 1,
|
||||||
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
line.indexOf("\\")
|
||||||
if (pluginName) return pluginName;
|
);
|
||||||
} catch { }
|
}
|
||||||
try {
|
if (line.includes("<eval>")) {
|
||||||
throw new Error("getPluginName");
|
return line.slice(
|
||||||
} catch (error) {
|
line.indexOf("/", line.indexOf("/") + 1) + 1,
|
||||||
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
line.indexOf("\\")
|
||||||
if (line.includes(".js") && /:\d+:\d+$/.test(line)) {
|
);
|
||||||
const directories = line.split("\\");
|
}
|
||||||
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
break;
|
||||||
if (pluginName) return pluginName;
|
}
|
||||||
|
case "V8 12.4.254.21-node.21": {
|
||||||
|
try {
|
||||||
|
const selfFileName = require('path').basename(__filename);
|
||||||
|
const pluginDirectory = Object.entries(
|
||||||
|
require('module')._pathCache
|
||||||
|
).find(
|
||||||
|
([key, _]) => key.includes(selfFileName)
|
||||||
|
)[0].split("\u0000")[1];
|
||||||
|
const directories = pluginDirectory.split("\\");
|
||||||
|
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
||||||
|
if (pluginName) return pluginName;
|
||||||
|
} catch { }
|
||||||
|
|
||||||
|
if (!error.stack) break;
|
||||||
|
const /** @type {string} */ line = error.stack.trim().split("\n").pop().trim();
|
||||||
|
if (line.includes(".js") && /:\d+:\d+$/.test(line)) {
|
||||||
|
const directories = line.split("\\");
|
||||||
|
const pluginName = directories[directories.findIndex(value => value === "plugins") + 1].trim();
|
||||||
|
if (pluginName) return pluginName;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
return "Unknown";
|
||||||
return "Unknown";
|
})();
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "iListenAttentively"
|
"name": "iListenAttentively"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ModAPI"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+49
-27
@@ -11,7 +11,7 @@ void Export_Compatibility_API() {
|
|||||||
return CustomRecipeRegistry::getInstance().unregisterRecipe(id, true);
|
return CustomRecipeRegistry::getInstance().unregisterRecipe(id, true);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "setCustomPackPath", [](std::string const& path) -> void {
|
RemoteCall::exportAs("GMLIB_API", "setCustomPackPath", [](std::string const& path) -> void {
|
||||||
AddonsLoader::addCustomPackPath(path);
|
AddonsLoader::getInstance().addCustomPackPath(path);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getServerMspt", []() -> double {
|
RemoteCall::exportAs("GMLIB_API", "getServerMspt", []() -> double {
|
||||||
return GMLevel::getInstance().transform(
|
return GMLevel::getInstance().transform(
|
||||||
@@ -19,14 +19,10 @@ void Export_Compatibility_API() {
|
|||||||
).value_or(0.0);
|
).value_or(0.0);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getServerCurrentTps", []() -> float {
|
RemoteCall::exportAs("GMLIB_API", "getServerCurrentTps", []() -> float {
|
||||||
return GMLevel::getInstance().transform(
|
return TpsStatus::getInstance().getLevelCurrentTps();
|
||||||
[](GMLevel& level) -> float { return level.getServerCurrentTps(); }
|
|
||||||
).value_or(0.0);
|
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getServerAverageTps", []() -> double {
|
RemoteCall::exportAs("GMLIB_API", "getServerAverageTps", []() -> double {
|
||||||
return GMLevel::getInstance().transform(
|
return TpsStatus::getInstance().getLevelAverageTps();
|
||||||
[](GMLevel& level) -> double { return level.getServerAverageTps(); }
|
|
||||||
).value_or(0.0);
|
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getAllPlayerUuids", []() -> std::vector<std::string> {
|
RemoteCall::exportAs("GMLIB_API", "getAllPlayerUuids", []() -> std::vector<std::string> {
|
||||||
std::vector<std::string> result;
|
std::vector<std::string> result;
|
||||||
@@ -445,7 +441,30 @@ void Export_Compatibility_API() {
|
|||||||
return ll::service::getLevel()->fetchEntity(parseScriptUniqueID(uniqueId), false);
|
return ll::service::getLevel()->fetchEntity(parseScriptUniqueID(uniqueId), false);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getWorldSpawn", []() -> std::pair<BlockPos, int> {
|
RemoteCall::exportAs("GMLIB_API", "getWorldSpawn", []() -> std::pair<BlockPos, int> {
|
||||||
return {GMLevel::getInstance()->getLevelData().getSpawnPos(), 0};
|
constexpr static HashedString SPAWN_POS{"spawnPos"};
|
||||||
|
using mUnkfc867e = std::variant<
|
||||||
|
int,
|
||||||
|
bool,
|
||||||
|
float,
|
||||||
|
std::string,
|
||||||
|
GeneratorType,
|
||||||
|
GameType,
|
||||||
|
BlockPos,
|
||||||
|
LevelSeed64,
|
||||||
|
LevelDataValue::Tag,
|
||||||
|
DaylightCycle>;
|
||||||
|
auto& levelData = GMLevel::getInstance()->getLevelData();
|
||||||
|
if (auto it = levelData.mValues->find(SPAWN_POS); it != levelData.mValues->end()) {
|
||||||
|
if (auto value = std::get_if<BlockPos>(&it->second.mUnkfc867e.as<mUnkfc867e>()); value) {
|
||||||
|
return {*value, 0};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (auto it = levelData.mOverrides->find(SPAWN_POS); it != levelData.mOverrides->end()) {
|
||||||
|
if (auto value = std::get_if<BlockPos>(&it->second.mUnkfc867e.as<mUnkfc867e>()); value) {
|
||||||
|
return {*value, 0};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {BlockPos::ZERO(), 1};
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "setWorldSpawn", [](std::pair<BlockPos, int> pos) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "setWorldSpawn", [](std::pair<BlockPos, int> pos) -> bool {
|
||||||
if (pos.second != 0) return false;
|
if (pos.second != 0) return false;
|
||||||
@@ -534,7 +553,7 @@ void Export_Compatibility_API() {
|
|||||||
.value_or(0);
|
.value_or(0);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getBlockTranslateKey", [](Block const* block) -> std::string {
|
RemoteCall::exportAs("GMLIB_API", "getBlockTranslateKey", [](Block const* block) -> std::string {
|
||||||
return block->getLegacyBlock().mDescriptionId.get() + ".name";
|
return block->mBlockType->mDescriptionId.get() + ".name";
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getItemTranslateKey", [](ItemStack* item) -> std::string {
|
RemoteCall::exportAs("GMLIB_API", "getItemTranslateKey", [](ItemStack* item) -> std::string {
|
||||||
return item->getDescriptionId();
|
return item->getDescriptionId();
|
||||||
@@ -573,7 +592,7 @@ void Export_Compatibility_API() {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
RemoteCall::exportAs("GMLIB_API", "itemCanDestroyBlock", [](ItemStack const* item, Block const* block) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "itemCanDestroyBlock", [](ItemStack const* item, Block const* block) -> bool {
|
||||||
return std::ranges::any_of(item->mCanDestroy, [block](BlockLegacy const* blockLegacy) {
|
return std::ranges::any_of(item->mCanDestroy, [block](BlockType const* blockLegacy) {
|
||||||
return blockLegacy && block->getTypeName() == blockLegacy->getTypeName();
|
return blockLegacy && block->getTypeName() == blockLegacy->getTypeName();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -590,13 +609,13 @@ void Export_Compatibility_API() {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "blockCanDropWithAnyTool", [](Block const* block) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "blockCanDropWithAnyTool", [](Block const* block) -> bool {
|
||||||
return !block->getLegacyBlock().mRequiresCorrectToolForDrops;
|
return !block->mBlockType->mRequiresCorrectToolForDrops;
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs(
|
RemoteCall::exportAs(
|
||||||
"GMLIB_API",
|
"GMLIB_API",
|
||||||
"blockPlayerWillDestroy",
|
"blockPlayerWillDestroy",
|
||||||
[](Block const* block, Player* player, std::pair<BlockPos, int> pos) -> bool {
|
[](Block const* block, Player* player, std::pair<BlockPos, int> pos) -> bool {
|
||||||
return block->getLegacyBlock().playerWillDestroy(*player, pos.first, *block);
|
return block->mBlockType->playerWillDestroy(*player, pos.first, *block);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
RemoteCall::exportAs("GMLIB_API", "playerAttack", [](Player* player, Actor* entity) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "playerAttack", [](Player* player, Actor* entity) -> bool {
|
||||||
@@ -630,23 +649,23 @@ void Export_Compatibility_API() {
|
|||||||
switch (gameRule.mType) {
|
switch (gameRule.mType) {
|
||||||
case GameRule::Type::Bool:
|
case GameRule::Type::Bool:
|
||||||
result.push_back({
|
result.push_back({
|
||||||
{"Name", gameRule.mName },
|
{"Name", gameRule.mName },
|
||||||
{"Type", "Bool" },
|
{"Type", "Bool" },
|
||||||
{"Value", std::to_string(gameRule.mValue->boolVal)}
|
{"Value", std::to_string(std::get<bool>(*gameRule.mValue))}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case GameRule::Type::Float:
|
case GameRule::Type::Float:
|
||||||
result.push_back({
|
result.push_back({
|
||||||
{"Name", gameRule.mName },
|
{"Name", gameRule.mName },
|
||||||
{"Type", "Float" },
|
{"Type", "Float" },
|
||||||
{"Value", std::to_string(gameRule.mValue->floatVal)}
|
{"Value", std::to_string(std::get<float>(*gameRule.mValue))}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case GameRule::Type::Int:
|
case GameRule::Type::Int:
|
||||||
result.push_back({
|
result.push_back({
|
||||||
{"Name", gameRule.mName },
|
{"Name", gameRule.mName },
|
||||||
{"Type", "Int" },
|
{"Type", "Int" },
|
||||||
{"Value", std::to_string(gameRule.mValue->intVal)}
|
{"Value", std::to_string(std::get<int>(*gameRule.mValue))}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case GameRule::Type::Invalid:
|
case GameRule::Type::Invalid:
|
||||||
@@ -674,7 +693,7 @@ void Export_Compatibility_API() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
RemoteCall::exportAs("GMLIB_API", "removeEnchants", [](ItemStack* item) -> void { item->removeEnchants(); });
|
RemoteCall::exportAs("GMLIB_API", "removeEnchants", [](ItemStack* item) -> void { (void)item->removeEnchants(); });
|
||||||
RemoteCall::exportAs("GMLIB_API", "hasEnchant", [](ItemStack* item, std::string const& typeName) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "hasEnchant", [](ItemStack* item, std::string const& typeName) -> bool {
|
||||||
return EnchantUtils::hasEnchant(Enchant::mEnchantNameToType()[HashedString(typeName)], *item);
|
return EnchantUtils::hasEnchant(Enchant::mEnchantNameToType()[HashedString(typeName)], *item);
|
||||||
});
|
});
|
||||||
@@ -745,9 +764,9 @@ void Export_Compatibility_API() {
|
|||||||
"GMLIB_API",
|
"GMLIB_API",
|
||||||
"setItemCanDestroy",
|
"setItemCanDestroy",
|
||||||
[](ItemStack const* item, std::vector<std::string> blocks) -> void {
|
[](ItemStack const* item, std::vector<std::string> blocks) -> void {
|
||||||
std::vector<const BlockLegacy*> data;
|
std::vector<const BlockType*> data;
|
||||||
for (auto& name : blocks) {
|
for (auto& name : blocks) {
|
||||||
if (auto block = BlockLegacy::tryGetFromRegistry(name)) {
|
if (auto block = BlockType::tryGetFromRegistry(name)) {
|
||||||
data.push_back(block.as_ptr());
|
data.push_back(block.as_ptr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -765,9 +784,9 @@ void Export_Compatibility_API() {
|
|||||||
"GMLIB_API",
|
"GMLIB_API",
|
||||||
"setItemCanPlaceOn",
|
"setItemCanPlaceOn",
|
||||||
[](ItemStack const* item, std::vector<std::string> blocks) -> void {
|
[](ItemStack const* item, std::vector<std::string> blocks) -> void {
|
||||||
std::vector<const BlockLegacy*> data;
|
std::vector<const BlockType*> data;
|
||||||
for (auto& name : blocks) {
|
for (auto& name : blocks) {
|
||||||
if (auto block = BlockLegacy::tryGetFromRegistry(name)) {
|
if (auto block = BlockType::tryGetFromRegistry(name)) {
|
||||||
data.push_back(block.as_ptr());
|
data.push_back(block.as_ptr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -972,7 +991,10 @@ void Export_Compatibility_API() {
|
|||||||
return entity->isType((ActorType)type);
|
return entity->isType((ActorType)type);
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "entityHasType", [](Actor* entity, int type) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "entityHasType", [](Actor* entity, int type) -> bool {
|
||||||
return entity->hasType((ActorType)type);
|
if (auto component = entity->mEntityContext->tryGetComponent<ActorTypeComponent>(); component) {
|
||||||
|
return (type & std::to_underlying(component->mType)) == type;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getEntityTypeId", [](Actor* entity) -> int {
|
RemoteCall::exportAs("GMLIB_API", "getEntityTypeId", [](Actor* entity) -> int {
|
||||||
return (int)entity->getEntityTypeId();
|
return (int)entity->getEntityTypeId();
|
||||||
|
|||||||
+3
-2
@@ -216,10 +216,11 @@ void Export_Event_API() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
case doHash("gmlib::EndermanTakeBlockBeforeEvent"): {
|
case doHash("gmlib::EndermanTakeBlockBeforeEvent"): {
|
||||||
REGISTER_EVENT_LISTEN(ila::mc::EndermanTakeBlockBeforeEvent,
|
REGISTER_EVENT_LISTEN(ila::mc::MobTakeBlockBeforeEvent,
|
||||||
(Actor * mob, bool isCancelled),
|
(Actor * mob, bool isCancelled),
|
||||||
(&event.self(), event.isCancelled()),
|
(&event.self(), event.isCancelled()),
|
||||||
event.setCancelled(result););
|
event.setCancelled(result);
|
||||||
|
, if (!event.self().isType(ActorType::EnderMan)) return;);
|
||||||
}
|
}
|
||||||
case doHash("gmlib::DragonRespawnBeforeEvent"): {
|
case doHash("gmlib::DragonRespawnBeforeEvent"): {
|
||||||
REGISTER_EVENT_LISTEN(ila::mc::DragonRespawnBeforeEvent,
|
REGISTER_EVENT_LISTEN(ila::mc::DragonRespawnBeforeEvent,
|
||||||
|
|||||||
+13
-5
@@ -2,19 +2,27 @@
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4996)
|
#pragma warning(disable : 4996)
|
||||||
#define GMLIB_GLOBAL_USING
|
#pragma include_alias("mc/world/item/HumanoidArmorItem.h", "modapi/item/types/mc/HumanoidArmorItem.h")
|
||||||
#include <gmlib/GlobalUsing.h>
|
#include <gmlib/include_ll.h>
|
||||||
#include <gmlib/include_all.h>
|
#include <gmlib/include_lib.h>
|
||||||
|
#include <gmlib/include_mc.h>
|
||||||
#include <ila/include_all.h>
|
#include <ila/include_all.h>
|
||||||
|
#include <modapi/addons/AddonsLoader.h>
|
||||||
|
#include <modapi/recipe/CustomRecipeRegistry.h>
|
||||||
|
#include <modapi/item/CustomItemRegistry.h>
|
||||||
#include <RemoteCallAPI.h>
|
#include <RemoteCallAPI.h>
|
||||||
using namespace gmlib::mod;
|
using namespace gmlib;
|
||||||
|
using namespace gmlib::ui;
|
||||||
|
using namespace gmlib::i18n;
|
||||||
|
using namespace gmlib::memory;
|
||||||
|
using namespace modapi;
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#define PLUGIN_NAME fmt::format(fg(fmt::color::light_green), "GMLIB-LRCA")
|
#define PLUGIN_NAME fmt::format(fg(fmt::color::light_green), "GMLIB-LRCA")
|
||||||
|
|
||||||
#define LIB_VERSION_MAJOR 1
|
#define LIB_VERSION_MAJOR 1
|
||||||
#define LIB_VERSION_MINOR 0
|
#define LIB_VERSION_MINOR 6
|
||||||
#define LIB_VERSION_PATCH 0
|
#define LIB_VERSION_PATCH 0
|
||||||
#define LIB_VERSION_PRERELEASE std::nullopt
|
#define LIB_VERSION_PRERELEASE std::nullopt
|
||||||
|
|
||||||
|
|||||||
+5
-4
@@ -2,7 +2,7 @@
|
|||||||
"format_version": 3,
|
"format_version": 3,
|
||||||
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
|
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
|
||||||
"tooth": "github.com/GroupMountain/GMLIB-LegacyRemoteCallApi",
|
"tooth": "github.com/GroupMountain/GMLIB-LegacyRemoteCallApi",
|
||||||
"version": "1.4.1",
|
"version": "1.6.0",
|
||||||
"info": {
|
"info": {
|
||||||
"name": "GMLIB-LegacyRemoteCallApi",
|
"name": "GMLIB-LegacyRemoteCallApi",
|
||||||
"description": "Legacy RemoteCall API for GMLIB",
|
"description": "Legacy RemoteCall API for GMLIB",
|
||||||
@@ -19,9 +19,10 @@
|
|||||||
{
|
{
|
||||||
"platform": "win-x64",
|
"platform": "win-x64",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"github.com/LiteLDev/LeviLamina": ">=1.3.0",
|
"github.com/LiteLDev/LeviLamina": ">=1.6.0",
|
||||||
"github.com/GroupMountain/GMLIB-Release": ">=1.3.0-rc.1",
|
"github.com/GroupMountain/GMLIB-Release": ">=1.6.0",
|
||||||
"github.com/MiracleForest/iListenAttentively-Release": ">=0.6.0"
|
"github.com/GroupMountain/ModAPI-Release": ">=0.2.0",
|
||||||
|
"github.com/MiracleForest/iListenAttentively-Release": ">=0.9.0"
|
||||||
},
|
},
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ if not has_config("vs_runtime") then
|
|||||||
set_runtimes("MD")
|
set_runtimes("MD")
|
||||||
end
|
end
|
||||||
|
|
||||||
add_requires("levilamina 1.4.1", {configs = {target_type = "server"}})
|
add_requires("levilamina 1.6.0", {configs = {target_type = "server"}})
|
||||||
add_requires("legacyremotecall")
|
add_requires("legacyremotecall")
|
||||||
add_requires("levibuildscript")
|
add_requires("levibuildscript 0.5.2")
|
||||||
add_requires("ilistenattentively 0.7.0")
|
add_requires("ilistenattentively 0.9.0")
|
||||||
add_requires("gmlib 1.4.3")
|
add_requires("gmlib 1.6.0")
|
||||||
|
add_requires("modapi 0.2.0")
|
||||||
|
|
||||||
target("GMLIB-LegacyRemoteCallApi")
|
target("GMLIB-LegacyRemoteCallApi")
|
||||||
add_cxflags(
|
add_cxflags(
|
||||||
@@ -35,7 +36,8 @@ target("GMLIB-LegacyRemoteCallApi")
|
|||||||
"levilamina",
|
"levilamina",
|
||||||
"legacyremotecall",
|
"legacyremotecall",
|
||||||
"ilistenattentively",
|
"ilistenattentively",
|
||||||
"gmlib"
|
"gmlib",
|
||||||
|
"modapi"
|
||||||
)
|
)
|
||||||
add_rules("@levibuildscript/linkrule")
|
add_rules("@levibuildscript/linkrule")
|
||||||
add_rules("@levibuildscript/modpacker")
|
add_rules("@levibuildscript/modpacker")
|
||||||
|
|||||||
Reference in New Issue
Block a user