LeviLamina
Loading...
Searching...
No Matches
BlockChangedEvent.h
1#pragma once
2
3#include "ll/api/event/world/WorldEvent.h"
4
5#include "mc/world/level/BlockPos.h"
6#include "mc/world/level/block/Block.h"
7
8namespace ll::event::inline world {
9
10class BlockChangedEvent final : public WorldEvent {
11 uint const& mLayer;
12 Block const& mPreviousBlock;
13 Block const& mNewBlock;
14 BlockPos const& mPos;
15
16public:
17 constexpr BlockChangedEvent(
18 BlockSource& blockSource,
19 uint const& layer,
20 Block const& previousBlock,
21 Block const& newBlock,
22 BlockPos const& pos
23 )
24 : WorldEvent(blockSource),
25 mLayer(layer),
26 mPreviousBlock(previousBlock),
27 mNewBlock(newBlock),
28 mPos(pos) {}
29
30 LLAPI void serialize(CompoundTag&) const override;
31
32 LLNDAPI uint const& layer() const;
33 LLNDAPI Block const& previousBlock() const;
34 LLNDAPI Block const& newBlock() const;
35 LLNDAPI BlockPos const& pos() const;
36};
37} // namespace ll::event::inline world
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition CompoundTag.h:13
Definition BlockChangedEvent.h:10
Definition WorldEvent.h:9
Definition serialize.h:11