LeviLamina
Loading...
Searching...
No Matches
BedrockSpawner.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/Spawner.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
12class BlockPos;
13class BlockSource;
14class ChunkPos;
16class ItemActor;
17class ItemStack;
19class Mob;
20class MobSpawnRules;
21class MobSpawnerData;
22class Random;
23class Randomize;
25class SpawnConditions;
27class Vec3;
29struct ActorUniqueID;
30struct MobSpawnHerdInfo;
31struct SpawnSettings;
32namespace br::spawn { class EntityTypeCache; }
33// clang-format on
34
35class BedrockSpawner : public ::Spawner {
36public:
37 // member variables
38 // NOLINTBEGIN
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 BedrockSpawner& operator=(BedrockSpawner const&);
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 // vIndex: 0
62 virtual ~BedrockSpawner() /*override*/ = default;
63
64 // vIndex: 1
65 virtual void initializeServerSide(::ResourcePackManager& rpm, ::IWorldRegistriesProvider& registries) /*override*/;
66
67 // vIndex: 2
68 virtual ::SpawnSettings const& getSpawnSettings() const /*override*/;
69
70 // vIndex: 3
71 virtual void setSpawnSettings(::SpawnSettings const& spawnSettings) /*override*/;
72
73 // vIndex: 4
74 virtual ::ActorSpawnRuleGroup const* getSpawnRules() const /*override*/;
75
76 // vIndex: 5
77 virtual ::ActorSpawnRuleGroup* getSpawnRulesMutable() const /*override*/;
78
79 // vIndex: 6
80 virtual ::SpawnGroupRegistry const* getSpawnGroupRegistry() const /*override*/;
81
82 // vIndex: 7
83 virtual ::br::spawn::EntityTypeCache* getEntityTypeCache() const /*override*/;
84
85 // vIndex: 9
86 virtual ::ItemActor* spawnItem(
87 ::BlockSource& region,
88 ::ItemStack const& inst,
89 ::Actor* spawner,
90 ::Vec3 const& pos,
91 int throwTime
92 ) /*override*/;
93
94 // vIndex: 11
95 virtual void postProcessSpawnMobs(::BlockSource& region, int xo, int zo, ::Random& random) /*override*/;
96
97 // vIndex: 12
98 virtual void tick(
99 ::BlockSource& region,
100 ::LevelChunkVolumeData const& levelChunkVolumeData,
101 ::ChunkPos const chunkPos
102 ) /*override*/;
103
104 // vIndex: 13
105 virtual void tickMobCount() /*override*/;
106
107 // vIndex: 14
108 virtual void incrementSpawnableTickedMob() /*override*/;
109
110 // vIndex: 15
111 virtual uint getSpawnableTickedMobCountPrevious() const /*override*/;
112
113 // vIndex: 16
114 virtual ::std::unordered_set<::ActorUniqueID> spawnMobGroup(
115 ::BlockSource& region,
116 ::std::string const& spawnGroupId,
117 ::Vec3 const& pos,
118 bool doScatter,
119 bool validateDistToPlayer,
120 ::std::function<void(::Mob&)>&& spawnedCallback
121 ) /*override*/;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
127 MCAPI int
128 _handlePopulationCap(::MobSpawnerData const* mobType, ::SpawnConditions const& conditions, int inSpawnCount);
129
130 MCAPI void _postProcessSpawnMobs(
131 ::BlockSource& region,
132 int xo,
133 int zo,
134 ::Randomize& randomize,
135 bool doMobSpawning,
136 ::std::function<void(::BlockPos const&, ::SpawnConditions&)> const& spawnMobClusterCallback,
137 ::std::function<bool(::BlockSource const&, ::BlockPos)> const& isInsideAncientCity
138 );
139
140 MCAPI void _sendHerdEvents(::MobSpawnHerdInfo const& herdInfo, ::std::vector<::Mob*>& spawnGroup) const;
141
142 MCAPI void _spawnMobCluster(::BlockSource& region, ::BlockPos const& pos, ::SpawnConditions& conditions);
143
144 MCAPI void _spawnMobInCluster(
145 ::BlockSource& region,
147 ::BlockPos const& pos,
148 ::SpawnConditions const& conditions,
149 ::std::vector<::Mob*>& spawnGroup
150 );
151
152 MCAPI void _updateBaseTypeCount(::BlockSource& region, ::ChunkPos const& center);
153
154 MCAPI void _updateGroupPersistence(::MobSpawnRules const& spawnRules, ::std::vector<::Mob*> const& spawnGroup);
155 // NOLINTEND
156
157public:
158 // static functions
159 // NOLINTBEGIN
160 MCAPI static bool _isInsideAncientCity(::BlockSource const& region, ::BlockPos pos);
161 // NOLINTEND
162
163public:
164 // static variables
165 // NOLINTBEGIN
166 MCAPI static ::std::unordered_set<::ChunkPos> const& SPAWN_RING_OFFSETS();
167 // NOLINTEND
168
169public:
170 // destructor thunk
171 // NOLINTBEGIN
172
173 // NOLINTEND
174
175public:
176 // virtual function thunks
177 // NOLINTBEGIN
178 MCAPI void $initializeServerSide(::ResourcePackManager& rpm, ::IWorldRegistriesProvider& registries);
179
180 MCFOLD ::SpawnSettings const& $getSpawnSettings() const;
181
182 MCAPI void $setSpawnSettings(::SpawnSettings const& spawnSettings);
183
184 MCFOLD ::ActorSpawnRuleGroup const* $getSpawnRules() const;
185
186 MCFOLD ::ActorSpawnRuleGroup* $getSpawnRulesMutable() const;
187
188 MCFOLD ::SpawnGroupRegistry const* $getSpawnGroupRegistry() const;
189
190 MCFOLD ::br::spawn::EntityTypeCache* $getEntityTypeCache() const;
191
192 MCAPI ::ItemActor*
193 $spawnItem(::BlockSource& region, ::ItemStack const& inst, ::Actor* spawner, ::Vec3 const& pos, int throwTime);
194
195 MCAPI void $postProcessSpawnMobs(::BlockSource& region, int xo, int zo, ::Random& random);
196
197 MCAPI void
198 $tick(::BlockSource& region, ::LevelChunkVolumeData const& levelChunkVolumeData, ::ChunkPos const chunkPos);
199
200 MCAPI void $tickMobCount();
201
202 MCAPI void $incrementSpawnableTickedMob();
203
204 MCAPI uint $getSpawnableTickedMobCountPrevious() const;
205
206 MCAPI ::std::unordered_set<::ActorUniqueID> $spawnMobGroup(
207 ::BlockSource& region,
208 ::std::string const& spawnGroupId,
209 ::Vec3 const& pos,
210 bool doScatter,
211 bool validateDistToPlayer,
212 ::std::function<void(::Mob&)>&& spawnedCallback
213 );
214 // NOLINTEND
215
216public:
217 // vftables
218 // NOLINTBEGIN
219 MCAPI static void** $vftable();
220 // NOLINTEND
221};
Definition ActorSpawnRuleGroup.h:17
Definition Actor.h:104
Definition BedrockSpawner.h:35
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition ChunkPos.h:11
Definition IWorldRegistriesProvider.h:26
Definition ItemActor.h:27
Definition ItemStack.h:25
Definition LevelChunkVolumeData.h:16
Definition MobSpawnRules.h:16
Definition MobSpawnerData.h:16
Definition Mob.h:47
Definition Random.h:16
Definition Randomize.h:13
Definition ResourcePackManager.h:24
Definition SpawnConditions.h:5
Definition SpawnGroupRegistry.h:15
Definition Spawner.h:39
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:13
Definition ActorUniqueID.h:5
Definition MobSpawnHerdInfo.h:5
Definition SpawnSettings.h:14
Definition Alias.h:14