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 // vIndex: 43
44 virtual ::EventResult onEvent(::ActorAcquiredItemEvent const& actorAcquiredItemEvent) /*override*/;
45
46 // vIndex: 32
47 virtual ::EventResult onEvent(::ActorKilledEvent const& actorKilledEvent) /*override*/;
48
49 // vIndex: 68
50 virtual ::EventResult onEvent(::PlayerUseNameTagEvent const& playerUseNameTagEvent) /*override*/;
51
52 // vIndex: 16
53 virtual ::EventResult onPlayerMove(::Player& player) /*override*/;
54
55 // vIndex: 2
56 virtual ::EventResult onPlayerPortalBuilt(::Player& player, ::DimensionType dimensionBuiltIn) /*override*/;
57
58 // vIndex: 3
59 virtual ::EventResult
60 onPlayerPortalUsed(::Player& player, ::DimensionType fromDimension, ::DimensionType toDimension) /*override*/;
61
62 // vIndex: 4
63 virtual ::EventResult onPlayerPoweredBeacon(::Player const& player, int level) /*override*/;
64
65 // vIndex: 33
66 virtual ::EventResult onPlayerCraftedItem(
67 ::Player& player,
68 ::ItemInstance const& craftedItem,
69 bool recipeBook,
70 bool hadSearchString,
71 bool craftedAutomatically,
72 int startingTabId,
73 int endingTabId,
74 int numTabsChanged,
75 bool filterOn,
76 bool recipeBookShown,
77 ::std::vector<short> const& ingredientItemIDs
78 ) /*override*/;
79
80 // vIndex: 29
81 virtual ::EventResult
82 onPlayerEnchantedItem(::Player& player, ::ItemStack const& item, ::ItemEnchants const& enchants) /*override*/;
83
84 // vIndex: 0
85 virtual ~RealmsStoriesGameplayEventListener() /*override*/ = default;
86 // NOLINTEND
87
88public:
89 // member functions
90 // NOLINTBEGIN
91 MCNAPI void _checkForBiomeRealmEvents(::Player const& player);
92
93 MCNAPI void _checkForStructureRealmEvents(::Player const& player);
94
95 MCNAPI void _handlePillagerKilledEvent(::Actor const& killedActor, ::ActorKilledEvent const& actorKilledEvent);
96
97 MCNAPI void
98 _publishEventForRealmsService(::RealmEventId id, ::std::string const& xuid, ::Json::Value const& metadata) const;
99
100 MCNAPI void _publishLocationWorldEventIfFirstTime(::RealmEventId id, ::Player const& player);
101
102 MCNAPI void
103 _publishPlayerEventIfFirstTime(::RealmEventId id, ::std::string const& playerXuid, ::Json::Value const& metadata);
104
106 ::RealmEventId firstTimeId,
107 ::RealmEventId otherTimeId,
108 ::std::string const& xuid
109 );
110 // NOLINTEND
111
112public:
113 // static functions
114 // NOLINTBEGIN
115 MCNAPI static ::std::set<::std::string> _getXuidsInKillProximity(::Actor const& killedActor, float xz, float y);
116
117 MCNAPI static ::std::string _playerXuidsToString(::std::set<::std::string> const& xuids);
118 // NOLINTEND
119
120public:
121 // virtual function thunks
122 // NOLINTBEGIN
123 MCNAPI ::EventResult $onEvent(::ActorAcquiredItemEvent const& actorAcquiredItemEvent);
124
125 MCNAPI ::EventResult $onEvent(::ActorKilledEvent const& actorKilledEvent);
126
127 MCNAPI ::EventResult $onEvent(::PlayerUseNameTagEvent const& playerUseNameTagEvent);
128
129 MCNAPI ::EventResult $onPlayerMove(::Player& player);
130
131 MCNAPI ::EventResult $onPlayerPortalBuilt(::Player& player, ::DimensionType dimensionBuiltIn);
132
133 MCNAPI ::EventResult
134 $onPlayerPortalUsed(::Player& player, ::DimensionType fromDimension, ::DimensionType toDimension);
135
136 MCNAPI ::EventResult $onPlayerPoweredBeacon(::Player const& player, int level);
137
138 MCNAPI ::EventResult $onPlayerCraftedItem(
139 ::Player& player,
140 ::ItemInstance const& craftedItem,
141 bool recipeBook,
142 bool hadSearchString,
143 bool craftedAutomatically,
144 int startingTabId,
145 int endingTabId,
146 int numTabsChanged,
147 bool filterOn,
148 bool recipeBookShown,
149 ::std::vector<short> const& ingredientItemIDs
150 );
151
152 MCNAPI ::EventResult
153 $onPlayerEnchantedItem(::Player& player, ::ItemStack const& item, ::ItemEnchants const& enchants);
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
160
162 // NOLINTEND
163};
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 Player.h:120
Definition RealmsStoriesData.h:13
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)
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::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