LeviLamina
Loading...
Searching...
No Matches
RealmsStoriesGameplayEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/AutomaticID.h"
7#include "mc/world/events/EventListenerDispatcher.h"
8#include "mc/world/events/EventResult.h"
9#include "mc/world/level/storage/RealmEventId.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
15class Dimension;
17class ItemEnchants;
18class ItemInstance;
19class ItemStack;
20class LevelStorage;
21class Player;
24class Vec3;
26struct ActorKilledEvent;
28namespace Json { class Value; }
29// clang-format on
30
32 public ::EventListenerDispatcher<::PlayerEventListener> {
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::Vec3>> mLastPosChecked;
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::RealmsStoriesData>> mRealmsStoriesData;
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IRealmEventLogger>> mRealmEventLogger;
39 // NOLINTEND
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 // vIndex: 41
45 virtual ::EventResult onEvent(::ActorAcquiredItemEvent const& actorAcquiredItemEvent) /*override*/;
46
47 // vIndex: 30
48 virtual ::EventResult onEvent(::ActorKilledEvent const& actorKilledEvent) /*override*/;
49
50 // vIndex: 67
51 virtual ::EventResult onEvent(::PlayerUseNameTagEvent const& playerUseNameTagEvent) /*override*/;
52
53 // vIndex: 16
54 virtual ::EventResult onPlayerMove(::Player& player) /*override*/;
55
56 // vIndex: 2
57 virtual ::EventResult onPlayerPortalBuilt(::Player& player, ::DimensionType dimensionBuiltIn) /*override*/;
58
59 // vIndex: 3
60 virtual ::EventResult
61 onPlayerPortalUsed(::Player& player, ::DimensionType fromDimension, ::DimensionType toDimension) /*override*/;
62
63 // vIndex: 4
64 virtual ::EventResult onPlayerPoweredBeacon(::Player const& player, int level) /*override*/;
65
66 // vIndex: 33
67 virtual ::EventResult onPlayerCraftedItem(
68 ::Player& player,
69 ::ItemInstance const& craftedItem,
70 bool recipeBook,
71 bool hadSearchString,
72 bool craftedAutomatically,
73 int startingTabId,
74 int endingTabId,
75 int numTabsChanged,
76 bool filterOn,
77 bool recipeBookShown,
78 ::std::vector<short> const& ingredientItemIDs
79 ) /*override*/;
80
81 // vIndex: 29
82 virtual ::EventResult
83 onPlayerEnchantedItem(::Player& player, ::ItemStack const& item, ::ItemEnchants const& enchants) /*override*/;
84
85 // vIndex: 0
86 virtual ~RealmsStoriesGameplayEventListener() /*override*/ = default;
87 // NOLINTEND
88
89public:
90 // member functions
91 // NOLINTBEGIN
93 ::LevelStorage& levelStorage,
94 ::std::unique_ptr<::IRealmEventLogger> realmEventLogger
95 );
96
97 MCAPI void _checkForBiomeRealmEvents(::Player const& player);
98
99 MCAPI void _checkForStructureRealmEvents(::Player const& player);
100
101 MCAPI void _handlePillagerKilledEvent(::Actor const& killedActor, ::ActorKilledEvent const& actorKilledEvent);
102
103 MCAPI void
104 _publishEventForRealmsService(::RealmEventId id, ::std::string const& xuid, ::Json::Value const& metadata) const;
105
106 MCAPI void _publishLocationWorldEventIfFirstTime(::RealmEventId id, ::Player const& player);
107
108 MCAPI void
109 _publishPlayerEventIfFirstTime(::RealmEventId id, ::std::string const& playerXuid, ::Json::Value const& metadata);
110
111 MCAPI void _publishWorldEventFirstOrOtherTime(
112 ::RealmEventId firstTimeId,
113 ::RealmEventId otherTimeId,
114 ::std::string const& xuid
115 );
116 // NOLINTEND
117
118public:
119 // static functions
120 // NOLINTBEGIN
121 MCAPI static ::std::set<::std::string> _getXuidsInKillProximity(::Actor const& killedActor, float xz, float y);
122
123 MCAPI static ::std::string _playerXuidsToString(::std::set<::std::string> const& xuids);
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void* $ctor(::LevelStorage& levelStorage, ::std::unique_ptr<::IRealmEventLogger> realmEventLogger);
130 // NOLINTEND
131
132public:
133 // destructor thunk
134 // NOLINTBEGIN
135
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141 MCAPI ::EventResult $onEvent(::ActorAcquiredItemEvent const& actorAcquiredItemEvent);
142
143 MCAPI ::EventResult $onEvent(::ActorKilledEvent const& actorKilledEvent);
144
145 MCAPI ::EventResult $onEvent(::PlayerUseNameTagEvent const& playerUseNameTagEvent);
146
147 MCAPI ::EventResult $onPlayerMove(::Player& player);
148
149 MCAPI ::EventResult $onPlayerPortalBuilt(::Player& player, ::DimensionType dimensionBuiltIn);
150
151 MCAPI ::EventResult
152 $onPlayerPortalUsed(::Player& player, ::DimensionType fromDimension, ::DimensionType toDimension);
153
154 MCAPI ::EventResult $onPlayerPoweredBeacon(::Player const& player, int level);
155
156 MCAPI ::EventResult $onPlayerCraftedItem(
157 ::Player& player,
158 ::ItemInstance const& craftedItem,
159 bool recipeBook,
160 bool hadSearchString,
161 bool craftedAutomatically,
162 int startingTabId,
163 int endingTabId,
164 int numTabsChanged,
165 bool filterOn,
166 bool recipeBookShown,
167 ::std::vector<short> const& ingredientItemIDs
168 );
169
170 MCAPI ::EventResult
171 $onPlayerEnchantedItem(::Player& player, ::ItemStack const& item, ::ItemEnchants const& enchants);
172 // NOLINTEND
173
174public:
175 // vftables
176 // NOLINTBEGIN
177 MCAPI static void** $vftableForEventListenerDispatcherActorEventListener();
178
179 MCAPI static void** $vftableForEventListenerDispatcherPlayerEventListener();
180 // NOLINTEND
181};
Definition ActorEventListener.h:20
Definition Actor.h:104
Definition AutomaticID.h:6
Definition Dimension.h:83
Definition EventListenerDispatcher.h:6
Definition IRealmEventLogger.h:5
Definition ItemEnchants.h:17
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition Value.h:16
Definition LevelStorage.h:24
Definition PlayerEventListener.h:29
Definition Player.h:119
Definition RealmsStoriesData.h:13
Definition RealmsStoriesGameplayEventListener.h:32
Definition Vec3.h:10
Definition ActorAcquiredItemEvent.h:15
Definition ActorKilledEvent.h:14
Definition PlayerUseNameTagEvent.h:14