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&, uchar face, ::BlockSupportType type) 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& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
87 /*override*/;
88
89 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
90
91 virtual bool isInteractiveBlock() const /*override*/;
92
93 virtual int getExtraRenderLayers() const /*override*/;
94
95 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
96 /*override*/;
97
98 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
99
100 virtual ::Brightness getLight(::Block const& block) const /*override*/;
101
102 virtual ::Brightness getLightEmission(::Block const& block) const /*override*/;
103 // NOLINTEND
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI CauldronBlock(::std::string const& nameId, int id);
109
110 MCAPI void _explodeCauldronContents(::BlockSource& region, ::BlockPos const& pos, ushort) const;
111
112 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
113
114 MCAPI void
115 setLiquidLevel(::BlockSource& region, ::BlockPos const& pos, int liquidLevel, ::CauldronLiquidType type) const;
116
117 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
118
119 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
120 // NOLINTEND
121
122public:
123 // static functions
124 // NOLINTBEGIN
125 MCAPI static void _sendCauldronUsedEventToClient(
126 ::Player const& player,
127 short itemId,
128 ::MinecraftEventing::POIBlockInteractionType interactionType
129 );
130
131 MCAPI static void
132 _spawnCauldronEvent(::BlockSource& region, ::BlockPos const& pos, ::SharedTypes::Legacy::LevelEvent levelEvent);
133
134 MCAPI static bool _useDyeableComponent(
135 ::ItemStack& itemInstance,
136 ::Player& player,
137 ::BlockPos const& pos,
138 ::CauldronBlockActor& blockEntity,
139 ::BlockSource& region,
140 int fillLevel,
141 bool isEmpty,
142 bool isWater,
143 bool isCleanWater
144 );
145
146 MCAPI static void _useInventory(::Player& player, ::ItemStack& current, ::ItemStack& replaceWith, int useCount);
147
148 MCAPI static bool canReceiveStalactiteDrip(
149 ::BlockSource& region,
150 ::BlockPos const& pos,
151 ::SharedTypes::v1_26_20::MaterialType liquidType
152 );
153
154#ifdef LL_PLAT_C
155 MCAPI static void spawnBubbleParticles(::Level& level, ::Vec3 const& pos, ::Random&, int, int count);
156
157 MCAPI static void spawnLavaParticles(::Level& level, ::Vec3 const& pos, ::Random&, int count);
158
159 MCAPI static void spawnPotionParticles(::Level& level, ::Vec3 const& pos, ::Random&, int color, int count);
160
161 MCAPI static void spawnSplashParticles(::Level& level, ::Vec3 const& pos, ::Random&, int color, int count);
162#endif
163 // NOLINTEND
164
165public:
166 // static variables
167 // NOLINTBEGIN
168 MCAPI static ::BaseGameVersion const& CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION();
169 // NOLINTEND
170
171public:
172 // constructor thunks
173 // NOLINTBEGIN
174 MCAPI void* $ctor(::std::string const& nameId, int id);
175 // NOLINTEND
176
177public:
178 // virtual function thunks
179 // NOLINTBEGIN
180 MCFOLD bool $addCollisionShapes(
181 ::Block const& block,
182 ::IConstBlockSource const& region,
183 ::BlockPos const& pos,
184 ::AABB const* intersectTestBox,
185 ::std::vector<::AABB>& inoutBoxes,
187 ) const;
188
189 MCFOLD ::HitResult $clip(
190 ::Block const& block,
191 ::BlockSource const& region,
192 ::BlockPos const& pos,
193 ::Vec3 const& A,
194 ::Vec3 const& B,
195 ::ShapeType shapeType,
197 ) const;
198
199 MCAPI void $addAABBs(
200 ::Block const& block,
201 ::IConstBlockSource const& region,
202 ::BlockPos const& pos,
203 ::AABB const* intersectTestBox,
204 ::std::vector<::AABB>& inoutBoxes
205 ) const;
206
207 MCAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
208
209 MCAPI void
210 $handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const;
211
212 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
213
214 MCFOLD bool $hasComparatorSignal() const;
215
216 MCAPI int $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
217
218 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
219
220 MCFOLD bool $isInteractiveBlock() const;
221
222 MCFOLD int $getExtraRenderLayers() const;
223
224 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
225
226 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
227
228 MCAPI ::Brightness $getLight(::Block const& block) const;
229
230 MCAPI ::Brightness $getLightEmission(::Block const& block) const;
231
232
233 // NOLINTEND
234
235public:
236 // vftables
237 // NOLINTBEGIN
238 MCAPI static void** $vftable();
239 // NOLINTEND
240};
Definition AABB.h:18
Definition BaseGameVersion.h:8
Definition BlockActor.h:29
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:18
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Block.h:41
Definition CauldronBlockActor.h:24
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:18
Definition IConstBlockSource.h:25
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Level.h:254
Definition Player.h:129
Definition Random.h:10
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14
Definition Brightness.h:8