LeviLamina
Loading...
Searching...
No Matches
GrassBlockBase.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/BlockDescriptor.h"
8#include "mc/world/level/block/BlockType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class Block;
14class BlockPos;
15class BlockSource;
16class IRandom;
17class ItemStack;
18namespace BlockEvents { class BlockPlayerInteractEvent; }
19namespace BlockEvents { class BlockRandomTickEvent; }
20// clang-format on
21
22class GrassBlockBase : public ::BlockType {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 176, ::BlockDescriptor const> mTillsIntoBlock;
27 ::ll::TypedStorage<8, 176, ::BlockDescriptor const> mGrowsOnBlock;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 GrassBlockBase();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual bool
38 onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* entity, ::FertilizerType fType) const
39 /*override*/;
40
41 virtual bool canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const
42 /*override*/;
43
44 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
45
46 virtual bool canBeOriginalSurface(bool) const /*override*/;
47
48 virtual bool tryToTill(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity, ::ItemStack& item) const
49 /*override*/;
50
51 virtual bool _plantGrass(::BlockSource& region, ::BlockPos const& abovePos, ::IRandom& random) const = 0;
52
53 virtual bool _shouldStopRandomWalk(::BlockSource& region, ::BlockPos& pos) const = 0;
54
55 virtual ~GrassBlockBase() /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI GrassBlockBase(
62 ::std::string const& nameId,
63 int id,
64 ::BlockDescriptor tillsIntoBlock,
65 ::BlockDescriptor growsOnBlock
66 );
67
68 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
69
70 MCFOLD void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
71 // NOLINTEND
72
73public:
74 // static functions
75 // NOLINTBEGIN
76 MCAPI static bool _canBeGrass(::BlockSource const& region, ::BlockPos const& pos);
77 // NOLINTEND
78
79public:
80 // constructor thunks
81 // NOLINTBEGIN
82 MCAPI void*
83 $ctor(::std::string const& nameId, int id, ::BlockDescriptor tillsIntoBlock, ::BlockDescriptor growsOnBlock);
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCAPI void $dtor();
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCAPI bool
96 $onFertilized(::BlockSource& region, ::BlockPos const& pos, ::Actor* entity, ::FertilizerType fType) const;
97
98 MCFOLD bool $canBeFertilized(::BlockSource& region, ::BlockPos const& pos, ::Block const& aboveBlock) const;
99
100 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
101
102 MCFOLD bool $canBeOriginalSurface(bool) const;
103
104 MCAPI bool $tryToTill(::BlockSource& region, ::BlockPos const& pos, ::Actor& entity, ::ItemStack& item) const;
105
106
107 // NOLINTEND
108
109public:
110 // vftables
111 // NOLINTBEGIN
112 MCNAPI static void** $vftable();
113 // NOLINTEND
114};
Definition Actor.h:113
Definition BlockDescriptor.h:21
Definition BlockPlayerInteractEvent.h:18
Definition BlockRandomTickEvent.h:16
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Block.h:41
static MCAPI void ** $vftable()
Definition IRandom.h:10
Definition ItemStack.h:26