Skip to content
LeviMC
Home
Projects
Core
LeviLamina
Mod loader for Bedrock Dedicated Server
LegacyScriptEngine
Script engine for legacy LLSE plugins
LeviStone
(GitHub)
Runtime for Endstone plugins on LeviLamina
lip
General-purpose package installer
Launchers
LeviLauncher
Bedrock (GDK) launcher for Windows
LeviLaunchroid
Bedrock launcher for Android
Official mods
LeviOptimize
Performance optimizations for LeviLamina servers
LeviAntiCheat
Anti-cheat for LeviLamina servers
MoreDimensions
More dimensions for Bedrock worlds
BarelyEnoughItems
Item list and recipe viewer (JEI) for Bedrock
AlleviatedBackpacks
Backpacks with upgrades for Bedrock
Bedstones
Waystones for Bedrock worlds
BeetrootSkin
Hunger and saturation at a glance
LeviHeadlessInput
Scripted client input for mod tests
All repositories on GitHub
Mods
Blog
Community
About
English
English
简体中文
繁體中文
Español
Русский
Deutsch
日本語
한국어
Français
Auto
Light
Dark
Auto
Light
Dark
LeviLamina
Home
User Guides
Developer Guides
Maintainer Guides
Supported Versions
LegacyScriptEngine
About
Home
User Guides
Developer Guides
Maintainer Guides
Supported Versions
LegacyScriptEngine
About
LeviMC
Home
Projects
Core
LeviLamina
Mod loader for Bedrock Dedicated Server
LegacyScriptEngine
Script engine for legacy LLSE plugins
LeviStone
(GitHub)
Runtime for Endstone plugins on LeviLamina
lip
General-purpose package installer
Launchers
LeviLauncher
Bedrock (GDK) launcher for Windows
LeviLaunchroid
Bedrock launcher for Android
Official mods
LeviOptimize
Performance optimizations for LeviLamina servers
LeviAntiCheat
Anti-cheat for LeviLamina servers
MoreDimensions
More dimensions for Bedrock worlds
BarelyEnoughItems
Item list and recipe viewer (JEI) for Bedrock
AlleviatedBackpacks
Backpacks with upgrades for Bedrock
Bedstones
Waystones for Bedrock worlds
BeetrootSkin
Hunger and saturation at a glance
LeviHeadlessInput
Scripted client input for mod tests
All repositories on GitHub
Mods
Blog
Community
About
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:17
CompoundTag
Definition
CompoundTag.h:18
ItemStack
Definition
ItemStack.h:26
Player
Definition
Player.h:129
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