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