LeviLamina
Loading...
Searching...
No Matches
SignBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/world/level/block/ActorBlockBase.h"
8#include "mc/world/level/block/actor/SignTextSide.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class Block;
15class BlockActor;
16class BlockLegacy;
17class BlockPos;
18class BlockSource;
19class Experiments;
22class Item;
23class ItemInstance;
24class ItemStack;
25class Player;
26class SignBlockActor;
27namespace BlockEvents { class BlockQueuedTickEvent; }
28namespace mce { class Color; }
29// clang-format on
30
31class SignBlock : public ::ActorBlock {
32public:
33 // SignBlock inner types declare
34 // clang-format off
36 // clang-format on
37
38 // SignBlock inner types define
39 enum class SignType : int {
40 Oak = 0,
41 Spruce = 1,
42 Birch = 2,
43 Jungle = 3,
44 Acacia = 4,
45 DarkOak = 5,
46 RedBigNetherShroom = 6,
47 BlueBigNetherShroom = 7,
48 Mangrove = 8,
49 Bamboo = 9,
50 Cherry = 10,
51 PaleOak = 11,
52 };
53
55 public:
56 // SignInteractionResult inner types define
57 enum class Result : int {
58 NoInteraction = 0,
59 FailWaxedSign = 1,
60 UseDye = 2,
61 UseGlowInkSac = 3,
62 UseInkSac = 4,
63 UseHoneyComb = 5,
64 OpenForEditing = 6,
65 };
66
67 public:
68 // member variables
69 // NOLINTBEGIN
71 // NOLINTEND
72
73 public:
74 // prevent constructor by default
78 };
79
80public:
81 // member variables
82 // NOLINTBEGIN
83 ::ll::TypedStorage<4, 4, ::SignBlock::SignType> mSignType;
84 ::ll::TypedStorage<1, 1, bool> mOnGround;
85 // NOLINTEND
86
87public:
88 // virtual functions
89 // NOLINTBEGIN
90 // vIndex: 11
91 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
92
93 // vIndex: 5
94 virtual ::AABB
96 const /*override*/;
97
98 // vIndex: 57
99 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
100 /*override*/;
101
102 // vIndex: 90
103 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
104
105 // vIndex: 80
106 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
107
108 // vIndex: 87
109 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
110 /*override*/;
111
112 // vIndex: 142
113 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
114
115 // vIndex: 139
116 virtual bool use(::Player& player, ::BlockPos const& pos, uchar face) const /*override*/;
117
118 // vIndex: 138
119 virtual bool isInteractiveBlock() const /*override*/;
120
121 // vIndex: 150
122 virtual float getYRotationInDegrees(::Block const& block) const;
123
124 // vIndex: 151
125 virtual bool _canSurvive(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
126
127 // vIndex: 152
128 virtual ::ItemInstance _getItemInstance() const;
129
130 // vIndex: 131
131 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
132
133 // vIndex: 0
134 virtual ~SignBlock() /*override*/ = default;
135 // NOLINTEND
136
137public:
138 // member functions
139 // NOLINTBEGIN
140 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
141 // NOLINTEND
142
143public:
144 // static functions
145 // NOLINTBEGIN
146 MCAPI static bool _canChangeSign(::SignBlockActor& blockActor, ::Player& player);
147
148 MCAPI static ::SignBlock::SignInteractionResult _getInteractResult(
149 ::SignBlockActor& blockActor,
150 ::SignTextSide side,
151 ::ItemStack& item,
152 ::Player& player,
153 ::BlockPos const& pos,
154 uchar face
155 );
156
157 MCAPI static void _useDye(
158 ::SignBlockActor& blockActor,
159 ::SignTextSide side,
160 ::ItemStack& dyeStack,
161 ::BlockPos const& pos,
162 ::Player& player
163 );
164
165 MCAPI static void _useGlowInkSac(
166 ::SignBlockActor& blockActor,
167 ::SignTextSide side,
168 ::ItemStack& glowInkSacStack,
169 ::BlockPos const& pos,
170 ::Player& player
171 );
172
173 MCAPI static void
174 _useHoneyComb(::SignBlockActor& blockActor, ::ItemStack& honeyCombStack, ::BlockPos const& pos, ::Player& player);
175
176 MCAPI static void _useInkSac(
177 ::SignBlockActor& blockActor,
178 ::SignTextSide side,
179 ::ItemStack& inkSacStack,
180 ::BlockPos const& pos,
181 ::Player& player
182 );
183
184 MCAPI static ::mce::Color getSignTextColorFromDyeItem(::Item const& dyeItem);
185 // NOLINTEND
186
187public:
188 // destructor thunk
189 // NOLINTBEGIN
190
191 // NOLINTEND
192
193public:
194 // virtual function thunks
195 // NOLINTBEGIN
196 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
197
198 MCFOLD ::AABB
199 $getCollisionShape(::Block const&, ::IConstBlockSource const&, ::BlockPos const&, ::optional_ref<::GetCollisionShapeInterface const>)
200 const;
201
202 MCFOLD bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
203
204 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
205
206 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
207
208 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
209
210 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
211
212 MCAPI bool $use(::Player& player, ::BlockPos const& pos, uchar face) const;
213
214 MCFOLD bool $isInteractiveBlock() const;
215
216 MCAPI float $getYRotationInDegrees(::Block const& block) const;
217
218 MCAPI bool $_canSurvive(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
219
220 MCAPI ::ItemInstance $_getItemInstance() const;
221
222 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
223 // NOLINTEND
224
225public:
226 // vftables
227 // NOLINTBEGIN
228 MCAPI static void** $vftable();
229 // NOLINTEND
230};
Definition AABB.h:16
Definition ActorBlockBase.h:6
Definition Actor.h:104
Definition BlockActor.h:32
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition Item.h:65
Definition Player.h:119
Definition Result.h:6
Definition SignBlockActor.h:22
Definition SignBlock.h:31
Definition optional_ref.h:10
Definition SignBlock.h:54
Definition Alias.h:14