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