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