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
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
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 bool _doesWanderingTraderExist() const;
41
42 MCAPI ::std::optional<::BlockPos> _findValidSpawnPosUnder(::BlockPos const& pos, ::BlockSource& region) const;
43
44 MCAPI ::BlockPos _getRandomHeightmapPosAroundOrigin(
45 ::BlockSource const& region,
46 ::BlockPos const& origin,
47 int distFromOrigin,
48 bool exactDist
49 );
50
51 MCAPI ::Actor* _getRandomPlayerInOverworld() const;
52
53 MCAPI ::std::optional<::BlockPos>
54 _getRandomWildernessPosAroundSpecifiedPos(::BlockPos const& position, ::BlockSource& region);
55
56 MCAPI ::std::optional<::BlockPos>
57 _getSpawnPosFromNearestVillageToPlayerPos(::BlockPos const& playerPos, ::BlockSource& region);
58
59 MCAPI void readSaveData();
60
61 MCAPI void tick();
62
63 MCAPI void writeSaveData() const;
64 // NOLINTEND
65
66public:
67 // static variables
68 // NOLINTBEGIN
69 MCAPI static ::std::vector<float> const& CHANCE_TO_SPAWN_PER_DAY();
70 // NOLINTEND
71};
Definition Actor.h:103
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Level.h:239
Definition WanderingTraderScheduler.h:16