LeviLamina
Loading...
Searching...
No Matches
ItemEventCoordinator.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/gameplayhandlers/CoordinatorResult.h"
7#include "mc/world/events/EventCoordinator.h"
8#include "mc/world/events/EventRef.h"
9#include "mc/world/events/ItemGameplayEvent.h"
10#include "mc/world/events/MutableItemGameplayEvent.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class ItemDescriptor;
18class ItemStackBase;
19class Player;
20// clang-format on
21
22class ItemEventCoordinator : public ::EventCoordinator<::ItemEventListener> {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemGameplayHandler>> mItemGameplayHandler;
27 // NOLINTEND
28
29public:
30 // virtual functions
31 // NOLINTBEGIN
32 virtual ~ItemEventCoordinator() /*override*/ = default;
33 // NOLINTEND
34
35public:
36 // member functions
37 // NOLINTBEGIN
38 MCAPI ItemEventCoordinator();
39
40 MCFOLD ::ItemGameplayHandler& getItemGameplayHandler();
41
42#ifdef LL_PLAT_C
43 MCAPI void onInventoryItemClosed();
44
45 MCAPI void onInventoryItemCraftedAutomaticallyByRecipe(::ItemStackBase const& item);
46
47 MCAPI void onInventoryItemOpened(bool workbench);
48
49 MCAPI void onInventoryLayoutSelected(int activeInventoryLayout, int activeInventoryLeftTabIndex);
50#endif
51
52 MCAPI void onItemModifiedActor(::ItemStackBase const& item, ::Actor const& modifiedActor);
53
54#ifdef LL_PLAT_C
55 MCAPI void onItemSelected(::ItemStackBase const& item);
56
57 MCAPI void onItemSelectedSlot(int slot);
58
59 MCAPI void onItemSmelted(
60 ::Player& player,
61 ::ItemDescriptor const& itemDescriptor,
62 ::ItemDescriptor const& lastFuelItemDescriptor
63 );
64#endif
65
66 MCAPI void onItemSpawnedActor(::ItemStackBase const& item, ::Actor const& spawnedActor);
67
68#ifdef LL_PLAT_C
69 MCAPI void onItemTransferredFromContainer(::ItemStackBase const& item, ::std::string const& srcContainerName);
70
71 MCAPI void onItemTransferredToContainer(::ItemStackBase const& item, ::std::string const& dstContainerName);
72
73 MCAPI void onPreviewItemPopulatedInContainer(::ItemStackBase const& item, ::std::string const& destContainerName);
74
75 MCAPI void onRecipeSelected(::ItemStackBase const& item);
76#endif
77
78 MCFOLD void registerItemGameplayHandler(::std::unique_ptr<::ItemGameplayHandler> handler);
79
80 MCAPI ::CoordinatorResult sendEvent(::EventRef<::MutableItemGameplayEvent<::CoordinatorResult>> event);
81
82#ifdef LL_PLAT_C
83 MCAPI void sendEvent(::EventRef<::ItemGameplayEvent<void>> const& event);
84#endif
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor();
91 // NOLINTEND
92
93public:
94 // vftables
95 // NOLINTBEGIN
96 MCNAPI static void** $vftable();
97 // NOLINTEND
98};
Definition Actor.h:125
Definition EventCoordinator.h:6
Definition EventRef.h:6
Definition ItemDescriptor.h:25
static MCAPI void ** $vftable()
Definition ItemEventListener.h:17
Definition ItemGameplayHandler.h:13
Definition ItemStackBase.h:52
Definition Player.h:137
Definition ItemGameplayEvent.h:9
Definition MutableItemGameplayEvent.h:23