LeviLamina
Loading...
Searching...
No Matches
WanderingTraderScheduler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class BlockPos;
12class BlockSource;
13class Level;
14// clang-format on
15
16class WanderingTraderScheduler {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
21 ::ll::TypedStorage<8, 8, uint64> mTickToCheckIfSpawning;
22 ::ll::TypedStorage<1, 1, bool> mSpawnWanderingTrader;
23 ::ll::TypedStorage<4, 4, int> mDaysSinceLastSpawn;
24 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mWanderingTraderUUID;
25 // NOLINTEND
26
27public:
28 // prevent constructor by default
29 WanderingTraderScheduler& operator=(WanderingTraderScheduler const&);
30 WanderingTraderScheduler(WanderingTraderScheduler const&);
31 WanderingTraderScheduler();
32
33public:
34 // member functions
35 // NOLINTBEGIN
36 MCAPI bool _canSpawnAtPosition(::BlockPos const& pos, ::BlockSource& region) const;
37
38 MCAPI bool _canWanderingTraderBeMoved() const;
39
40 MCAPI ::std::optional<::BlockPos> _findValidSpawnPosUnder(::BlockPos const& pos, ::BlockSource& region) const;
41
42 MCAPI ::Actor* _getRandomPlayerInOverworld() const;
43
44 MCAPI ::std::optional<::BlockPos>
45 _getSpawnPosFromNearestVillageToPlayerPos(::BlockPos const& playerPos, ::BlockSource& region);
46
47 MCAPI void _spawnWanderingTraderAtPos(::BlockPos const& pos, ::BlockSource& region);
48
49 MCAPI void readSaveData();
50
51 MCAPI void tick();
52
53 MCAPI void writeSaveData() const;
54 // NOLINTEND
55
56public:
57 // static variables
58 // NOLINTBEGIN
59 MCAPI static ::std::vector<float> const& CHANCE_TO_SPAWN_PER_DAY();
60 // NOLINTEND
61};
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Level.h:255