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 // vIndex: 0
35 virtual ~BlockEventDispatcher() /*override*/ = default;
36 // NOLINTEND
37
38public:
39 // member functions
40 // NOLINTBEGIN
41 MCNAPI ::BlockEventDispatcherToken registerListener(
42 ::Vec3 const& shapePos,
43 float shapeRadius,
44 ::std::function<void(::BlockPos const&, uint, ::Block const&, ::Actor*)> callback
45 );
46 // NOLINTEND
47
48public:
49 // vftables
50 // NOLINTBEGIN
51 MCNAPI static void** $vftable();
52 // NOLINTEND
53};
Definition Actor.h:103
Definition EnableNonOwnerReferences.h:7
Definition BlockEventDispatcherToken.h:14
Definition BlockEventDispatcher.h:19
MCAPI::BlockEventDispatcherToken registerListener(::Vec3 const &shapePos, float shapeRadius, ::std::function< void(::BlockPos const &, uint, ::Block const &, ::Actor *)> callback)
static MCAPI void ** $vftable()
Definition BlockPos.h:18
Definition Block.h:38
Definition ListenerInfo.h:15
Definition Vec3.h:10