LeviLamina
Loading...
Searching...
No Matches
BaseMobSpawner.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/ecs/WeakEntityRef.h"
7#include "mc/world/actor/ActorDefinitionIdentifier.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class BlockPos;
13class BlockSource;
14class CompoundTag;
15class Mob;
16class SpawnData;
17// clang-format on
18
19class BaseMobSpawner {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<4, 4, int> mSpawnDelay;
24 ::ll::TypedStorage<4, 4, float> mSpin;
25 ::ll::TypedStorage<4, 4, float> mOSpin;
26 ::ll::TypedStorage<8, 176, ::ActorDefinitionIdentifier> mActorDefId;
27 ::ll::TypedStorage<8, 24, ::std::vector<::SpawnData>> mSpawnPotentials;
28 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SpawnData>> mNextSpawnData;
29 ::ll::TypedStorage<4, 4, int> mMinSpawnDelay;
30 ::ll::TypedStorage<4, 4, int> mMaxSpawnDelay;
31 ::ll::TypedStorage<4, 4, int> mSpawnCount;
32 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mDisplayEntity;
33 ::ll::TypedStorage<4, 4, int> mMaxNearbyEntities;
34 ::ll::TypedStorage<4, 4, int> mRequiredPlayerRange;
35 ::ll::TypedStorage<4, 4, int> mSpawnRange;
36 ::ll::TypedStorage<1, 1, bool> mActive;
37 ::ll::TypedStorage<4, 4, float> mDisplayEntityWidth;
38 ::ll::TypedStorage<4, 4, float> mDisplayEntityHeight;
39 ::ll::TypedStorage<4, 4, float> mDisplayEntityScale;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 BaseMobSpawner();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual ~BaseMobSpawner() = default;
50
51 virtual void tick(::BlockSource& source);
52
53 virtual void load(::CompoundTag const& data);
54
55 virtual void save(::CompoundTag& tag);
56
57 virtual ::BlockPos const& getPos() = 0;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI explicit BaseMobSpawner(::ActorDefinitionIdentifier actorDefId);
64
65 MCAPI void _delay(::BlockSource& source);
66
67#ifdef LL_PLAT_C
68 MCAPI ::Actor* createAndAddDisplayEntity(::BlockSource& region);
69#endif
70
71 MCAPI void removeDisplayEntity();
72
73 MCAPI void setEntityId(::ActorDefinitionIdentifier actorDefId);
74
75#ifdef LL_PLAT_C
76 MCAPI ::Mob* tryGetOrCreateDisplayEntity(::BlockSource& region);
77#endif
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCAPI void* $ctor(::ActorDefinitionIdentifier actorDefId);
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $tick(::BlockSource& source);
90
91 MCAPI void $load(::CompoundTag const& data);
92
93 MCAPI void $save(::CompoundTag& tag);
94
95
96 // NOLINTEND
97
98public:
99 // vftables
100 // NOLINTBEGIN
101 MCAPI static void** $vftable();
102 // NOLINTEND
103};
Definition Actor.h:106
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition Mob.h:51
Definition SpawnData.h:15
Definition ActorDefinitionIdentifier.h:15