Compare commits
6 Commits
@@ -7,12 +7,19 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v6
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
# with:
|
||||||
|
# xmake-version: branch@master
|
||||||
|
|
||||||
|
- uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
xmake-version: 3.0.0
|
path: |
|
||||||
|
~/AppData/Local/.xmake
|
||||||
|
key: xmake-${{ hashFiles('xmake.lua') }}
|
||||||
|
restore-keys: |
|
||||||
|
xmake-
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
@@ -23,7 +30,7 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
xmake -w -y
|
xmake -w -y
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
@@ -7,12 +7,20 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v6
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: xmake-io/github-action-setup-xmake@v1
|
- uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
# with:
|
||||||
|
# xmake-version: branch@master
|
||||||
|
|
||||||
|
- uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
xmake-version: 3.0.0
|
path: |
|
||||||
|
~/AppData/Local/.xmake
|
||||||
|
key: xmake-${{ hashFiles('xmake.lua') }}
|
||||||
|
restore-keys: |
|
||||||
|
xmake-
|
||||||
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
xmake repo -u
|
xmake repo -u
|
||||||
@@ -23,7 +31,7 @@ jobs:
|
|||||||
- run: |
|
- run: |
|
||||||
xmake -w -y
|
xmake -w -y
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
path: |
|
path: |
|
||||||
@@ -37,10 +45,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Download Mod
|
- name: Download Mod
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }}
|
||||||
path: artifact
|
path: artifact
|
||||||
@@ -55,7 +63,7 @@ jobs:
|
|||||||
working-directory: artifact
|
working-directory: artifact
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
${{ github.event.repository.name }}-windows-x64.zip
|
${{ github.event.repository.name }}-windows-x64.zip
|
||||||
@@ -443,25 +443,16 @@ void Export_Compatibility_API() {
|
|||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "getWorldSpawn", []() -> std::pair<BlockPos, int> {
|
RemoteCall::exportAs("GMLIB_API", "getWorldSpawn", []() -> std::pair<BlockPos, int> {
|
||||||
constexpr static HashedString SPAWN_POS{"spawnPos"};
|
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();
|
auto& levelData = GMLevel::getInstance()->getLevelData();
|
||||||
if (auto it = levelData.mValues->find(SPAWN_POS); it != levelData.mValues->end()) {
|
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) {
|
|
||||||
|
if (auto value = std::get_if<BlockPos>(&it->second.mValue.get()); value) {
|
||||||
return {*value, 0};
|
return {*value, 0};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (auto it = levelData.mOverrides->find(SPAWN_POS); it != levelData.mOverrides->end()) {
|
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) {
|
if (auto value = std::get_if<BlockPos>(&it->second.mValue.get()); value) {
|
||||||
return {*value, 0};
|
return {*value, 0};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -471,7 +462,8 @@ void Export_Compatibility_API() {
|
|||||||
if (pos.second != 0) return false;
|
if (pos.second != 0) return false;
|
||||||
GMLevel::getInstance()->getLevelData().setSpawnPos(pos.first);
|
GMLevel::getInstance()->getLevelData().setSpawnPos(pos.first);
|
||||||
auto pkt = SetSpawnPositionPacket();
|
auto pkt = SetSpawnPositionPacket();
|
||||||
pkt.mSpawnBlockPos = NetworkBlockPosition(pos.first);
|
pkt.mSpawnBlockPos = pos.first;
|
||||||
|
|
||||||
pkt.mDimensionType = 0;
|
pkt.mDimensionType = 0;
|
||||||
pkt.mSpawnPosType = SpawnPositionType::WorldSpawn;
|
pkt.mSpawnPosType = SpawnPositionType::WorldSpawn;
|
||||||
pkt.sendToClients();
|
pkt.sendToClients();
|
||||||
@@ -752,7 +744,7 @@ void Export_Compatibility_API() {
|
|||||||
return entity->getNameTag();
|
return entity->getNameTag();
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "ItemisUnbreakable", [](ItemStack const* item) -> bool {
|
RemoteCall::exportAs("GMLIB_API", "ItemisUnbreakable", [](ItemStack const* item) -> bool {
|
||||||
return ((GMItemStack*)item)->isUnbreakable();
|
return ((GMItemStack*)item)->getUnbreakable();
|
||||||
});
|
});
|
||||||
RemoteCall::exportAs("GMLIB_API", "setItemUnbreakable", [](ItemStack const* item, bool value) -> void {
|
RemoteCall::exportAs("GMLIB_API", "setItemUnbreakable", [](ItemStack const* item, bool value) -> void {
|
||||||
((GMItemStack*)item)->setUnbreakable(value);
|
((GMItemStack*)item)->setUnbreakable(value);
|
||||||
|
|||||||
+2
-2
@@ -22,8 +22,8 @@ using namespace modapi;
|
|||||||
#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 7
|
#define LIB_VERSION_MINOR 8
|
||||||
#define LIB_VERSION_PATCH 1
|
#define LIB_VERSION_PATCH 0
|
||||||
#define LIB_VERSION_PRERELEASE std::nullopt
|
#define LIB_VERSION_PRERELEASE std::nullopt
|
||||||
|
|
||||||
#ifdef LIB_VERSION_PRERELEASE
|
#ifdef LIB_VERSION_PRERELEASE
|
||||||
|
|||||||
+5
-5
@@ -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.9.0",
|
"version": "1.10.0",
|
||||||
"info": {
|
"info": {
|
||||||
"name": "GMLIB-LegacyRemoteCallApi",
|
"name": "GMLIB-LegacyRemoteCallApi",
|
||||||
"description": "Legacy RemoteCall API for GMLIB",
|
"description": "Legacy RemoteCall API for GMLIB",
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
{
|
{
|
||||||
"platform": "win-x64",
|
"platform": "win-x64",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"github.com/LiteLDev/LeviLamina": ">=1.7.0",
|
"github.com/LiteLDev/LeviLamina": ">=26.10.0",
|
||||||
"github.com/GroupMountain/GMLIB-Release": ">=1.7.0",
|
"github.com/GroupMountain/GMLIB-Release": ">=26.10.0",
|
||||||
"github.com/GroupMountain/ModAPI-Release": ">=0.3.0",
|
"github.com/GroupMountain/ModAPI-Release": ">=26.10.0",
|
||||||
"github.com/MiracleForest/iListenAttentively-Release": ">=0.10.0"
|
"github.com/MiracleForest/iListenAttentively-Release": ">=0.12.0"
|
||||||
},
|
},
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,12 +8,18 @@ if not has_config("vs_runtime") then
|
|||||||
set_runtimes("MD")
|
set_runtimes("MD")
|
||||||
end
|
end
|
||||||
|
|
||||||
add_requires("levilamina 050b392575227db10340075328e833c1a0f41e27", {configs = {target_type = "server"}})
|
add_requires("levilamina 26.10.5", {configs = {target_type = "server"}})
|
||||||
add_requires("legacyremotecall")
|
add_requires("legacyremotecall")
|
||||||
add_requires("levibuildscript 0.6.0")
|
add_requires("levibuildscript 0.6.0")
|
||||||
add_requires("ilistenattentively 0.11.0")
|
add_requires("ilistenattentively 0.12.0")
|
||||||
add_requires("gmlib 1.9.0")
|
add_requires("gmlib 26.10.0")
|
||||||
add_requires("modapi 0.4.0")
|
add_requires("modapi 26.10.0")
|
||||||
|
|
||||||
|
rule("package_envs")
|
||||||
|
before_link(function (target)
|
||||||
|
os.addenvs(target:pkgenvs())
|
||||||
|
end)
|
||||||
|
rule_end()
|
||||||
|
|
||||||
target("GMLIB-LegacyRemoteCallApi")
|
target("GMLIB-LegacyRemoteCallApi")
|
||||||
add_cxflags(
|
add_cxflags(
|
||||||
@@ -36,10 +42,12 @@ target("GMLIB-LegacyRemoteCallApi")
|
|||||||
add_packages(
|
add_packages(
|
||||||
"levilamina",
|
"levilamina",
|
||||||
"legacyremotecall",
|
"legacyremotecall",
|
||||||
|
"levibuildscript",
|
||||||
"ilistenattentively",
|
"ilistenattentively",
|
||||||
"gmlib",
|
"gmlib",
|
||||||
"modapi"
|
"modapi"
|
||||||
)
|
)
|
||||||
|
add_rules("package_envs")
|
||||||
add_rules("@levibuildscript/linkrule")
|
add_rules("@levibuildscript/linkrule")
|
||||||
add_rules("@levibuildscript/modpacker")
|
add_rules("@levibuildscript/modpacker")
|
||||||
set_exceptions("none")
|
set_exceptions("none")
|
||||||
|
|||||||
Reference in New Issue
Block a user