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 // prevent constructor by default
51 DwellerComponent& operator=(DwellerComponent const&);
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCNAPI bool _isLockedInToProfession(::Actor const& owner) const;
59
60 MCNAPI void addAdditionalSaveData(::CompoundTag& tag, ::Actor const& owner) const;
61
62 MCNAPI void fixupProfession(::Actor const& owner, ::Village* village);
63
64 MCNAPI ::std::weak_ptr<::Village> const getVillage(::Actor const& owner) const;
65
66 MCNAPI ::BlockPos getVillageCenter(::Actor const& owner) const;
67
68 MCNAPI bool hasPreferredProfession(::Actor const& owner) const;
69
70 MCNAPI void initFromDefinition(::Actor& owner);
71
72 MCNAPI bool isWithinRestriction(::Actor const& owner) const;
73
74 MCNAPI bool needsToFixupJobSite(::Actor const& owner) const;
75
76 MCNAPI bool needsToFixupProfession(::Actor const& owner) const;
77
78 MCNAPI void onDeath(::Actor& owner, ::ActorDamageSource const& source);
79
80 MCNAPI void onRemove(::Actor& owner);
81
82 MCNAPI ::DwellerComponent& operator=(::DwellerComponent&&);
83
84 MCNAPI void readAdditionalSaveData(::Actor& owner, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
85
86 MCNAPI void setDwellingUniqueID(::Actor& owner, ::mce::UUID id);
87
88 MCNAPI void setLastHurtByMob(::Actor& owner, ::Mob* mob);
89 // NOLINTEND
90
91public:
92 // static variables
93 // NOLINTBEGIN
94 MCNAPI static ::std::unordered_map<::std::string, ::DwellerRole> const& DWELLING_ROLES();
95
96 MCNAPI static ::std::unordered_map<::std::string, ::DwellerComponent::DwellingType> const& DWELLING_TYPES();
97 // NOLINTEND
98};
Definition ActorDamageSource.h:18
Definition Actor.h:103
Definition BlockPos.h:18
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition DwellerComponent.h:22
MCAPI bool needsToFixupProfession(::Actor const &owner) const
MCAPI bool hasPreferredProfession(::Actor const &owner) const
MCAPI void initFromDefinition(::Actor &owner)
MCAPI void setLastHurtByMob(::Actor &owner, ::Mob *mob)
MCAPI void onDeath(::Actor &owner, ::ActorDamageSource const &source)
MCAPI void setDwellingUniqueID(::Actor &owner, ::mce::UUID id)
MCAPI::BlockPos getVillageCenter(::Actor const &owner) const
MCAPI void onRemove(::Actor &owner)
MCAPI ::std::weak_ptr<::Village > const getVillage(::Actor const &owner) const
MCAPI bool needsToFixupJobSite(::Actor const &owner) const
MCAPI bool isWithinRestriction(::Actor const &owner) const
MCAPI::DwellerComponent & operator=(::DwellerComponent &&)
MCAPI void addAdditionalSaveData(::CompoundTag &tag, ::Actor const &owner) const
MCAPI void fixupProfession(::Actor const &owner, ::Village *village)
static MCAPI ::std::unordered_map<::std::string, ::DwellerRole > const & DWELLING_ROLES()
MCAPI void readAdditionalSaveData(::Actor &owner, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
static MCAPI ::std::unordered_map<::std::string, ::DwellerComponent::DwellingType > const & DWELLING_TYPES()
MCAPI bool _isLockedInToProfession(::Actor const &owner) const
Definition HashedString.h:5
Definition Mob.h:47
Definition Village.h:34
Definition UUID.h:7