LeviLamina
Loading...
Searching...
No Matches
CauldronBlock.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/deps/shared_types/legacy/LevelEvent.h"
8#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
9#include "mc/events/MinecraftEventing.h"
10#include "mc/world/level/ShapeType.h"
11#include "mc/world/level/block/ActorBlockBase.h"
12#include "mc/world/level/block/BlockSupportType.h"
13#include "mc/world/level/block/BlockType.h"
14#include "mc/world/level/block/CauldronLiquidType.h"
15
16// auto generated forward declare list
17// clang-format off
18class AABB;
19class BaseGameVersion;
20class Block;
21class BlockActor;
22class BlockPos;
23class BlockSource;
26class HitResult;
28class ItemInstance;
29class ItemStack;
30class Level;
31class Player;
32class Random;
33class Vec3;
35struct Brightness;
36namespace BlockEvents { class BlockPlaceEvent; }
37namespace BlockEvents { class BlockPlayerInteractEvent; }
38namespace BlockEvents { class BlockQueuedTickEvent; }
39// clang-format on
40
41class CauldronBlock : public ::ActorBlock {
42public:
43 // prevent constructor by default
44 CauldronBlock();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual bool addCollisionShapes(
50 ::Block const& block,
51 ::IConstBlockSource const& region,
52 ::BlockPos const& pos,
53 ::AABB const* intersectTestBox,
54 ::std::vector<::AABB>& inoutBoxes,
56 ) const /*override*/;
57
58 virtual ::HitResult clip(
59 ::Block const& block,
60 ::BlockSource const& region,
61 ::BlockPos const& pos,
62 ::Vec3 const& A,
63 ::Vec3 const& B,
64 ::ShapeType shapeType,
66 ) const /*override*/;
67
68 virtual void addAABBs(
69 ::Block const& block,
70 ::IConstBlockSource const& region,
71 ::BlockPos const& pos,
72 ::AABB const* intersectTestBox,
73 ::std::vector<::AABB>& inoutBoxes
74 ) const /*override*/;
75
76 virtual bool canProvideSupport(::Block const& face, uchar type, ::BlockSupportType) const /*override*/;
77
78 virtual void
79 handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const
80 /*override*/;
81
82 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
83
84 virtual bool hasComparatorSignal() const /*override*/;
85
86 virtual int getComparatorSignal(::BlockSource& block, ::BlockPos const&, ::Block const&, uchar) const /*override*/;
87
88 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
89
90 virtual bool isInteractiveBlock() const /*override*/;
91
92 virtual int getExtraRenderLayers() const /*override*/;
93
94 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
95 /*override*/;
96
97 virtual bool breaksFallingBlocks(::Block const& version, ::BaseGameVersion const) const /*override*/;
98
99 virtual ::Brightness getLight(::Block const& block) const /*override*/;
100
101 virtual ::Brightness getLightEmission(::Block const& block) const /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI CauldronBlock(::std::string const& nameId, int id);
108
109 MCAPI void _explodeCauldronContents(::BlockSource& region, ::BlockPos const& pos, ushort) const;
110
111 MCAPI void _flushCauldronEvent(::BlockSource& region, ::BlockPos const& pos, int prevColor) const;
112
113 MCAPI void _sendCauldronUsedEventToClient(
114 ::Player const& player,
115 short itemId,
116 ::MinecraftEventing::POIBlockInteractionType interactionType
117 ) const;
118
119 MCAPI void _spawnCauldronEvent(
120 ::BlockSource& region,
121 ::BlockPos const& pos,
122 ::SharedTypes::Legacy::LevelEvent levelEvent
123 ) const;
124
125 MCAPI bool _useDyeableComponent(
126 ::ItemStack& itemInstance,
127 ::Player& player,
128 ::BlockPos const& pos,
129 ::CauldronBlockActor& blockEntity,
130 ::BlockSource& region,
131 int fillLevel,
132 bool isEmpty,
133 bool isWater,
134 bool isCleanWater
135 ) const;
136
137 MCAPI void _useInventory(::Player& player, ::ItemStack& current, ::ItemStack& replaceWith, int useCount) const;
138
139 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
140
141 MCAPI void receiveStalactiteDrip(
142 ::BlockSource& region,
143 ::BlockPos const& pos,
144 ::SharedTypes::v1_26_20::MaterialType liquidType
145 ) const;
146
147 MCAPI void
148 setLiquidLevel(::BlockSource& region, ::BlockPos const& pos, int liquidLevel, ::CauldronLiquidType type) const;
149
150 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
151
152 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
153 // NOLINTEND
154
155public:
156 // static functions
157 // NOLINTBEGIN
158 MCAPI static bool canReceiveStalactiteDrip(
159 ::BlockSource& region,
160 ::BlockPos const& pos,
161 ::SharedTypes::v1_26_20::MaterialType liquidType
162 );
163
164 MCAPI static int clampLiquidLevel(int fillLevel);
165
166#ifdef LL_PLAT_C
167 MCAPI static void spawnBubbleParticles(::Level& level, ::Vec3 const& pos, ::Random&, int, int count);
168
169 MCAPI static void spawnLavaParticles(::Level& level, ::Vec3 const& pos, ::Random&, int count);
170#endif
171
172 MCAPI static void spawnPotionParticles(::Level& level, ::Vec3 const& pos, ::Random& color, int count, int);
173
174#ifdef LL_PLAT_C
175 MCAPI static void spawnSplashParticles(::Level& level, ::Vec3 const& pos, ::Random&, int color, int count);
176#endif
177 // NOLINTEND
178
179public:
180 // static variables
181 // NOLINTBEGIN
182 MCAPI static ::BaseGameVersion const& CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION();
183 // NOLINTEND
184
185public:
186 // constructor thunks
187 // NOLINTBEGIN
188 MCAPI void* $ctor(::std::string const& nameId, int id);
189 // NOLINTEND
190
191public:
192 // virtual function thunks
193 // NOLINTBEGIN
194 MCFOLD bool $addCollisionShapes(
195 ::Block const& block,
196 ::IConstBlockSource const& region,
197 ::BlockPos const& pos,
198 ::AABB const* intersectTestBox,
199 ::std::vector<::AABB>& inoutBoxes,
201 ) const;
202
203 MCFOLD ::HitResult $clip(
204 ::Block const& block,
205 ::BlockSource const& region,
206 ::BlockPos const& pos,
207 ::Vec3 const& A,
208 ::Vec3 const& B,
209 ::ShapeType shapeType,
211 ) const;
212
213 MCAPI void $addAABBs(
214 ::Block const& block,
215 ::IConstBlockSource const& region,
216 ::BlockPos const& pos,
217 ::AABB const* intersectTestBox,
218 ::std::vector<::AABB>& inoutBoxes
219 ) const;
220
221 MCAPI bool $canProvideSupport(::Block const& face, uchar type, ::BlockSupportType) const;
222
223 MCAPI void
224 $handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const;
225
226 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
227
228 MCFOLD bool $hasComparatorSignal() const;
229
230 MCAPI int $getComparatorSignal(::BlockSource& block, ::BlockPos const&, ::Block const&, uchar) const;
231
232 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
233
234 MCFOLD bool $isInteractiveBlock() const;
235
236 MCFOLD int $getExtraRenderLayers() const;
237
238 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
239
240 MCAPI bool $breaksFallingBlocks(::Block const& version, ::BaseGameVersion const) const;
241
242 MCAPI ::Brightness $getLight(::Block const& block) const;
243
244 MCAPI ::Brightness $getLightEmission(::Block const& block) const;
245
246
247 // NOLINTEND
248
249public:
250 // vftables
251 // NOLINTBEGIN
252 MCAPI static void** $vftable();
253 // NOLINTEND
254};
Definition AABB.h:18
Definition BaseGameVersion.h:13
Definition BlockActor.h:30
Definition BlockPlaceEvent.h:18
Definition BlockPlayerInteractEvent.h:20
Definition BlockQueuedTickEvent.h:18
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition CauldronBlockActor.h:24
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:19
Definition IConstBlockSource.h:24
Definition ItemInstance.h:15
Definition ItemStack.h:35
Definition Level.h:255
Definition Player.h:137
Definition Random.h:10
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14
Definition Brightness.h:8