-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
132 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
#pragma once | ||
|
||
#include "ll/api/event/Cancellable.h" | ||
#include "ll/api/event/world/WorldEvent.h" | ||
|
||
#include "mc/world/level/BlockPos.h" | ||
#include "mc/world/level/block/Block.h" | ||
|
||
namespace ll::event::inline world { | ||
|
||
class BlockChangedEvent : public Cancellable<WorldEvent> { | ||
class BlockChangedEvent : public WorldEvent { | ||
uint const& mLayer; | ||
Block const& mPreviousBlock; | ||
Block const& mNewBlock; | ||
BlockPos const& mBlockPos; | ||
BlockPos const& mPos; | ||
|
||
public: | ||
constexpr BlockChangedEvent( | ||
BlockSource& blockSource, | ||
uint const& layer, | ||
Block const& previousBlock, | ||
Block const& newBlock, | ||
BlockPos const& blockPos | ||
BlockPos const& pos | ||
) | ||
: Cancellable(blockSource), | ||
: WorldEvent(blockSource), | ||
mLayer(layer), | ||
mPreviousBlock(previousBlock), | ||
mNewBlock(newBlock), | ||
mBlockPos(blockPos) {} | ||
mPos(pos) {} | ||
|
||
void serialize(CompoundTag&) const override; | ||
|
||
LLNDAPI uint const& layer() const; | ||
LLNDAPI Block const& previousBlock() const; | ||
LLNDAPI Block const& newBlock() const; | ||
LLNDAPI BlockPos const& blockPos() const; | ||
LLNDAPI BlockPos const& pos() const; | ||
}; | ||
} // namespace ll::event::inline world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.