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 MCAPI_C ::Actor* createAndAddDisplayEntity(::BlockSource& region);
68
69 MCAPI void removeDisplayEntity();
70
71 MCAPI void setEntityId(::ActorDefinitionIdentifier actorDefId);
72
73 MCAPI_C ::Mob* tryGetOrCreateDisplayEntity(::BlockSource& region);
74 // NOLINTEND
75
76public:
77 // constructor thunks
78 // NOLINTBEGIN
79 MCAPI void* $ctor(::ActorDefinitionIdentifier actorDefId);
80 // NOLINTEND
81
82public:
83 // virtual function thunks
84 // NOLINTBEGIN
85 MCAPI void $tick(::BlockSource& source);
86
87 MCAPI void $load(::CompoundTag const& data);
88
89 MCAPI void $save(::CompoundTag& tag);
90
91
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
97 MCAPI static void** $vftable();
98 // NOLINTEND
99};
Definition Actor.h:105
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition Mob.h:50
Definition SpawnData.h:15
Definition ActorDefinitionIdentifier.h:15