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