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/BlockType.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
71 ::ll::TypedStorage<4, 4, ::SignBlock::SignInteractionResult::Result> mResult;
72 // NOLINTEND
73 };
74
75public:
76 // member variables
77 // NOLINTBEGIN
78 ::ll::TypedStorage<4, 4, ::SignBlock::SignType> mSignType;
79 ::ll::TypedStorage<1, 1, bool> mOnGround;
80 // NOLINTEND
81
82public:
83 // virtual functions
84 // NOLINTBEGIN
85 // vIndex: 11
86 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
87
88 // vIndex: 5
89 virtual ::AABB getCollisionShape(
90 ::Block const&,
92 ::BlockPos const&,
94 ) const /*override*/;
95
96 // vIndex: 57
97 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
98 /*override*/;
99
100 // vIndex: 90
101 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
102
103 // vIndex: 80
104 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
105
106 // vIndex: 87
107 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
108 /*override*/;
109
110 // vIndex: 138
111 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
112
113 // vIndex: 136
114 virtual bool isInteractiveBlock() const /*override*/;
115
116 // vIndex: 147
117 virtual float getYRotationInDegrees(::Block const& block) const;
118
119 // vIndex: 148
120 virtual bool _canSurvive(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
121
122 // vIndex: 149
123 virtual ::ItemInstance _getItemInstance() const;
124
125 // vIndex: 131
126 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
127
128 // vIndex: 0
129 virtual ~SignBlock() /*override*/ = default;
130 // NOLINTEND
131
132public:
133 // member functions
134 // NOLINTBEGIN
135 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
136
137 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
138 // NOLINTEND
139
140public:
141 // static functions
142 // NOLINTBEGIN
143 MCAPI static bool _canChangeSign(::SignBlockActor& blockActor, ::Player& player);
144
145 MCAPI static ::SignBlock::SignInteractionResult _getInteractResult(
146 ::SignBlockActor& blockActor,
147 ::SignTextSide side,
148 ::ItemStack& item,
149 ::Player& player,
150 ::BlockPos const& pos,
151 uchar face
152 );
153
154 MCAPI static void _useDye(
155 ::SignBlockActor& blockActor,
156 ::SignTextSide side,
157 ::ItemStack& dyeStack,
158 ::BlockPos const& pos,
159 ::Player& player
160 );
161
162 MCAPI static void _useGlowInkSac(
163 ::SignBlockActor& blockActor,
164 ::SignTextSide side,
165 ::ItemStack& glowInkSacStack,
166 ::BlockPos const& pos,
167 ::Player& player
168 );
169
170 MCAPI static void
171 _useHoneyComb(::SignBlockActor& blockActor, ::ItemStack& honeyCombStack, ::BlockPos const& pos, ::Player& player);
172
173 MCAPI static void _useInkSac(
174 ::SignBlockActor& blockActor,
175 ::SignTextSide side,
176 ::ItemStack& inkSacStack,
177 ::BlockPos const& pos,
178 ::Player& player
179 );
180
181 MCAPI static ::mce::Color getSignTextColorFromDyeItem(::Item const& dyeItem);
182 // NOLINTEND
183
184public:
185 // virtual function thunks
186 // NOLINTBEGIN
187 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
188
189 MCFOLD ::AABB $getCollisionShape(
190 ::Block const&,
191 ::IConstBlockSource const&,
192 ::BlockPos const&,
194 ) const;
195
196 MCFOLD bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
197
198 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
199
200 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
201
202 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
203
204 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
205
206 MCFOLD bool $isInteractiveBlock() const;
207
208 MCAPI float $getYRotationInDegrees(::Block const& block) const;
209
210 MCAPI bool $_canSurvive(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
211
212 MCAPI ::ItemInstance $_getItemInstance() const;
213
214 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
215 // NOLINTEND
216
217public:
218 // vftables
219 // NOLINTBEGIN
220 MCAPI static void** $vftable();
221 // NOLINTEND
222};
Definition AABB.h:18
Definition ActorBlockBase.h:6
Definition Actor.h:102
Definition BlockActor.h:32
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition Block.h:37
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition ItemInstance.h:15
Definition ItemStack.h:23
Definition Item.h:66
Definition Player.h:123
Definition SignBlockActor.h:28
Definition SignBlock.h:32
Definition optional_ref.h:10
Definition SignBlock.h:55