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