LeviLamina
Loading...
Searching...
No Matches
IBlockSource.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/deps/vanilla_components/IConstBlockSource.h"
8#include "mc/world/actor/ActorType.h"
9#include "mc/world/level/BlockChangedEventTarget.h"
10#include "mc/world/level/ShapeType.h"
11
12// auto generated forward declare list
13// clang-format off
14class AABB;
15class Actor;
16class Block;
18class BlockPos;
19class BlockSource;
21class ChunkPos;
22class ChunkSource;
23class Dimension;
24class EntityContext;
25class GameEvent;
26class HitResult;
27class ItemStackBase;
28class Level;
29class LevelChunk;
30class LevelSeed64;
31class Vec3;
33struct ClipParameters;
34struct ILevel;
35// clang-format on
36
38public:
39 // IBlockSource inner types define
41
42 using ListenerVector = ::std::vector<::BlockSourceListener*>;
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 // vIndex: 25
48 virtual ::std::vector<::AABB>& fetchAABBs(::AABB const&, bool) = 0;
49
50 // vIndex: 26
51 virtual ::std::vector<::AABB>&
52 fetchCollisionShapes(::AABB const&, bool, ::std::optional<::EntityContext const>, ::std::vector<::AABB>*) = 0;
53
54 // vIndex: 27
55 virtual ::WeakRef<::BlockSource> getWeakRef() = 0;
56
57 // vIndex: 28
58 virtual void addListener(::BlockSourceListener&) = 0;
59
60 // vIndex: 29
61 virtual void removeListener(::BlockSourceListener&) = 0;
62
63 // vIndex: 31
64 virtual ::gsl::span<::gsl::not_null<::Actor*>> fetchEntities(::Actor const*, ::AABB const&, bool, bool) = 0;
65
66 // vIndex: 30
67 virtual ::gsl::span<::gsl::not_null<::Actor*>>
68 fetchEntities(::ActorType, ::AABB const&, ::Actor const*, ::std::function<bool(::Actor*)>) = 0;
69
70 // vIndex: 32
71 virtual bool
72 setBlock(::BlockPos const&, ::Block const&, int, ::ActorBlockSyncMessage const*, ::BlockChangeContext const&) = 0;
73
74 // vIndex: 33
75 virtual bool setExtraBlock(::BlockPos const&, ::Block const&, int) = 0;
76
77 // vIndex: 34
78 virtual bool removeBlock(::BlockPos const&, ::BlockChangeContext const&) = 0;
79
80 // vIndex: 35
81 virtual short getMinHeight() const = 0;
82
83 // vIndex: 36
84 virtual short getMaxHeight() const = 0;
85
86 // vIndex: 38
87 virtual ::Dimension& getDimension() const = 0;
88
89 // vIndex: 37
90 virtual ::Dimension& getDimension() = 0;
91
92 // vIndex: 39
93 virtual ::Dimension const& getDimensionConst() const = 0;
94
95 // vIndex: 40
96 virtual ::LevelChunk* getChunkAt(::BlockPos const&) const = 0;
97
98 // vIndex: 42
99 virtual ::LevelChunk* getChunk(int, int) const = 0;
100
101 // vIndex: 41
102 virtual ::LevelChunk* getChunk(::ChunkPos const&) const = 0;
103
104 // vIndex: 43
105 virtual ::Level& getLevel() = 0;
106
107 // vIndex: 44
108 virtual ::ILevel& getILevel() const = 0;
109
110 // vIndex: 45
111 virtual ::LevelSeed64 getLevelSeed64() const = 0;
112
113 // vIndex: 47
114 virtual short getAboveTopSolidBlock(int, int, bool, bool) const = 0;
115
116 // vIndex: 46
117 virtual short getAboveTopSolidBlock(::BlockPos const&, bool, bool, bool) const = 0;
118
119 // vIndex: 49
120 virtual short getHeight(::std::function<bool(::Block const&)> const&, ::BlockPos const&) const = 0;
121
122 // vIndex: 48
123 virtual short getHeight(::std::function<bool(::Block const&)> const&, int, int) const = 0;
124
125 // vIndex: 51
126 virtual ::HitResult clip(
127 ::Vec3 const&,
128 ::Vec3 const&,
129 bool,
130 ::ShapeType,
131 int,
132 bool,
133 bool,
134 ::Actor*,
135 ::std::function<bool(::BlockSource const&, ::Block const&, bool)> const&,
136 bool
137 ) const = 0;
138
139 // vIndex: 50
140 virtual ::HitResult clip(::ClipParameters const&) const = 0;
141
142 // vIndex: 52
143 virtual ::ChunkSource& getChunkSource() = 0;
144
145 // vIndex: 54
146 virtual bool isSolidBlockingBlock(::BlockPos const&) const = 0;
147
148 // vIndex: 53
149 virtual bool isSolidBlockingBlock(int, int, int) const = 0;
150
151 // vIndex: 55
152 virtual bool areChunksFullyLoaded(::BlockPos const&, int) const = 0;
153
154 // vIndex: 56
155 virtual bool mayPlace(::Block const&, ::BlockPos const&, uchar, ::Actor*, bool, ::Vec3) = 0;
156
157 // vIndex: 57
158 virtual bool canDoBlockDrops() const = 0;
159
160 // vIndex: 58
161 virtual bool canDoContainedItemDrops() const = 0;
162
163 // vIndex: 59
164 virtual bool isInstaticking(::BlockPos const&) const = 0;
165
166 // vIndex: 60
167 virtual bool checkBlockPermissions(::Actor&, ::BlockPos const&, uchar, ::ItemStackBase const&, bool) = 0;
168
169 // vIndex: 61
170 virtual void postGameEvent(::Actor*, ::GameEvent const&, ::BlockPos const&, ::Block const*) = 0;
171
172 // vIndex: 62
173 virtual void fireBlockChanged(
174 ::BlockPos const&,
175 uint,
176 ::Block const&,
177 ::Block const&,
178 int,
179 ::BlockChangedEventTarget,
181 ::Actor*
182 ) = 0;
183
184 // vIndex: 63
185 virtual void blockEvent(::BlockPos const&, int, int) = 0;
186
187 // vIndex: 0
188 virtual ~IBlockSource() /*override*/ = default;
189 // NOLINTEND
190
191public:
192 // virtual function thunks
193 // NOLINTBEGIN
194
195 // NOLINTEND
196};
Definition AABB.h:15
Definition Actor.h:102
Definition BlockChangeContext.h:10
Definition BlockPos.h:14
Definition BlockSourceListener.h:18
Definition BlockSource.h:63
Definition Block.h:45
Definition ChunkPos.h:11
Definition ChunkSource.h:37
Definition Dimension.h:85
Definition EntityContext.h:15
Definition GameEvent.h:8
Definition HitResult.h:17
Definition IBlockSource.h:37
Definition IConstBlockSource.h:25
Definition ItemStackBase.h:38
Definition LevelChunk.h:77
Definition LevelSeed64.h:5
Definition Level.h:246
Definition Vec3.h:10
Definition ActorBlockSyncMessage.h:8
Definition ClipParameters.h:16
Definition ILevel.h:5