LeviLamina
Loading...
Searching...
No Matches
ComposterBlock.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/events/MinecraftEventing.h"
8#include "mc/world/level/ShapeType.h"
9#include "mc/world/level/block/BlockSupportType.h"
10#include "mc/world/level/block/BlockType.h"
11
12// auto generated forward declare list
13// clang-format off
14class AABB;
15class BaseGameVersion;
16class Block;
17class BlockPos;
18class BlockSource;
19class Container;
20class Experiments;
22class HitResult;
24class ItemStack;
25class ItemStackBase;
26class Level;
27class Player;
28class Vec3;
29namespace BlockEvents { class BlockPlaceEvent; }
30namespace BlockEvents { class BlockPlayerInteractEvent; }
31namespace BlockEvents { class BlockQueuedTickEvent; }
32// clang-format on
33
34class ComposterBlock : public ::BlockType {
35public:
36 // ComposterBlock inner types define
37 enum class FillLevel : int {
38 Min = 0,
39 Max = 7,
40 Ready = 8,
41 Count = 9,
42 };
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
48
49 virtual void onMove(::BlockSource& region, ::BlockPos const& from, ::BlockPos const& to) const /*override*/;
50
51 virtual bool hasComparatorSignal() const /*override*/;
52
53 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
54 /*override*/;
55
56 virtual ::HitResult clip(
57 ::Block const& block,
58 ::BlockSource const& region,
59 ::BlockPos const& pos,
60 ::Vec3 const& A,
61 ::Vec3 const& B,
62 ::ShapeType,
64 ) const /*override*/;
65
66 virtual bool addCollisionShapes(
67 ::Block const& block,
68 ::IConstBlockSource const& region,
69 ::BlockPos const& pos,
70 ::AABB const* intersectTestBox,
71 ::std::vector<::AABB>& inoutBoxes,
73 ) const /*override*/;
74
75 virtual void addAABBs(
76 ::Block const& block,
77 ::IConstBlockSource const& region,
78 ::BlockPos const& pos,
79 ::AABB const* intersectTestBox,
80 ::std::vector<::AABB>& inoutBoxes
81 ) const /*override*/;
82
83 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const /*override*/;
84
85 virtual int getVariant(::Block const& block) const /*override*/;
86
87 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
88
89 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
90
91 virtual ~ComposterBlock() /*override*/ = default;
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCAPI void _emitBoneMeal(::Level&, ::BlockSource& region, ::BlockPos const& pos) const;
98
99 MCAPI void _notifyClientComposterUsed(
100 ::Player const& player,
101 short itemId,
102 ::MinecraftEventing::POIBlockInteractionType interactionType
103 ) const;
104
105 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
106
107 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
108
109 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
110 // NOLINTEND
111
112public:
113 // static functions
114 // NOLINTBEGIN
115 MCAPI static ::std::unordered_map<uint64, schar> const& _getCompostableItems();
116
117 MCAPI static bool addItems(
118 ::Container& fromContainer,
119 int slot,
120 ::ItemStack& item,
121 int amount,
122 ::BlockSource& region,
123 ::Block const& block,
124 ::BlockPos const& pos
125 );
126
127 MCAPI static int
128 addItems(::ItemStack const& item, int amount, ::BlockSource& region, ::Block const& block, ::BlockPos const& pos);
129
130 MCAPI static void empty(::BlockSource& region, ::Block const& composter, ::BlockPos const& pos);
131
132 MCAPI static schar getFillChance(::ItemStackBase const& item);
133 // NOLINTEND
134
135public:
136 // static variables
137 // NOLINTBEGIN
138 MCAPI static ::BaseGameVersion const& COMPOSTER_DOESNT_BREAK_FALLING_BLOCK_VERSION();
139 // NOLINTEND
140
141public:
142 // virtual function thunks
143 // NOLINTBEGIN
144 MCAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
145
146 MCAPI void $onMove(::BlockSource& region, ::BlockPos const& from, ::BlockPos const& to) const;
147
148 MCFOLD bool $hasComparatorSignal() const;
149
150 MCAPI int $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
151
152 MCFOLD bool $addCollisionShapes(
153 ::Block const& block,
154 ::IConstBlockSource const& region,
155 ::BlockPos const& pos,
156 ::AABB const* intersectTestBox,
157 ::std::vector<::AABB>& inoutBoxes,
159 ) const;
160
161 MCAPI void $addAABBs(
162 ::Block const& block,
163 ::IConstBlockSource const& region,
164 ::BlockPos const& pos,
165 ::AABB const* intersectTestBox,
166 ::std::vector<::AABB>& inoutBoxes
167 ) const;
168
169#ifdef LL_PLAT_S
170 MCAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
171#endif
172
173 MCFOLD int $getVariant(::Block const& block) const;
174
175 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
176
177 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
178
179#ifdef LL_PLAT_C
180 MCFOLD ::HitResult $clip(
181 ::Block const& block,
182 ::BlockSource const& region,
183 ::BlockPos const& pos,
184 ::Vec3 const& A,
185 ::Vec3 const& B,
186 ::ShapeType,
188 ) const;
189#endif
190
191
192 // NOLINTEND
193
194public:
195 // vftables
196 // NOLINTBEGIN
197 MCAPI static void** $vftable();
198 // NOLINTEND
199};
Definition AABB.h:18
Definition BaseGameVersion.h:8
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:17
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition Block.h:43
Definition ComposterBlock.h:34
Definition Container.h:33
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:17
Definition IConstBlockSource.h:25
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Level.h:250
Definition Player.h:129
Definition Vec3.h:10
Definition optional_ref.h:10