Skip to content

Commit

Permalink
feat: adapt to LeviLamina 0.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jul 24, 2024
1 parent b1f3b95 commit 5f8690b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 21 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "${pluginName}",
"entry": "${pluginFile}",
"type": "native",
"version": "0.4.0",
"version": "0.4.1",
"author": "LiteLDev"
}
9 changes: 4 additions & 5 deletions src/more_dimensions/MoreDimenison.cpp
Original file line number Diff line number Diff line change
@@ -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 <memory>

namespace more_dimensions {
Expand All @@ -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());
8 changes: 4 additions & 4 deletions src/more_dimensions/MoreDimenison.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "ll/api/plugin/NativePlugin.h"
#include "ll/api/mod/NativeMod.h"

namespace more_dimensions {

Expand All @@ -9,9 +9,9 @@ class MoreDimenison {
public:
static std::unique_ptr<MoreDimenison>& 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();
Expand All @@ -27,7 +27,7 @@ class MoreDimenison {
// bool unload();

private:
ll::plugin::NativePlugin& mSelf;
ll::mod::NativeMod& mSelf;
};

} // namespace more_dimensions
6 changes: 1 addition & 5 deletions src/more_dimensions/core/dimension/FakeDimensionId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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);
};
Expand Down
4 changes: 2 additions & 2 deletions tooth.json
Original file line number Diff line number Diff line change
@@ -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!",
Expand All @@ -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"
},
Expand Down
3 changes: 1 addition & 2 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -19,7 +19,6 @@ target("more-dimensions")
"/utf-8"
)
add_defines(
"_HAS_CXX23=1",
"MORE_DIMENSIONS_EXPORTS",
"NOMINMAX",
"UNICODE"
Expand Down

0 comments on commit 5f8690b

Please sign in to comment.