diff --git a/CHANGELOG.md b/CHANGELOG.md index 092ac45..4ba69d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.1] - 2024-07-24 + +### Changed + +- Adapt to LeviLamina 0.13.4 + ## [0.4.0] - 2024-06-19 ### Added @@ -65,7 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Release the first version -[Unreleased]: https://github.com/LiteLDev/MoreDimensions/compare/v0.4.0...HEAD +[Unreleased]: https://github.com/LiteLDev/MoreDimensions/compare/v0.4.1...HEAD +[0.4.1]: https://github.com/LiteLDev/MoreDimensions/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/LiteLDev/MoreDimensions/compare/v0.3.1...v0.4.0 [0.3.1]: https://github.com/LiteLDev/MoreDimensions/compare/v0.3.0...v0.3.1 [0.3.0]: https://github.com/LiteLDev/MoreDimensions/compare/v0.2.1...v0.3.0 diff --git a/README.md b/README.md index f99ba81..2fc7dd1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ More than three dimensions on BDS! -**Note: This plugin only provides API. If you only install this plugin, the dimensions will not be created.** +**Note: This mod only provides API. If you only install this mod, the dimensions will not be created.** ## Install diff --git a/manifest.json b/manifest.json index 7c38cc5..6c7c42f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,6 +2,6 @@ "name": "${pluginName}", "entry": "${pluginFile}", "type": "native", - "version": "0.4.0", + "version": "0.4.1", "author": "LiteLDev" } diff --git a/src/more_dimensions/MoreDimenison.cpp b/src/more_dimensions/MoreDimenison.cpp index e53d855..04af2b9 100644 --- a/src/more_dimensions/MoreDimenison.cpp +++ b/src/more_dimensions/MoreDimenison.cpp @@ -1,9 +1,10 @@ #include "MoreDimenison.h" -#include "ll/api/plugin/NativePlugin.h" -#include "ll/api/plugin/RegisterHelper.h" +#include "ll/api/Versions.h" +#include "ll/api/mod/RegisterHelper.h" #include "ll/api/service/ServerInfo.h" + #include namespace more_dimensions { @@ -29,16 +30,14 @@ bool MoreDimenison::load() { bool MoreDimenison::enable() { getSelf().getLogger().info("Enabling..."); - // Code for enabling the plugin goes here. return true; } bool MoreDimenison::disable() { getSelf().getLogger().info("Disabling..."); - // Code for disabling the plugin goes here. return true; } } // namespace more_dimensions -LL_REGISTER_PLUGIN(more_dimensions::MoreDimenison, more_dimensions::MoreDimenison::getInstance()); +LL_REGISTER_MOD(more_dimensions::MoreDimenison, more_dimensions::MoreDimenison::getInstance()); diff --git a/src/more_dimensions/MoreDimenison.h b/src/more_dimensions/MoreDimenison.h index 10481f9..85f0457 100644 --- a/src/more_dimensions/MoreDimenison.h +++ b/src/more_dimensions/MoreDimenison.h @@ -1,6 +1,6 @@ #pragma once -#include "ll/api/plugin/NativePlugin.h" +#include "ll/api/mod/NativeMod.h" namespace more_dimensions { @@ -9,9 +9,9 @@ class MoreDimenison { public: static std::unique_ptr& getInstance(); - MoreDimenison(ll::plugin::NativePlugin& self) : mSelf(self) {} + MoreDimenison(ll::mod::NativeMod& self) : mSelf(self) {} - [[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; } + [[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; } /// @return True if the plugin is loaded successfully. bool load(); @@ -27,7 +27,7 @@ class MoreDimenison { // bool unload(); private: - ll::plugin::NativePlugin& mSelf; + ll::mod::NativeMod& mSelf; }; } // namespace more_dimensions diff --git a/src/more_dimensions/core/dimension/FakeDimensionId.cpp b/src/more_dimensions/core/dimension/FakeDimensionId.cpp index e1833bd..51485fc 100644 --- a/src/more_dimensions/core/dimension/FakeDimensionId.cpp +++ b/src/more_dimensions/core/dimension/FakeDimensionId.cpp @@ -8,14 +8,11 @@ #include "mc/entity/utilities/ActorDataIDs.h" #include "mc/network/NetworkIdentifierWithSubId.h" #include "mc/network/ServerNetworkHandler.h" -#include "mc/network/packet/ActorEventPacket.h" #include "mc/network/packet/AddVolumeEntityPacket.h" #include "mc/network/packet/ChangeDimensionPacket.h" -#include "mc/network/packet/ClientboundMapItemDataPacket.h" #include "mc/network/packet/LevelChunkPacket.h" #include "mc/network/packet/PlayerActionPacket.h" #include "mc/network/packet/RemoveVolumeEntityPacket.h" -#include "mc/network/packet/RespawnPacket.h" #include "mc/network/packet/SpawnParticleEffectPacket.h" #include "mc/network/packet/StartGamePacket.h" #include "mc/network/packet/SubChunkPacket.h" @@ -25,7 +22,6 @@ #include "mc/server/ServerPlayer.h" #include "mc/util/VarIntDataOutput.h" #include "mc/world/actor/SynchedActorDataEntityWrapper.h" -#include "mc/world/actor/components/SynchedActorDataAccess.h" #include "mc/world/level/ChangeDimensionRequest.h" #include "mc/world/level/Level.h" #include "mc/world/level/dimension/VanillaDimensions.h" @@ -356,7 +352,7 @@ LL_TYPE_INSTANCE_HOOK( } fakeDimensionId.onPlayerLeftCustomDimension(uuid, true); // flash player bounding box - player->getEntityData().markDirty(std::to_underlying(ActorDataIDs::CollisionBox)); + player->getEntityData().markDirty(fmt::underlying(ActorDataIDs::CollisionBox)); } return origin(netId, packet); }; diff --git a/tooth.json b/tooth.json index a836e9b..006ba0d 100644 --- a/tooth.json +++ b/tooth.json @@ -1,7 +1,7 @@ { "format_version": 2, "tooth": "github.com/LiteLDev/MoreDimensions", - "version": "0.4.0", + "version": "0.4.1", "info": { "name": "MoreDimensions", "description": "More than three dimensions on BDS!", @@ -12,7 +12,7 @@ "plugin" ] }, - "asset_url": "https://github.com/LiteLDev/MoreDimensions/releases/download/v0.4.0/more-dimensions-windows-x64-v0.4.0.zip", + "asset_url": "https://github.com/LiteLDev/MoreDimensions/releases/download/v0.4.1/more-dimensions-windows-x64-v0.4.1.zip", "prerequisites": { "github.com/LiteLDev/LeviLamina": "0.13.x" }, diff --git a/xmake.lua b/xmake.lua index ef3baf7..7c02c5d 100644 --- a/xmake.lua +++ b/xmake.lua @@ -2,7 +2,7 @@ add_rules("mode.debug", "mode.release") add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git") -add_requires("levilamina 0.13.0") +add_requires("levilamina 0.13.4") if not has_config("vs_runtime") then set_runtimes("MD") @@ -19,7 +19,6 @@ target("more-dimensions") "/utf-8" ) add_defines( - "_HAS_CXX23=1", "MORE_DIMENSIONS_EXPORTS", "NOMINMAX", "UNICODE"