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