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