Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [未发布]

## 新增

- 适配LeviLamina 26.40

## [0.10.1] - 2026-09-13

### 修复
Expand Down
3 changes: 1 addition & 2 deletions src/mod/Events/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
#include <mc/world/level/Level.h>

#include "mod/Events/BlockEventHandle.h"
#include "mod/Stats/Stats.h"
#include "mod/Stats/Handlers/PlayerStatsHandlers.h"

#include "mod/Stats/Stats.h"

namespace stats {
namespace event {
Expand Down
8 changes: 5 additions & 3 deletions src/mod/Hook/MobDamageReduction.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "mc/world/effect/MobEffectIds.h"
#include "mod/Hook/Hook.h"

#include <cmath>
Expand All @@ -13,8 +14,9 @@
#include <mc/world/effect/MobEffectInstance.h>
#include <mc/world/level/Level.h>

#include "mod/Stats/Stats.h"
#include "mod/Stats/Handlers/PlayerStatsHandlers.h"
#include "mod/Stats/Stats.h"


namespace stats::hook::mob {
namespace {
Expand Down Expand Up @@ -59,8 +61,8 @@ LL_TYPE_INSTANCE_HOOK(
::ActorDamageSource const& source,
float damage
) {
auto const afterEnchantReduction = origin(source, damage);
auto const* resistance = this->getEffect(*MobEffect::DAMAGE_RESISTANCE());
auto const afterEnchantReduction = origin(source, damage);
auto const* resistance = this->getEffect((uint)MobEffectIds::DamageResistance);

if (resistance && source.isReducedByResistanceEffect()) {
auto const resistanceDamage = getResistanceDamage(afterEnchantReduction, resistance->mAmplifier);
Expand Down
6 changes: 4 additions & 2 deletions src/mod/Hook/Player/PlayerStartSleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ LL_TYPE_INSTANCE_HOOK(
Player,
&Player::$startSleepInBed,
BedSleepingResult,
BlockPos const& pos
::BlockPos const& bedPos,
bool setsRespawn,
float sleepOffset
) {
auto res = origin(pos);
auto res = origin(bedPos, setsRespawn, sleepOffset);
Player* player = this;
if (res == BedSleepingResult::Ok) handler::onPlayerStartSleep(player);
return res;
Expand Down
6 changes: 3 additions & 3 deletions tooth.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"format_version": 3,
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
"tooth": "github.com/LeafKnife/Stats",
"version": "0.10.1",
"version": "0.11.0",
"info": {
"name": "Stats",
"description": "Minecraft 基岩版服务器(BDS) 统计信息插件",
Expand All @@ -17,8 +17,8 @@
"label": "",
"platform": "win-x64",
"dependencies": {
"github.com/LiteLDev/LeviLamina": "26.32.*",
"github.com/LiteLDev/LegacyRemoteCall": "0.20.*"
"github.com/LiteLDev/LeviLamina": "26.40.*",
"github.com/LiteLDev/LegacyRemoteCall": "0.21.*"
},
"assets": [
{
Expand Down
4 changes: 2 additions & 2 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ option_end()
-- add_requires("levilamina x.x.x") for a specific version
-- add_requires("levilamina develop") to use develop version
-- please note that you should add bdslibrary yourself if using dev version
add_requires("levilamina 26.32.*", {configs = {target_type = get_config("target_type")}})
add_requires("levilamina 26.40.*", {configs = {target_type = get_config("target_type")}})

add_requires("levibuildscript")
add_requires("legacyremotecall v0.20.0", {configs = {target_type = get_config("target_type")}})
add_requires("legacyremotecall v0.21.0", {configs = {target_type = get_config("target_type")}})
add_requires("nlohmann_json v3.11.3")
add_requires("parallel-hashmap v2.0.0")

Expand Down