Skip to content
Open
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
5 changes: 5 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

## [Unreleased]

### Fixed

- `afterPlaceBlock` now passes the placed block instead of re-reading the position, which could report air [#402]

## [0.22.3] - 2026-10-11

### Fixed
Expand Down Expand Up @@ -1466,6 +1470,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#393]: https://github.com/LiteLDev/LegacyScriptEngine/issues/393
[#394]: https://github.com/LiteLDev/LegacyScriptEngine/issues/394
[#396]: https://github.com/LiteLDev/LegacyScriptEngine/issues/396
[#402]: https://github.com/LiteLDev/LegacyScriptEngine/issues/402

[Unreleased]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.22.3...HEAD
[0.22.3]: https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.22.2...v0.22.3
Expand Down
1 change: 1 addition & 0 deletions src/lse/events/BlockEventsHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "legacy/api/PlayerAPI.h"
#include "ll/api/memory/Hook.h"
#include "lse/api/Thread.h"
#include "mc/scripting/modules/minecraft/events/ScriptBlockBreakingEventListener.h"
#include "mc/scripting/modules/minecraft/events/ScriptBlockGlobalEventListener.h"
#include "mc/server/commands/CommandOrigin.h"
#include "mc/server/commands/CommandOriginType.h"
Expand Down
2 changes: 1 addition & 1 deletion src/lse/events/PlayerEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void afterPlaceBlock() {
CallEvent(
EVENT_TYPES::afterPlaceBlock,
PlayerClass::newPlayer(&ev.self()),
BlockClass::newBlock(ev.pos(), ev.self().getDimensionId())
BlockClass::newBlock(ev.placedBlock(), ev.pos(), ev.self().getDimensionId())
); // Not cancellable
}
}
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ option("backend")
target("LegacyScriptEngine")
add_rules("@levibuildscript/linkrule")
if is_plat("windows") then
add_defines("NOMINMAX", "UNICODE", "_AMC64_")
add_defines("NOMINMAX", "UNICODE", "_AMD64_", "_HAS_CXX23=1")
set_exceptions("none") -- To avoid conflicts with /EHa.
add_cxflags( "/EHa", "/utf-8", "/W4", "/w44265", "/w44289", "/w44296", "/w45263", "/w44738", "/w45204")
add_cxflags(
Expand Down
Loading