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