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