LeviLamina
Loading...
Searching...
No Matches
TopSnowBlock.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/BlockSupportType.h"
8#include "mc/world/level/block/FallingBlock.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class BaseGameVersion;
15class Block;
16class BlockPos;
17class BlockSource;
18class BlockType;
19class Experiments;
22class ItemInstance;
23class Player;
24class Random;
25class Vec3;
27namespace BlockEvents { class BlockPlaceEvent; }
28namespace BlockEvents { class BlockQueuedTickEvent; }
29namespace BlockEvents { class BlockRandomTickEvent; }
30namespace mce { class Color; }
31// clang-format on
32
33class TopSnowBlock : public ::FallingBlock {
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<1, 1, bool> mUsePartialHeight;
38 ::ll::TypedStorage<1, 1, bool> mAllowFallOnPlace;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 TopSnowBlock();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual bool checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const
49 /*override*/;
50
51 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
52
53 virtual ::AABB getCollisionShape(
54 ::Block const& block,
55 ::IConstBlockSource const& pos,
56 ::BlockPos const& entity,
58 ) const /*override*/;
59
60 virtual bool getCollisionShapeForCamera(
61 ::AABB& outAABB,
62 ::Block const& block,
63 ::IConstBlockSource const& region,
64 ::BlockPos const& pos
65 ) const /*override*/;
66
67 virtual void onExploded(::BlockSource& region, ::BlockPos const& pos, ::Actor* entitySource) const /*override*/;
68
69 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
70
71 virtual bool tryToPlace(
72 ::BlockSource& region,
73 ::BlockPos const& pos,
74 ::Block const& block,
75 ::ActorBlockSyncMessage const* syncMsg
76 ) const /*override*/;
77
78 virtual ::Block const&
79 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
80 /*override*/;
81
82 virtual bool isPreservingMediumWhenPlaced(::BlockType const* medium) const /*override*/;
83
84 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const) const /*override*/;
85
86 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
87 /*override*/;
88
89 virtual ::Block const* playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const
90 /*override*/;
91
92 virtual ::mce::Color getDustColor(::Block const&) const /*override*/;
93
94 virtual ::std::string getDustParticleName(::Block const&) const /*override*/;
95
96 virtual bool shouldStopFalling(::Actor& entity) const /*override*/;
97
98 virtual bool canBeBuiltOver(
99 ::Block const& block,
100 ::BlockSource& region,
101 ::BlockPos const& pos,
102 ::BlockType const& newBlock
103 ) const /*override*/;
104
105 virtual bool canBeBuiltOver(::Block const& region, ::BlockSource& pos, ::BlockPos const&) const /*override*/;
106
107 virtual bool canProvideSupport(::Block const& block, uchar, ::BlockSupportType) const /*override*/;
108
109 virtual bool canHaveExtraData() const /*override*/;
110
111 virtual bool isLavaBlocking() const /*override*/;
112
113 virtual bool isFreeToFall(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
114
115 virtual void
116 startFalling(::BlockSource& region, ::BlockPos const& pos, ::Block const& oldBlock, bool creative) const
117 /*override*/;
118
119 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
120 // NOLINTEND
121
122public:
123 // member functions
124 // NOLINTBEGIN
125 MCAPI TopSnowBlock(::std::string const& nameId, int id, bool usePartialHeight, bool allowFallOnPlace);
126
127 MCAPI bool _canBeBuiltOver(::BlockSource& region, ::BlockPos const& pos, ::BlockType const* newBlock) const;
128
129 MCAPI ::ItemInstance getResourceItemFromFalling() const;
130
131 MCAPI bool melt(::BlockSource& region, ::BlockPos const& pos, int meltHeight) const;
132
133 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
134
135 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
136
137 MCAPI void startFallingIfLostSupport(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
138
139 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
140 // NOLINTEND
141
142public:
143 // static functions
144 // NOLINTBEGIN
145 MCAPI static ::Block const& buildSnowBlock(::BlockSource& region, ::BlockPos const& pos, int height, bool additive);
146
147 MCFOLD static ::Block const& getCoveredBlock(::BlockSource const& region, ::BlockPos const& pos);
148
149 MCAPI static ::Block const&
150 getSnowBlockToBuild(::BlockSource const& region, ::BlockPos const& pos, int height, bool additive);
151 // NOLINTEND
152
153public:
154 // static variables
155 // NOLINTBEGIN
156 MCAPI static int const& MAX_HEIGHT();
157
158 MCAPI static ::BaseGameVersion const& TOP_SNOW_FALL_ON_PLACE();
159
160 MCAPI static ::BaseGameVersion const& TOP_SNOW_JAVA_PARITY_VERSION();
161 // NOLINTEND
162
163public:
164 // constructor thunks
165 // NOLINTBEGIN
166 MCAPI void* $ctor(::std::string const& nameId, int id, bool usePartialHeight, bool allowFallOnPlace);
167 // NOLINTEND
168
169public:
170 // virtual function thunks
171 // NOLINTBEGIN
172 MCAPI bool $checkIsPathable(::Actor& entity, ::BlockPos const& lastPathPos, ::BlockPos const& pathPos) const;
173
174 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
175
176 MCAPI ::AABB $getCollisionShape(
177 ::Block const& block,
178 ::IConstBlockSource const& pos,
179 ::BlockPos const& entity,
181 ) const;
182
183 MCAPI bool $getCollisionShapeForCamera(
184 ::AABB& outAABB,
185 ::Block const& block,
186 ::IConstBlockSource const& region,
187 ::BlockPos const& pos
188 ) const;
189
190 MCAPI void $onExploded(::BlockSource& region, ::BlockPos const& pos, ::Actor* entitySource) const;
191
192 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
193
194 MCAPI bool $tryToPlace(
195 ::BlockSource& region,
196 ::BlockPos const& pos,
197 ::Block const& block,
198 ::ActorBlockSyncMessage const* syncMsg
199 ) const;
200
201 MCAPI ::Block const& $getPlacementBlock(
202 ::Actor const& by,
203 ::BlockPos const& pos,
204 uchar face,
205 ::Vec3 const& clickPos,
206 int itemValue
207 ) const;
208
209 MCAPI bool $isPreservingMediumWhenPlaced(::BlockType const* medium) const;
210
211 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const) const;
212
213 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
214
215 MCAPI ::Block const* $playerWillDestroy(::Player& player, ::BlockPos const& pos, ::Block const& block) const;
216
217 MCFOLD ::mce::Color $getDustColor(::Block const&) const;
218
219 MCAPI ::std::string $getDustParticleName(::Block const&) const;
220
221 MCAPI bool $shouldStopFalling(::Actor& entity) const;
222
223 MCAPI bool $canBeBuiltOver(
224 ::Block const& block,
225 ::BlockSource& region,
226 ::BlockPos const& pos,
227 ::BlockType const& newBlock
228 ) const;
229
230 MCAPI bool $canBeBuiltOver(::Block const& region, ::BlockSource& pos, ::BlockPos const&) const;
231
232 MCAPI bool $canProvideSupport(::Block const& block, uchar, ::BlockSupportType) const;
233
234 MCFOLD bool $canHaveExtraData() const;
235
236 MCFOLD bool $isLavaBlocking() const;
237
238 MCAPI bool $isFreeToFall(::BlockSource& region, ::BlockPos const& pos) const;
239
240 MCAPI void
241 $startFalling(::BlockSource& region, ::BlockPos const& pos, ::Block const& oldBlock, bool creative) const;
242
243 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
244
245
246 // NOLINTEND
247
248public:
249 // vftables
250 // NOLINTBEGIN
251 MCAPI static void** $vftable();
252 // NOLINTEND
253};
Definition AABB.h:18
Definition Actor.h:125
Definition BaseGameVersion.h:13
Definition BlockPlaceEvent.h:18
Definition BlockQueuedTickEvent.h:18
Definition BlockRandomTickEvent.h:17
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BlockType.h:84
Definition Block.h:69
Definition Experiments.h:14
static MCAPI void ** $vftable()
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition ItemInstance.h:15
Definition Player.h:137
Definition Random.h:10
Definition Vec3.h:10
Definition Color.h:13
Definition optional_ref.h:10
Definition ActorBlockSyncMessage.h:8