LeviLamina
Loading...
Searching...
No Matches
PlayerPickUpItemEvent.h
1
#pragma once
2
3
#include "ll/api/event/Cancellable.h"
4
#include "ll/api/event/player/PlayerEvent.h"
5
6
#include "mc/world/actor/item/ItemActor.h"
7
8
namespace
ll::event::inline player {
9
10
class
PlayerPickUpItemEvent final :
public
Cancellable<PlayerEvent> {
11
ItemActor
& mItemActor;
12
int
& mOrgCount;
13
int
& mFavoredSlot;
14
15
public
:
16
constexpr
PlayerPickUpItemEvent(
Player
& player,
ItemActor
& itemActor,
int
& orgCount,
int
& favoredSlot)
17
: Cancellable(player),
18
mItemActor(itemActor),
19
mOrgCount(orgCount),
20
mFavoredSlot(favoredSlot) {}
21
22
LLAPI
void
serialize(
CompoundTag
&)
const override
;
23
LLAPI
void
deserialize(
CompoundTag
const
&)
override
;
24
25
LLNDAPI
ItemActor
& itemActor()
const
;
26
LLNDAPI
int
& orgCount()
const
;
27
LLNDAPI
int
& favoredSlot()
const
;
28
};
29
30
}
// namespace ll::event::inline player
CompoundTag
Definition
CompoundTag.h:23
ItemActor
Definition
ItemActor.h:30
Player
Definition
Player.h:129
src
ll
api
event
player
PlayerPickUpItemEvent.h
Generated on
for LeviLamina by
1.16.1