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
PlayerInteractBlockEvent.h
1
#pragma once
2
3
#include "ll/api/event/Cancellable.h"
4
#include "ll/api/event/player/PlayerClickEvent.h"
5
6
#include "mc/common/FacingID.h"
7
#include "mc/deps/core/math/Vec3.h"
8
#include "mc/world/item/ItemStack.h"
9
#include "mc/world/level/BlockPos.h"
10
#include "mc/world/level/block/Block.h"
11
12
namespace
ll::event::inline player {
13
14
class
PlayerInteractBlockEvent final :
public
Cancellable<PlayerRightClickEvent> {
15
ItemStack
& mItem;
16
BlockPos
const
& mBlockPos;
17
FacingID
const
& mFace;
18
Vec3
const
& mClickPos;
19
optional_ref<Block const>
mBlock;
20
21
public
:
22
constexpr
PlayerInteractBlockEvent(
23
Player
& player,
24
ItemStack
& item,
25
BlockPos
const
& blockPos,
26
FacingID
const
& face,
27
Vec3
const
& clickPos,
28
optional_ref<Block const>
block
29
)
30
: Cancellable(player),
31
mItem(item),
32
mBlockPos(blockPos),
33
mFace(face),
34
mClickPos(clickPos),
35
mBlock(block) {}
36
37
LLAPI
void
serialize(
CompoundTag
&)
const override
;
38
39
LLNDAPI
ItemStack
& item()
const
;
40
LLNDAPI
BlockPos
const
& blockPos()
const
;
41
LLNDAPI FacingID
const
& face()
const
;
42
LLNDAPI
Vec3
const
& clickPos()
const
;
43
LLNDAPI
optional_ref<Block const>
block()
const
;
44
};
45
}
// namespace ll::event::inline player
BlockPos
Definition
BlockPos.h:14
CompoundTag
Definition
CompoundTag.h:18
ItemStack
Definition
ItemStack.h:26
Player
Definition
Player.h:131
Vec3
Definition
Vec3.h:10
optional_ref
Definition
optional_ref.h:10
src
ll
api
event
player
PlayerInteractBlockEvent.h
Generated on
for LeviLamina by
1.16.1