LeviLamina
Loading...
Searching...
No Matches
DwellerComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/entity/components_json_legacy/DwellerRole.h"
8#include "mc/platform/UUID.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class BlockPos;
15class CompoundTag;
16class DataLoadHelper;
17class HashedString;
18class Mob;
19class Village;
20// clang-format on
21
23public:
24 // DwellerComponent inner types define
25 enum class DwellingType : int {
26 VillageDwelling = 0,
27 Count = 1,
28 };
29
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<1, 1, bool> mCanFindPOI;
34 ::ll::TypedStorage<1, 1, bool> mCanMigrate;
35 ::ll::TypedStorage<1, 1, bool> mHasJoinedDwelling;
36 ::ll::TypedStorage<1, 1, bool> mFixUpRole;
37 ::ll::TypedStorage<1, 1, bool> mRewardPlayersOnFirstFounding;
38 ::ll::TypedStorage<8, 48, ::HashedString> mPreferredProfession;
39 ::ll::TypedStorage<4, 4, int> mFirstFoundingReward;
40 ::ll::TypedStorage<4, 4, int> mUpdateIntervalVariant;
41 ::ll::TypedStorage<8, 8, uint64> mDwellingUpdateInterval;
42 ::ll::TypedStorage<8, 8, uint64> mUpdateIntervalBase;
43 ::ll::TypedStorage<4, 4, float> mDwellingBoundsTolerance;
44 ::ll::TypedStorage<4, 4, ::DwellerComponent::DwellingType> mType;
45 ::ll::TypedStorage<4, 4, ::DwellerRole> mRole;
46 ::ll::TypedStorage<8, 16, ::mce::UUID> mDwellingUniqueID;
47 // NOLINTEND
48
49public:
50 // member functions
51 // NOLINTBEGIN
52 MCAPI bool _isLockedInToProfession(::Actor const& owner) const;
53
54 MCAPI void addAdditionalSaveData(::CompoundTag& tag, ::Actor const& owner) const;
55
56 MCAPI void fixupProfession(::Actor const& owner, ::Village* village);
57
58 MCAPI ::std::weak_ptr<::Village> const getVillage(::Actor const& owner) const;
59
60 MCAPI ::BlockPos getVillageCenter(::Actor const& owner) const;
61
62 MCAPI bool hasPreferredProfession(::Actor const& owner) const;
63
64 MCAPI void initFromDefinition(::Actor& owner);
65
66 MCAPI bool isWithinRestriction(::Actor const& owner) const;
67
68 MCAPI bool needsToFixupJobSite(::Actor const& owner) const;
69
70 MCAPI bool needsToFixupProfession(::Actor const& owner) const;
71
72 MCAPI void onDeath(::Actor& owner, ::ActorDamageSource const& source);
73
74 MCAPI void onRemove(::Actor& owner);
75
76 MCAPI void readAdditionalSaveData(::Actor& owner, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
77
78 MCAPI void setDwellingUniqueID(::Actor& owner, ::mce::UUID id);
79
80 MCAPI void setLastHurtByMob(::Actor& owner, ::Mob* mob);
81
82 MCAPI bool trySetPreferredProfession(::Actor const& owner, ::HashedString const& poi);
83
84 MCAPI bool tryToFixupRole(::Actor const& owner, ::Village* village);
85
86 MCAPI bool tryToMigrate(::Actor& owner, ::Village* oldVillage, ::Village* newVillage);
87 // NOLINTEND
88
89public:
90 // static variables
91 // NOLINTBEGIN
92 MCAPI static ::std::unordered_map<::std::string, ::DwellerRole> const& DWELLING_ROLES();
93
94 MCAPI static ::std::unordered_map<::std::string, ::DwellerComponent::DwellingType> const& DWELLING_TYPES();
95 // NOLINTEND
96};
Definition ActorDamageSource.h:18
Definition Actor.h:113
Definition BlockPos.h:17
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition DwellerComponent.h:22
Definition HashedString.h:5
Definition Mob.h:56
Definition Village.h:31
Definition UUID.h:7