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