LeviLamina
Loading...
Searching...
No Matches
SaplingBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/FertilizerType.h"
7#include "mc/world/level/block/FoliageBlock.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Block;
13class BlockPos;
14class BlockSource;
15class Experiments;
16class Random;
17namespace BlockEvents { class BlockRandomTickEvent; }
18// clang-format on
19
20class SaplingBlock : public ::FoliageBlock {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mSingleSaplingTree;
25 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mSingleSaplingTreeWithBeehive;
26 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mQuadrupleSaplingTree;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 SaplingBlock();
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
37
38 virtual bool
39 onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fertilizerType) const
40 /*override*/;
41
42 virtual bool canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const
43 /*override*/;
44
45 virtual void _addHardCodedBlockComponents(::Experiments const& experiments) /*override*/;
46
47 virtual ~SaplingBlock() /*override*/;
48 // NOLINTEND
49
50public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI SaplingBlock(
54 ::std::string const& nameId,
55 int id,
56 ::std::optional<::std::string> singleSaplingTree,
57 ::std::optional<::std::string> singleSaplingTreeWithBeehive,
58 ::std::optional<::std::string> quadrupleSaplingTree
59 );
60
61 MCAPI bool _age(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
62
63 MCAPI ::std::optional<::BlockPos>
64 _getQuadrupleSaplingOffset(::BlockSource const& region, ::BlockPos const& pos) const;
65
66 MCAPI bool _placeFeature(
67 ::BlockSource& region,
68 ::BlockPos const& pos,
69 ::std::optional<::BlockPos> quadrupleSaplingOffset,
70 ::std::string const& featureName,
71 ::Random& random
72 ) const;
73
74 MCAPI bool _placeTree(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
75
76 MCAPI void _setBlockNoUpdate(
77 ::BlockSource& region,
78 ::BlockPos const& pos,
79 ::std::optional<::BlockPos> quadrupleSaplingOffset,
80 ::Block const& block
81 ) const;
82
83 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89 MCAPI void* $ctor(
90 ::std::string const& nameId,
91 int id,
92 ::std::optional<::std::string> singleSaplingTree,
93 ::std::optional<::std::string> singleSaplingTreeWithBeehive,
94 ::std::optional<::std::string> quadrupleSaplingTree
95 );
96 // NOLINTEND
97
98public:
99 // destructor thunk
100 // NOLINTBEGIN
101 MCAPI void $dtor();
102 // NOLINTEND
103
104public:
105 // virtual function thunks
106 // NOLINTBEGIN
107 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
108
109 MCAPI bool
110 $onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fertilizerType) const;
111
112 MCFOLD bool $canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const;
113
114 MCAPI void $_addHardCodedBlockComponents(::Experiments const& experiments);
115
116
117 // NOLINTEND
118
119public:
120 // vftables
121 // NOLINTBEGIN
122 MCAPI static void** $vftable();
123 // NOLINTEND
124};
Definition Actor.h:105
Definition BlockRandomTickEvent.h:16
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition Experiments.h:14
Definition FoliageBlock.h:23
Definition Random.h:10