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/BlockLegacy.h"
12#include "mc/world/level/block/BlockSupportType.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: 54
80 virtual void
81 handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const
82 /*override*/;
83
84 // vIndex: 89
85 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
86
87 // vIndex: 104
88 virtual bool hasComparatorSignal() const /*override*/;
89
90 // vIndex: 105
91 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
92 /*override*/;
93
94 // vIndex: 122
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: 86
104 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
105 /*override*/;
106
107 // vIndex: 83
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: 125
114 virtual ::Brightness getLightEmission(::Block const& block) const /*override*/;
115
116 // vIndex: 130
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 bool const _mayUpdateLiquidLevel(::BlockSource& region, ::BlockPos const& pos) const;
131
132 MCAPI void _sendCauldronUsedEventToClient(
133 ::Player const& player,
134 short itemId,
135 ::MinecraftEventing::POIBlockInteractionType interactionType
136 ) const;
137
138 MCAPI void _spawnCauldronEvent(
139 ::BlockSource& region,
140 ::BlockPos const& pos,
141 ::SharedTypes::Legacy::LevelEvent levelEvent
142 ) const;
143
144 MCAPI bool _useDyeableComponent(
145 ::ItemStack& itemInstance,
146 ::Player& player,
147 ::BlockPos const& pos,
148 ::CauldronBlockActor& blockEntity,
149 ::BlockSource& region,
150 int fillLevel,
151 bool isEmpty,
152 bool isWater,
153 bool isCleanWater
154 ) const;
155
156 MCAPI void _useInventory(::Player& player, ::ItemStack& current, ::ItemStack& replaceWith, int useCount) const;
157
158 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
159
160 MCAPI void
161 setLiquidLevel(::BlockSource& region, ::BlockPos const& pos, int liquidLevel, ::CauldronLiquidType type) const;
162
163 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
164
165 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
166 // NOLINTEND
167
168public:
169 // static functions
170 // NOLINTBEGIN
171 MCAPI static bool canReceiveStalactiteDrip(::BlockSource& region, ::BlockPos const& pos, ::MaterialType liquidType);
172
173 MCAPI static void spawnPotionParticles(::Level& level, ::Vec3 const& pos, ::Random&, int color, int count);
174 // NOLINTEND
175
176public:
177 // static variables
178 // NOLINTBEGIN
179 MCAPI static ::BaseGameVersion const& CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION();
180 // NOLINTEND
181
182public:
183 // virtual function thunks
184 // NOLINTBEGIN
185 MCFOLD bool $addCollisionShapes(
186 ::Block const& block,
187 ::IConstBlockSource const& region,
188 ::BlockPos const& pos,
189 ::AABB const* intersectTestBox,
190 ::std::vector<::AABB>& inoutBoxes,
192 ) const;
193
194 MCAPI void $addAABBs(
195 ::Block const& block,
196 ::IConstBlockSource const& region,
197 ::BlockPos const& pos,
198 ::AABB const* intersectTestBox,
199 ::std::vector<::AABB>& inoutBoxes
200 ) const;
201
202 MCAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
203
204 MCAPI void
205 $handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const;
206
207 MCAPI ::ItemInstance $asItemInstance(::Block const&, ::BlockActor const*) const;
208
209 MCFOLD bool $hasComparatorSignal() const;
210
211 MCAPI int $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
212
213 MCAPI void $animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const;
214
215 MCFOLD bool $isInteractiveBlock() const;
216
217 MCFOLD int $getExtraRenderLayers() const;
218
219 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
220
221 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
222
223 MCAPI ::Brightness $getLight(::Block const& block) const;
224
225 MCAPI ::Brightness $getLightEmission(::Block const& block) const;
226
227 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
228 // NOLINTEND
229
230public:
231 // vftables
232 // NOLINTBEGIN
233 MCNAPI static void** $vftable();
234 // NOLINTEND
235};
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:18
Definition BlockSource.h:67
Definition Block.h:38
Definition CauldronBlockActor.h:23
Definition CauldronBlock.h:42
static MCAPI void ** $vftable()
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:19
Definition IConstBlockSource.h:24
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition Level.h:238
Definition Player.h:119
Definition Random.h:11
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:5
Definition Brightness.h:8