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
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 // vIndex: 132
48 virtual void onRemove(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
49
50 // vIndex: 62
51 virtual void onMove(::BlockSource& region, ::BlockPos const& from, ::BlockPos const& to) const /*override*/;
52
53 // vIndex: 105
54 virtual bool hasComparatorSignal() const /*override*/;
55
56 // vIndex: 106
57 virtual int getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const
58 /*override*/;
59
60 // vIndex: 4
61 virtual ::HitResult clip(
62 ::Block const& block,
63 ::BlockSource const& region,
64 ::BlockPos const& pos,
65 ::Vec3 const& A,
66 ::Vec3 const& B,
67 ::ShapeType shapeType,
69 ) const /*override*/;
70
71 // vIndex: 7
72 virtual bool addCollisionShapes(
73 ::Block const& block,
74 ::IConstBlockSource const& region,
75 ::BlockPos const& pos,
76 ::AABB const* intersectTestBox,
77 ::std::vector<::AABB>& inoutBoxes,
79 ) const /*override*/;
80
81 // vIndex: 8
82 virtual void addAABBs(
83 ::Block const& block,
84 ::IConstBlockSource const& region,
85 ::BlockPos const& pos,
86 ::AABB const* intersectTestBox,
87 ::std::vector<::AABB>& inoutBoxes
88 ) const /*override*/;
89
90 // vIndex: 22
91 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const /*override*/;
92
93 // vIndex: 118
94 virtual int getVariant(::Block const& block) const /*override*/;
95
96 // vIndex: 84
97 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
98
99 // vIndex: 131
100 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
101
102 // vIndex: 0
103 virtual ~ComposterBlock() /*override*/ = default;
104 // NOLINTEND
105
106public:
107 // member functions
108 // NOLINTBEGIN
109 MCAPI void _emitBoneMeal(::Level&, ::BlockSource& region, ::BlockPos const& pos) const;
110
111 MCAPI void _notifyClientComposterUsed(
112 ::Player const& player,
113 short itemId,
114 ::MinecraftEventing::POIBlockInteractionType interactionType
115 ) const;
116
117 MCAPI void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
118
119 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
120
121 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
122 // NOLINTEND
123
124public:
125 // static functions
126 // NOLINTBEGIN
127 MCAPI static ::std::unordered_map<uint64, schar> const& _getCompostableItems();
128
129 MCAPI static bool addItems(
130 ::Container& fromContainer,
131 int slot,
132 ::ItemStack& item,
133 int amount,
134 ::BlockSource& region,
135 ::Block const& block,
136 ::BlockPos const& pos
137 );
138
139 MCAPI static int
140 addItems(::ItemStack const& item, int amount, ::BlockSource& region, ::Block const& block, ::BlockPos const& pos);
141
142 MCAPI static void empty(::BlockSource& region, ::Block const& composter, ::BlockPos const& pos);
143
144 MCAPI static schar getFillChance(::ItemStackBase const& item);
145 // NOLINTEND
146
147public:
148 // static variables
149 // NOLINTBEGIN
150 MCAPI static ::BaseGameVersion const& COMPOSTER_DOESNT_BREAK_FALLING_BLOCK_VERSION();
151
152 MCAPI static ::Vec3 const& PARTICLE_OFFSET();
153 // NOLINTEND
154
155public:
156 // virtual function thunks
157 // NOLINTBEGIN
158 MCAPI void $onRemove(::BlockSource& region, ::BlockPos const& pos) const;
159
160 MCAPI void $onMove(::BlockSource& region, ::BlockPos const& from, ::BlockPos const& to) const;
161
162 MCFOLD bool $hasComparatorSignal() const;
163
164 MCAPI int $getComparatorSignal(::BlockSource& region, ::BlockPos const& pos, ::Block const& block, uchar dir) const;
165
166 MCFOLD bool $addCollisionShapes(
167 ::Block const& block,
168 ::IConstBlockSource const& region,
169 ::BlockPos const& pos,
170 ::AABB const* intersectTestBox,
171 ::std::vector<::AABB>& inoutBoxes,
173 ) const;
174
175 MCAPI void $addAABBs(
176 ::Block const& block,
177 ::IConstBlockSource const& region,
178 ::BlockPos const& pos,
179 ::AABB const* intersectTestBox,
180 ::std::vector<::AABB>& inoutBoxes
181 ) const;
182
183 MCAPI bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
184
185 MCFOLD int $getVariant(::Block const& block) const;
186
187 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
188
189 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
190 // NOLINTEND
191
192public:
193 // vftables
194 // NOLINTBEGIN
195 MCNAPI static void** $vftable();
196 // NOLINTEND
197};
Definition AABB.h:18
Definition BaseGameVersion.h:8
Definition BlockPlaceEvent.h:16
Definition BlockPlayerInteractEvent.h:17
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition BlockType.h:84
Definition Block.h:37
Definition ComposterBlock.h:34
static MCAPI void ** $vftable()
Definition Container.h:31
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:17
Definition IConstBlockSource.h:24
Definition ItemStackBase.h:34
Definition ItemStack.h:23
Definition Level.h:243
Definition Player.h:123
Definition Vec3.h:10
Definition optional_ref.h:10