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