LeviLamina
Loading...
Searching...
No Matches
GrassBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Color.h"
7#include "mc/world/item/FertilizerType.h"
8#include "mc/world/level/block/BlockType.h"
9#include "mc/world/level/levelgen/synth/PerlinSimplexNoise.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class Block;
15class BlockPos;
16class BlockSource;
17class Experiments;
18class ItemStack;
19class Randomize;
20struct Brightness;
21namespace BlockEvents { class BlockPlayerInteractEvent; }
22namespace BlockEvents { class BlockRandomTickEvent; }
23// clang-format on
24
25class GrassBlock : public ::BlockType {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 24, ::std::vector<::mce::Color>> mSideColors;
30 ::ll::TypedStorage<8, 40, ::PerlinSimplexNoise const> mBiomeInfoNoise;
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 GrassBlock();
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual bool
41 onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* entity, ::FertilizerType fType) const
42 /*override*/;
43
44 virtual bool canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const
45 /*override*/;
46
47 virtual int calcVariant(::BlockSource& region, ::BlockPos const& pos, ::mce::Color const& baseColor) const
48 /*override*/;
49
50 virtual bool canBeOriginalSurface(bool) const /*override*/;
51
52 virtual bool tryToTill(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity, ::ItemStack& item) const
53 /*override*/;
54
55 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
56
57 virtual ~GrassBlock() /*override*/ = default;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI GrassBlock(::std::string const& nameId, int id);
64
65 MCAPI bool _canBeGrass(::BlockSource const& region, ::BlockPos const& pos) const;
66
67 MCAPI bool _plantGrass(::BlockSource& region, ::BlockPos const& abovePos, ::Randomize& randomize) const;
68
69 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
70
71 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
72 // NOLINTEND
73
74public:
75 // static variables
76 // NOLINTBEGIN
77 MCAPI static ::Brightness const& MIN_BRIGHTNESS();
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCAPI void* $ctor(::std::string const& nameId, int id);
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI bool
90 $onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* entity, ::FertilizerType fType) const;
91
92 MCFOLD bool $canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const;
93
94 MCAPI int $calcVariant(::BlockSource& region, ::BlockPos const& pos, ::mce::Color const& baseColor) const;
95
96 MCFOLD bool $canBeOriginalSurface(bool) const;
97
98 MCAPI bool $tryToTill(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity, ::ItemStack& item) const;
99
100 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCNAPI static void** $vftable();
109 // NOLINTEND
110};
Definition Actor.h:105
Definition BlockPlayerInteractEvent.h:17
Definition BlockRandomTickEvent.h:16
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Block.h:43
Definition Experiments.h:14
static MCAPI void ** $vftable()
Definition ItemStack.h:26
Definition Randomize.h:13
Definition Color.h:13
Definition Brightness.h:8