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
8namespace ll::event::inline player {
9
10class PlayerPickUpItemEvent final : public Cancellable<PlayerEvent> {
11 ItemActor& mItemActor;
12 int& mOrgCount;
13 int& mFavoredSlot;
14
15public:
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
Definition CompoundTag.h:13
Definition ItemActor.h:27
Definition Player.h:119
Definition PlayerPickUpItemEvent.h:10
Definition serialize.h:11