LeviLamina
Loading...
Searching...
No Matches
ScriptBlockBreakingEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/world/level/BlockPos.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class Player;
13// clang-format on
14
15namespace ScriptModuleMinecraft {
16
17class ScriptBlockBreakingEventListener {
18public:
19 // ScriptBlockBreakingEventListener inner types declare
20 // clang-format off
22 // clang-format on
23
24 // ScriptBlockBreakingEventListener inner types define
26 public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
30 ::ll::TypedStorage<1, 1, uchar> mFace;
31 // NOLINTEND
32 };
33
34 using SendCancelBreakingFunction = ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar, int)>;
35
36 using SendStartBreakingFunction = ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar)>;
37
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<
42 8,
43 64,
44 ::std::unordered_map<
47 mPlayerBreakingBlock;
48 ::ll::TypedStorage<8, 64, ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar)>>
49 mSendStartBreakingFunction;
50 ::ll::TypedStorage<8, 64, ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar, int)>>
51 mSendCancelBreakingFunction;
52 // NOLINTEND
53
54public:
55 // prevent constructor by default
56 ScriptBlockBreakingEventListener();
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI ScriptBlockBreakingEventListener(
62 ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar)> sendStartBreakingFunction,
63 ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar, int)> sendCancelBreakingFunction
64 );
65
66 MCAPI void _flushPlayerBreaking(::Player& player, int previousProgress);
67
68 MCAPI void _startBreakingBlock(
69 ::Player& player,
70 ::BlockPos const& blockPos,
71 ::Block const& hitBlock,
72 uchar face,
73 int previousProgress
74 );
75
76 MCAPI void onBreakBlock(::Player& player);
77
78 MCAPI ~ScriptBlockBreakingEventListener();
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor(
85 ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar)> sendStartBreakingFunction,
86 ::std::function<void(::Player&, ::BlockPos const&, ::Block const&, uchar, int)> sendCancelBreakingFunction
87 );
88 // NOLINTEND
89
90public:
91 // destructor thunk
92 // NOLINTBEGIN
93 MCAPI void $dtor();
94 // NOLINTEND
95};
96
97} // namespace ScriptModuleMinecraft
Definition BlockPos.h:17
Definition Block.h:41
Definition Player.h:129
Definition ActorUniqueID.h:5