Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI CauldronBlock(::std::string const& nameId, int id);
109
110 MCNAPI void _explodeCauldronContents(::BlockSource& region, ::BlockPos const& pos, ushort) const;
111
112 MCNAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
113
114 MCAPI void
115 setLiquidLevel(::BlockSource& region, ::BlockPos const& pos, int liquidLevel, ::CauldronLiquidType type) const;
116
117 MCNAPI 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 MCNAPI static void
132 _spawnCauldronEvent(::BlockSource& region, ::BlockPos const& pos, ::SharedTypes::Legacy::LevelEvent levelEvent);
133
134 MCNAPI 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 MCNAPI 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 MCNAPI static void spawnBubbleParticles(::Level& level, ::Vec3 const& pos, ::Random&, int, int count);
156
157 MCNAPI static void spawnLavaParticles(::Level& level, ::Vec3 const& pos, ::Random&, int count);
158
159 MCNAPI static void spawnPotionParticles(::Level& level, ::Vec3 const& pos, ::Random&, int color, int count);
160
161 MCNAPI 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 MCNAPI static ::BaseGameVersion const& CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION();
169 // NOLINTEND
170
171public:
172 // constructor thunks
173 // NOLINTBEGIN
174 MCNAPI void* $ctor(::std::string const& nameId, int id);
175 // NOLINTEND
176
177public:
178 // virtual function thunks
179 // NOLINTBEGIN
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 MCNAPI ::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 MCNAPI 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 MCNAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
208
209 MCNAPI void
210 $handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const;
211
212 MCNAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
213
214 MCNAPI bool $hasComparatorSignal() const;
215
216 MCNAPI int
217 $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
218
219 MCNAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
220
221 MCNAPI bool $isInteractiveBlock() const;
222
223 MCNAPI int $getExtraRenderLayers() const;
224
225 MCNAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
226
227 MCNAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
228
229 MCNAPI ::Brightness $getLight(::Block const& block) const;
230
231 MCNAPI ::Brightness $getLightEmission(::Block const& block) const;
232
233
234 // NOLINTEND
235
236public:
237 // vftables
238 // NOLINTBEGIN
239 MCNAPI static void** $vftable();
240 // NOLINTEND
241};
Definition AABB.h:18
Definition BaseGameVersion.h:8
Definition BlockActor.h:30
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:18
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition CauldronBlockActor.h:24
MCAPI::HitResult $clip(::Block const &block, ::BlockSource const &region, ::BlockPos const &pos, ::Vec3 const &A, ::Vec3 const &B, ::ShapeType shapeType, ::optional_ref<::GetCollisionShapeInterface const > entity) const
MCAPI::Brightness $getLightEmission(::Block const &block) const
MCAPI void $addAABBs(::Block const &block, ::IConstBlockSource const &region, ::BlockPos const &pos, ::AABB const *intersectTestBox, ::std::vector<::AABB > &inoutBoxes) const
MCAPI CauldronBlock(::std::string const &nameId, int id)
MCAPI void $handlePrecipitation(::BlockSource &region, ::BlockPos const &pos, float downfallAmount, float temperature) const
MCAPI void onPlace(::BlockEvents::BlockPlaceEvent &eventData) const
MCAPI int $getExtraRenderLayers() const
MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const &tickData) const
MCAPI void * $ctor(::std::string const &nameId, int id)
MCAPI bool $hasComparatorSignal() const
MCAPI int $getComparatorSignal(::BlockSource &region, ::BlockPos const &pos, ::Block const &block, uchar dir) const
static MCAPI void ** $vftable()
MCAPI bool $canProvideSupport(::Block const &, uchar face, ::BlockSupportType type) const
static MCAPI bool canReceiveStalactiteDrip(::BlockSource &region, ::BlockPos const &pos, ::SharedTypes::v1_26_20::MaterialType liquidType)
MCAPI bool $addCollisionShapes(::Block const &block, ::IConstBlockSource const &region, ::BlockPos const &pos, ::AABB const *intersectTestBox, ::std::vector<::AABB > &inoutBoxes, ::optional_ref<::GetCollisionShapeInterface const > entity) const
MCAPI void tick(::BlockEvents::BlockQueuedTickEvent &eventData) const
MCAPI bool $breaksFallingBlocks(::Block const &block, ::BaseGameVersion const version) const
MCAPI::Brightness $getLight(::Block const &block) const
MCAPI void _explodeCauldronContents(::BlockSource &region, ::BlockPos const &pos, ushort) const
MCAPI void $neighborChanged(::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
static MCAPI bool _useDyeableComponent(::ItemStack &itemInstance, ::Player &player, ::BlockPos const &pos, ::CauldronBlockActor &blockEntity, ::BlockSource &region, int fillLevel, bool isEmpty, bool isWater, bool isCleanWater)
static MCAPI ::BaseGameVersion const & CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION()
MCAPI bool $isInteractiveBlock() const
MCAPI::ItemInstance $asItemInstance(::Block const &, ::BlockActor const *) const
static MCAPI void _spawnCauldronEvent(::BlockSource &region, ::BlockPos const &pos, ::SharedTypes::Legacy::LevelEvent levelEvent)
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:18
Definition IConstBlockSource.h:25
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Level.h:255
Definition Player.h:131
Definition Random.h:10
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:14
Definition Brightness.h:8