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