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