LeviLamina
Loading...
Searching...
No Matches
PropertyComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/actor/state/PropertyContainer.h"
7#include "mc/world/actor/state/PropertyMetadata.h"
8
9// auto generated forward declare list
10// clang-format off
11class CompoundTag;
12class HashedString;
14class PropertyGroup;
15class Tag;
16struct PropertySyncData;
17// clang-format on
18
19class PropertyComponent {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::PropertyGroup const>>> mPropertyGroup;
24 ::ll::TypedStorage<4, 4, ::std::bitset<32>> mDirtyIntProperties;
25 ::ll::TypedStorage<4, 4, ::std::bitset<32>> mDirtyFloatProperties;
26 ::ll::TypedStorage<4, 4, ::std::bitset<32>> mDirtyBoolProperties;
27 ::ll::TypedStorage<4, 4, ::std::bitset<32>> mDirtyEnumIndexProperties;
28 ::ll::TypedStorage<1, 1, bool> mEverythingDirty;
29 ::ll::TypedStorage<8, 120, ::PropertyContainer> mPropertyContainer;
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 PropertyComponent& operator=(PropertyComponent const&);
35 PropertyComponent(PropertyComponent const&);
36 PropertyComponent();
37
38public:
39 // member functions
40 // NOLINTBEGIN
41 MCAPI PropertyComponent(::PropertyComponent&&);
42
43 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
44
45 MCAPI void
46 applyPendingChanges(::std::unordered_map<uint64, ::std::variant<int, float, bool, uint64>> const& pendingChanges);
47
48 MCAPI bool getBool(uint64 h) const;
49
50 MCAPI ::PropertyMetadata::ContainedType getPropertyType(uint64 h) const;
51
52 MCAPI ::PropertySyncData packAllSyncData() const;
53
54 MCAPI ::PropertySyncData packDirtySyncData();
55
56 MCAPI void readLoadedProperties(::CompoundTag const& loadedPropertyTag);
57
58 MCAPI void setAliasProperties(
59 ::std::unordered_map<::HashedString, ::std::shared_ptr<::Tag>> const& aliasProperties,
60 ::std::string const& aliasName,
61 ::std::string const& canonicalName
62 );
63
64 MCAPI ::std::optional<bool> tryGetBool(uint64 h) const;
65
66 MCAPI ::HashedString const* tryGetString(uint64 h) const;
67 // NOLINTEND
68
69public:
70 // constructor thunks
71 // NOLINTBEGIN
72 MCAPI void* $ctor(::PropertyComponent&&);
73 // NOLINTEND
74};
Definition CompoundTag.h:18
Definition HashedString.h:5
Definition PropertyContainer.h:21
Definition PropertyGroup.h:20
Definition Tag.h:42
Definition PropertySyncData.h:5