LeviLamina
Loading...
Searching...
No Matches
BlockEventDispatcher.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/events/ListenerInfo.h"
5
6// auto generated inclusion list
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Block;
14class BlockPos;
15class ListenerInfo;
16class Vec3;
17// clang-format on
18
20public:
21 // BlockEventDispatcher inner types define
22 using CallbackFunction = ::std::function<void(::BlockPos const&, uint, ::Block const&, ::Actor*)>;
23
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::unique_ptr<::ListenerInfo>>> mRegisteredListeners;
28 ::ll::TypedStorage<4, 4, int> mHandleCounter;
29 // NOLINTEND
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ~BlockEventDispatcher() /*override*/ = default;
35 // NOLINTEND
36
37public:
38 // member functions
39 // NOLINTBEGIN
40 MCAPI ::BlockEventDispatcherToken registerListener(
41 ::Vec3 const& shapePos,
42 float shapeRadius,
43 ::std::function<void(::BlockPos const&, uint, ::Block const&, ::Actor*)> callback
44 );
45 // NOLINTEND
46
47public:
48 // vftables
49 // NOLINTBEGIN
50 MCNAPI static void** $vftable();
51 // NOLINTEND
52};
Definition Actor.h:105
Definition EnableNonOwnerReferences.h:7
Definition BlockEventDispatcherToken.h:14
Definition BlockEventDispatcher.h:19
static MCAPI void ** $vftable()
Definition BlockPos.h:19
Definition Block.h:43
Definition ListenerInfo.h:15
Definition Vec3.h:10