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/entity/components_json_legacy/DwellerRole.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
12class BlockPos;
13class CompoundTag;
14class DataLoadHelper;
15class HashedString;
16class Mob;
17class Village;
18namespace mce { class UUID; }
19// clang-format on
20
22public:
23 // DwellerComponent inner types define
24 enum class DwellingType : int {
25 VillageDwelling = 0,
26 Count = 1,
27 };
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<1, 1, bool> mCanFindPOI;
33 ::ll::TypedStorage<1, 1, bool> mCanMigrate;
34 ::ll::TypedStorage<1, 1, bool> mHasJoinedDwelling;
35 ::ll::TypedStorage<1, 1, bool> mFixUpRole;
36 ::ll::TypedStorage<1, 1, bool> mRewardPlayersOnFirstFounding;
37 ::ll::TypedStorage<8, 48, ::HashedString> mPreferredProfession;
38 ::ll::TypedStorage<4, 4, int> mFirstFoundingReward;
39 ::ll::TypedStorage<4, 4, int> mUpdateIntervalVariant;
40 ::ll::TypedStorage<8, 8, uint64> mDwellingUpdateInterval;
41 ::ll::TypedStorage<8, 8, uint64> mUpdateIntervalBase;
42 ::ll::TypedStorage<4, 4, float> mDwellingBoundsTolerance;
43 ::ll::TypedStorage<4, 4, ::DwellerComponent::DwellingType> mType;
44 ::ll::TypedStorage<4, 4, ::DwellerRole> mRole;
45 ::ll::TypedStorage<8, 16, ::mce::UUID> mDwellingUniqueID;
46 // NOLINTEND
47
48public:
49 // prevent constructor by default
50 DwellerComponent& operator=(DwellerComponent const&);
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI bool _isLockedInToProfession(::Actor const& owner) const;
57
58 MCAPI void addAdditionalSaveData(::CompoundTag& tag, ::Actor const& owner) const;
59
60 MCAPI void fixupProfession(::Actor const& owner, ::Village* village);
61
62 MCAPI ::std::weak_ptr<::Village> const getVillage(::Actor const& owner) const;
63
64 MCAPI ::BlockPos getVillageCenter(::Actor const& owner) const;
65
66 MCAPI bool hasPreferredProfession(::Actor const& owner) const;
67
68 MCAPI void initFromDefinition(::Actor& owner);
69
70 MCAPI bool isWithinRestriction(::Actor const& owner) const;
71
72 MCAPI bool needsToFixupJobSite(::Actor const& owner) const;
73
74 MCAPI bool needsToFixupProfession(::Actor const& owner) const;
75
76 MCAPI void onDeath(::Actor& owner, ::ActorDamageSource const& source);
77
78 MCAPI void onRemove(::Actor& owner);
79
80 MCAPI ::DwellerComponent& operator=(::DwellerComponent&&);
81
82 MCAPI void readAdditionalSaveData(::Actor& tag, ::CompoundTag const& owner, ::DataLoadHelper& dataLoadHelper);
83
84 MCAPI void setDwellingUniqueID(::Actor& owner, ::mce::UUID id);
85
86 MCAPI void setLastHurtByMob(::Actor& owner, ::Mob* mob);
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:104
Definition BlockPos.h:18
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition DwellerComponent.h:21
Definition HashedString.h:5
Definition Mob.h:47
Definition Village.h:34
Definition UUID.h:7