Skip to content
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
English
English
简体中文
繁體中文
Auto
Light
Dark
Auto
Light
Dark
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Resources
LeviLamina on GitHub
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
API Reference
On this page
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Search
Ctrl
K
Loading...
Searching...
No Matches
PlayerPlaceBlockEvent.h
1
#pragma once
2
3
#include "ll/api/event/Cancellable.h"
4
#include "ll/api/event/player/PlayerClickEvent.h"
5
6
#include "mc/world/actor/player/Player.h"
7
#include "mc/world/level/BlockPos.h"
8
#include "mc/world/level/block/Block.h"
9
10
namespace
ll::event::inline player {
11
12
class
PlayerPlaceBlockEvent :
public
PlayerRightClickEvent {
13
BlockPos
const
& mPos;
14
15
protected
:
16
constexpr
explicit
PlayerPlaceBlockEvent(
Player
& player,
BlockPos
const
& pos)
17
: PlayerRightClickEvent(player),
18
mPos(pos) {}
19
20
public
:
21
LLAPI
void
serialize(
CompoundTag
&)
const override
;
22
23
LLNDAPI
BlockPos
const
& pos()
const
;
24
};
25
26
class
PlayerPlacingBlockEvent final :
public
Cancellable<PlayerPlaceBlockEvent> {
27
uchar
const
& mFace;
28
29
public
:
30
constexpr
explicit
PlayerPlacingBlockEvent(
Player
& player,
BlockPos
const
& pos, uchar
const
& face)
31
: Cancellable(player, pos),
32
mFace(face) {}
33
34
LLAPI
void
serialize(
CompoundTag
&)
const override
;
35
36
LLNDAPI uchar
const
& face()
const
;
37
};
38
39
class
PlayerPlacedBlockEvent final :
public
PlayerPlaceBlockEvent {
40
Block
const
& mPlacedBlock;
41
42
public
:
43
constexpr
explicit
PlayerPlacedBlockEvent(
Player
& player,
BlockPos
const
& pos,
Block
const
& placedBlock)
44
: PlayerPlaceBlockEvent(player, pos),
45
mPlacedBlock(placedBlock) {}
46
47
LLAPI
void
serialize(
CompoundTag
&)
const override
;
48
49
LLNDAPI
Block
const
& placedBlock()
const
;
50
};
51
}
// namespace ll::event::inline player
BlockPos
Definition
BlockPos.h:14
Block
Definition
Block.h:42
CompoundTag
Definition
CompoundTag.h:18
Player
Definition
Player.h:131
src
ll
api
event
player
PlayerPlaceBlockEvent.h
Generated on
for LeviLamina by
1.16.1