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