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/CauldronLiquidType.h"
13#include "mc/world/level/material/MaterialType.h"
14
15// auto generated forward declare list
16// clang-format off
17class AABB;
18class BaseGameVersion;
19class Block;
20class BlockActor;
21class BlockLegacy;
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 BlockQueuedTickEvent; }
39// clang-format on
40
42public:
43 // virtual functions
44 // NOLINTBEGIN
45 // vIndex: 7
46 virtual bool addCollisionShapes(
47 ::Block const& block,
48 ::IConstBlockSource const& region,
49 ::BlockPos const& pos,
50 ::AABB const* intersectTestBox,
51 ::std::vector<::AABB>& inoutBoxes,
53 ) const /*override*/;
54
55 // vIndex: 4
56 virtual ::HitResult
57 clip(::Block const&, ::BlockSource const&, ::BlockPos const&, ::Vec3 const&, ::Vec3 const&, ::ShapeType, ::optional_ref<::GetCollisionShapeInterface const>)
58 const /*override*/;
59
60 // vIndex: 8
61 virtual void addAABBs(
62 ::Block const& block,
63 ::IConstBlockSource const& region,
64 ::BlockPos const& pos,
65 ::AABB const* intersectTestBox,
66 ::std::vector<::AABB>& inoutBoxes
67 ) const /*override*/;
68
69 // vIndex: 23
70 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const /*override*/;
71
72 // vIndex: 139
73 virtual bool use(::Player& player, ::BlockPos const& pos, uchar) const /*override*/;
74
75 // vIndex: 55
76 virtual void
77 handlePrecipitation(::BlockSource& region, ::BlockPos const& pos, float downfallAmount, float temperature) const
78 /*override*/;
79
80 // vIndex: 90
81 virtual ::ItemInstance asItemInstance(::Block const&, ::BlockActor const*) const /*override*/;
82
83 // vIndex: 105
84 virtual bool hasComparatorSignal() const /*override*/;
85
86 // vIndex: 106
87 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
88 /*override*/;
89
90 // vIndex: 123
91 virtual void animateTickBedrockLegacy(::BlockAnimateTickData const& tickData) const /*override*/;
92
93 // vIndex: 138
94 virtual bool isInteractiveBlock() const /*override*/;
95
96 // vIndex: 144
97 virtual int getExtraRenderLayers() const /*override*/;
98
99 // vIndex: 87
100 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
101 /*override*/;
102
103 // vIndex: 84
104 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
105
106 // vIndex: 145
107 virtual ::Brightness getLight(::Block const& block) const /*override*/;
108
109 // vIndex: 126
110 virtual ::Brightness getLightEmission(::Block const& block) const /*override*/;
111
112 // vIndex: 131
113 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
114
115 // vIndex: 0
116 virtual ~CauldronBlock() /*override*/ = default;
117 // NOLINTEND
118
119public:
120 // member functions
121 // NOLINTBEGIN
122 MCAPI void _checkForStalactiteDrip(::BlockSource& region, ::BlockPos const& pos) const;
123
124 MCAPI void _explodeCauldronContents(::BlockSource& region, ::BlockPos const& pos, ushort) const;
125
126 MCAPI bool const _mayUpdateLiquidLevel(::BlockSource& region, ::BlockPos const& pos) const;
127
128 MCAPI void _sendCauldronUsedEventToClient(
129 ::Player const& player,
130 short itemId,
131 ::MinecraftEventing::POIBlockInteractionType interactionType
132 ) const;
133
134 MCAPI void
135 _spawnCauldronEvent(::BlockSource& region, ::BlockPos const& pos, ::SharedTypes::Legacy::LevelEvent levelEvent)
136 const;
137
138 MCAPI bool _useDyeableComponent(
139 ::ItemStack& itemInstance,
140 ::Player& player,
141 ::BlockPos const& pos,
142 ::CauldronBlockActor& blockEntity,
143 ::BlockSource& region,
144 int fillLevel,
145 bool isEmpty,
146 bool isWater,
147 bool isCleanWater
148 ) const;
149
150 MCAPI void _useInventory(::Player& player, ::ItemStack& current, ::ItemStack& replaceWith, int useCount) const;
151
152 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
153
154 MCAPI void
155 setLiquidLevel(::BlockSource& region, ::BlockPos const& pos, int liquidLevel, ::CauldronLiquidType type) const;
156
157 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
158 // NOLINTEND
159
160public:
161 // static functions
162 // NOLINTBEGIN
163 MCAPI static bool canReceiveStalactiteDrip(::BlockSource& region, ::BlockPos const& pos, ::MaterialType liquidType);
164
165 MCAPI static void spawnPotionParticles(::Level& level, ::Vec3 const& pos, ::Random& color, int, int count);
166 // NOLINTEND
167
168public:
169 // static variables
170 // NOLINTBEGIN
171 MCAPI static ::BaseGameVersion const& CAULDRON_DOESNT_BREAK_FALLING_BLOCK_VERSION();
172 // NOLINTEND
173
174public:
175 // destructor thunk
176 // NOLINTBEGIN
177
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 MCAPI void $addAABBs(
193 ::Block const& block,
194 ::IConstBlockSource const& region,
195 ::BlockPos const& pos,
196 ::AABB const* intersectTestBox,
197 ::std::vector<::AABB>& inoutBoxes
198 ) const;
199
200 MCAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
201
202 MCAPI bool $use(::Player& player, ::BlockPos const& pos, uchar) 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 MCAPI static void** $vftable();
234 // NOLINTEND
235};
Definition AABB.h:16
Definition ActorBlockBase.h:6
Definition BaseGameVersion.h:13
Definition BlockActor.h:32
Definition BlockPlaceEvent.h:15
Definition BlockQueuedTickEvent.h:15
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition CauldronBlockActor.h:24
Definition CauldronBlock.h:41
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:234
Definition Player.h:119
Definition Random.h:16
Definition Vec3.h:10
Definition optional_ref.h:10
Definition BlockAnimateTickData.h:5
Definition Brightness.h:8