LeviLamina
Loading...
Searching...
No Matches
VineBlock.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;
18class Vec3;
19namespace BlockEvents { class BlockQueuedTickEvent; }
20namespace BlockEvents { class BlockRandomTickEvent; }
21// clang-format on
22
23class VineBlock : public ::BlockType {
24public:
25 // prevent constructor by default
26 VineBlock();
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ::AABB const& getVisualShapeInWorld(
32 ::Block const& block,
33 ::IConstBlockSource const& region,
34 ::BlockPos const& pos,
35 ::AABB& bufferAABB
36 ) const /*override*/;
37
38 virtual ::AABB getCollisionShape(
39 ::Block const&,
41 ::BlockPos const&,
43 ) const /*override*/;
44
45 virtual ::AABB const& getOutline(
46 ::Block const& block,
47 ::IConstBlockSource const& region,
48 ::BlockPos const& pos,
49 ::AABB& bufferValue
50 ) const /*override*/;
51
52 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
53
54 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
55 /*override*/;
56
57 virtual ::Block const&
58 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
59 /*override*/;
60
61 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
62
63 virtual ::Block const& sanitizeFillBlock(::Block const& block) const /*override*/;
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69 MCAPI VineBlock(::std::string const& nameId, int id);
70
71 MCAPI int _nextVineDirections(::BlockSource& region, ::BlockPos const& pos) const;
72
73 MCAPI void growDown(::BlockSource& region, ::BlockPos const& pos, int spawnFacings) const;
74
75 MCAPI void growSideways(::BlockSource& region, ::BlockPos const& pos, int testDirection) const;
76
77 MCAPI void growUp(::BlockSource& region, ::BlockPos const& pos, int spawnFacings) const;
78
79 MCAPI void randomTick(::BlockEvents::BlockRandomTickEvent& eventData) const;
80
81 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
82 // NOLINTEND
83
84public:
85 // static functions
86 // NOLINTBEGIN
87#ifdef LL_PLAT_C
88 MCAPI static bool directionsContainFace(int vineDirections, uchar face);
89#endif
90
91 MCAPI static ::Block const& getBlockForFace(uchar face);
92
93 MCAPI static bool isAcceptableNeighbour(::Block const& block);
94 // NOLINTEND
95
96public:
97 // static variables
98 // NOLINTBEGIN
99 MCAPI static int const& VINE_ALL();
100
101 MCAPI static int const& VINE_EAST();
102
103 MCAPI static int const& VINE_NORTH();
104
105 MCAPI static int const& VINE_SOUTH();
106
107 MCAPI static int const& VINE_WEST();
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(::std::string const& nameId, int id);
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI ::AABB const& $getVisualShapeInWorld(
120 ::Block const& block,
121 ::IConstBlockSource const& region,
122 ::BlockPos const& pos,
123 ::AABB& bufferAABB
124 ) const;
125
126 MCFOLD ::AABB $getCollisionShape(
127 ::Block const&,
128 ::IConstBlockSource const&,
129 ::BlockPos const&,
131 ) const;
132
133 MCFOLD ::AABB const& $getOutline(
134 ::Block const& block,
135 ::IConstBlockSource const& region,
136 ::BlockPos const& pos,
137 ::AABB& bufferValue
138 ) const;
139
140 MCAPI bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
141
142 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
143
144 MCAPI ::Block const& $getPlacementBlock(
145 ::Actor const& by,
146 ::BlockPos const& pos,
147 uchar face,
148 ::Vec3 const& clickPos,
149 int itemValue
150 ) const;
151
152 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
153
154 MCAPI ::Block const& $sanitizeFillBlock(::Block const& block) const;
155
156
157 // NOLINTEND
158
159public:
160 // vftables
161 // NOLINTBEGIN
162 MCAPI static void** $vftable();
163 // NOLINTEND
164};
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 Vec3.h:10
Definition optional_ref.h:10