LeviLamina
Loading...
Searching...
No Matches
CactusBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
13class Block;
14class BlockPos;
15class BlockSource;
18namespace BlockEvents { class BlockQueuedTickEvent; }
19namespace BlockEvents { class BlockRandomTickEvent; }
21// clang-format on
22
23class CactusBlock : public ::BlockType {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<1, 1, bool> mGrowCactusFlowers;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 CactusBlock();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ::AABB getCollisionShape(
38 ::Block const& pos,
40 ::BlockPos const&,
42 ) const /*override*/;
43
44 virtual ::AABB const&
45 getOutline(::Block const& pos, ::IConstBlockSource const& bufferValue, ::BlockPos const&, ::AABB&) const
46 /*override*/;
47
48 virtual void onGraphicsModeChanged(::BlockGraphicsModeChangeContext const& context) /*override*/;
49
50 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
51
52 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
53 /*override*/;
54
55 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
56
57 virtual bool isValidAuxValue(int value) const /*override*/;
58
59 virtual bool dealsContactDamage(::Actor const&, ::Block const&, bool) const /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI CactusBlock(::std::string const& nameId, int id, bool growCactusFlowers);
66
67 MCAPI bool _neighborsDestroy(::BlockSource& region, ::BlockPos const& pos) const;
68
69 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
70
71 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
72 // NOLINTEND
73
74public:
75 // constructor thunks
76 // NOLINTBEGIN
77 MCAPI void* $ctor(::std::string const& nameId, int id, bool growCactusFlowers);
78 // NOLINTEND
79
80public:
81 // virtual function thunks
82 // NOLINTBEGIN
83 MCAPI ::AABB $getCollisionShape(
84 ::Block const& pos,
86 ::BlockPos const&,
88 ) const;
89
90 MCFOLD ::AABB const&
91 $getOutline(::Block const& pos, ::IConstBlockSource const& bufferValue, ::BlockPos const&, ::AABB&) const;
92
93 MCAPI void $onGraphicsModeChanged(::BlockGraphicsModeChangeContext const& context);
94
95 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
96
97 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
98
99 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
100
101 MCFOLD bool $isValidAuxValue(int value) const;
102
103 MCFOLD bool $dealsContactDamage(::Actor const&, ::Block const&, bool) const;
104
105
106 // NOLINTEND
107
108public:
109 // vftables
110 // NOLINTBEGIN
111 MCAPI static void** $vftable();
112 // NOLINTEND
113};
Definition AABB.h:18
Definition Actor.h:125
Definition BlockQueuedTickEvent.h:18
Definition BlockRandomTickEvent.h:17
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition optional_ref.h:10
Definition BlockGraphicsModeChangeContext.h:5
Definition context.h:5