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