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