LeviLamina
Loading...
Searching...
No Matches
WallBlock.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/ShapeType.h"
8#include "mc/world/level/block/BlockLegacy.h"
9#include "mc/world/level/block/BlockSupportType.h"
10#include "mc/world/level/block/WallConnectionType.h"
11
12// auto generated forward declare list
13// clang-format off
14class AABB;
15class Actor;
16class BaseGameVersion;
17class Block;
18class BlockPos;
19class BlockSource;
20class Experiments;
22class HitResult;
24class Vec3;
25namespace BlockEvents { class BlockPlaceEvent; }
26namespace BlockEvents { class BlockQueuedTickEvent; }
27// clang-format on
28
29class WallBlock : public ::BlockLegacy {
30public:
31 // virtual functions
32 // NOLINTBEGIN
33 // vIndex: 91
34 virtual ::Block const&
35 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
36 /*override*/;
37
38 // vIndex: 64
39 virtual void onStructureBlockPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
40
41 // vIndex: 65
42 virtual void onStructureNeighborBlockPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
43
44 // vIndex: 86
45 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
46 /*override*/;
47
48 // vIndex: 10
49 virtual ::AABB const&
50 getVisualShapeInWorld(::Block const& block, ::IConstBlockSource const&, ::BlockPos const&, ::AABB& bufferAABB) const
51 /*override*/;
52
53 // vIndex: 5
54 virtual ::AABB getCollisionShape(
55 ::Block const& block,
56 ::IConstBlockSource const& region,
57 ::BlockPos const& pos,
59 ) const /*override*/;
60
61 // vIndex: 9
62 virtual ::AABB const& getOutline(
63 ::Block const& block,
64 ::IConstBlockSource const& region,
65 ::BlockPos const& pos,
66 ::AABB& bufferValue
67 ) const /*override*/;
68
69 // vIndex: 22
70 virtual bool canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const /*override*/;
71
72 // vIndex: 24
73 virtual bool canConnect(::Block const& otherBlock, uchar, ::Block const&) const /*override*/;
74
75 // vIndex: 13
76 virtual bool
77 getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const
78 /*override*/;
79
80 // vIndex: 34
81 virtual bool isWallBlock() const /*override*/;
82
83 // vIndex: 83
84 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
85
86 // vIndex: 4
87 virtual ::HitResult clip(
88 ::Block const& block,
89 ::BlockSource const& region,
90 ::BlockPos const& pos,
91 ::Vec3 const& A,
92 ::Vec3 const& B,
93 ::ShapeType shapeType,
95 ) const /*override*/;
96
97 // vIndex: 130
98 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
99
100 // vIndex: 0
101 virtual ~WallBlock() /*override*/ = default;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI ::WallConnectionType
108 _desiredConnectionState(::BlockSource& region, ::BlockPos const& pos, uchar neighbor) const;
109
110 MCAPI bool _isCovered(::BlockSource& region, ::BlockPos const& pos, ::AABB const& testAABB) const;
111
112 MCAPI bool _shouldBePost(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
113
114 MCAPI bool _shouldUpdateConnectionStates(::BlockSource& region, ::BlockPos const& pos) const;
115
116 MCAPI bool _tryAddToTickingQueue(::BlockSource& region, ::BlockPos const& pos) const;
117
118 MCAPI void onPlaceBase(::BlockEvents::BlockPlaceEvent& eventData) const;
119
120 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
121
122 MCAPI void tryFixWallStates(::BlockSource& region, ::BlockPos const& pos, int updateFlags) const;
123 // NOLINTEND
124
125public:
126 // static variables
127 // NOLINTBEGIN
128 MCAPI static float const& POST_HEIGHT();
129
130 MCAPI static ::BaseGameVersion const& WALL_DOESNT_BREAK_FALLING_BLOCK_VERSION();
131 // NOLINTEND
132
133public:
134 // virtual function thunks
135 // NOLINTBEGIN
136 MCAPI ::Block const& $getPlacementBlock(
137 ::Actor const& by,
138 ::BlockPos const& pos,
139 uchar face,
140 ::Vec3 const& clickPos,
141 int itemValue
142 ) const;
143
144 MCFOLD void $onStructureBlockPlace(::BlockSource& region, ::BlockPos const& pos) const;
145
146 MCAPI void $onStructureNeighborBlockPlace(::BlockSource& region, ::BlockPos const& pos) const;
147
148 MCFOLD void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
149
150 MCAPI ::AABB const& $getVisualShapeInWorld(
151 ::Block const& block,
152 ::IConstBlockSource const&,
153 ::BlockPos const&,
154 ::AABB& bufferAABB
155 ) const;
156
157 MCAPI ::AABB $getCollisionShape(
158 ::Block const& block,
159 ::IConstBlockSource const& region,
160 ::BlockPos const& pos,
162 ) const;
163
164 MCFOLD ::AABB const& $getOutline(
165 ::Block const& block,
166 ::IConstBlockSource const& region,
167 ::BlockPos const& pos,
168 ::AABB& bufferValue
169 ) const;
170
171 MCFOLD bool $canProvideSupport(::Block const&, uchar face, ::BlockSupportType type) const;
172
173 MCFOLD bool $canConnect(::Block const& otherBlock, uchar, ::Block const&) const;
174
175 MCFOLD bool
176 $getLiquidClipVolume(::Block const& block, ::BlockSource& region, ::BlockPos const& pos, ::AABB& includeBox) const;
177
178 MCFOLD bool $isWallBlock() const;
179
180 MCAPI bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
181
182 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
183 // NOLINTEND
184
185public:
186 // vftables
187 // NOLINTBEGIN
188 MCNAPI static void** $vftable();
189 // NOLINTEND
190};
Definition AABB.h:18
Definition Actor.h:103
Definition BaseGameVersion.h:8
Definition BlockPlaceEvent.h:16
Definition BlockQueuedTickEvent.h:16
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition HitResult.h:19
Definition IConstBlockSource.h:24
Definition Vec3.h:10
Definition WallBlock.h:29
static MCAPI void ** $vftable()
Definition optional_ref.h:10