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 Random;
16namespace BlockEvents { class BlockRandomTickEvent; }
17// clang-format on
18
19class SaplingBlock : public ::FoliageBlock {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mSingleSaplingTree;
24 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mSingleSaplingTreeWithBeehive;
25 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mQuadrupleSaplingTree;
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 SaplingBlock();
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
36
37 virtual bool
38 onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fertilizerType) const
39 /*override*/;
40
41 virtual bool canBeFertilized(::BlockSource&, ::BlockPos const&, ::Block const&) const /*override*/;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI SaplingBlock(
48 ::std::string const& nameId,
49 int id,
50 ::std::optional<::std::string> singleSaplingTree,
51 ::std::optional<::std::string> singleSaplingTreeWithBeehive,
52 ::std::optional<::std::string> quadrupleSaplingTree
53 );
54
55 MCAPI bool _age(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
56
57 MCAPI ::std::optional<::BlockPos>
58 _getQuadrupleSaplingOffset(::BlockSource const& region, ::BlockPos const& pos) const;
59
60 MCAPI bool _placeFeature(
61 ::BlockSource& region,
62 ::BlockPos const& pos,
63 ::std::optional<::BlockPos> quadrupleSaplingOffset,
64 ::std::string const& featureName,
65 ::Random& random
66 ) const;
67
68 MCAPI bool _placeTree(::BlockSource& region, ::BlockPos const& pos, ::Random& random) const;
69
70 MCAPI void _setBlockNoUpdate(
71 ::BlockSource& region,
72 ::BlockPos const& pos,
73 ::std::optional<::BlockPos> quadrupleSaplingOffset,
74 ::Block const& block
75 ) const;
76
77 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCAPI void* $ctor(
84 ::std::string const& nameId,
85 int id,
86 ::std::optional<::std::string> singleSaplingTree,
87 ::std::optional<::std::string> singleSaplingTreeWithBeehive,
88 ::std::optional<::std::string> quadrupleSaplingTree
89 );
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCFOLD bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
96
97 MCAPI bool
98 $onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* actor, ::FertilizerType fertilizerType) const;
99
100 MCFOLD bool $canBeFertilized(::BlockSource&, ::BlockPos const&, ::Block const&) const;
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCAPI static void** $vftable();
109 // NOLINTEND
110};
Definition Actor.h:125
Definition BlockRandomTickEvent.h:17
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition Random.h:10