LeviLamina
Loading...
Searching...
No Matches
LayeredAbilities.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/actor/player/AbilitiesLayer.h"
5
6// auto generated inclusion list
7#include "mc/server/commands/PlayerPermissionLevel.h"
8#include "mc/world/actor/player/Abilities.h"
9#include "mc/world/actor/player/AbilitiesIndex.h"
10#include "mc/world/actor/player/AbilitiesLayer.h"
11#include "mc/world/actor/player/Ability.h"
12#include "mc/world/actor/player/PermissionsHandler.h"
13
14// auto generated forward declare list
15// clang-format off
16class Ability;
17class CompoundTag;
18// clang-format on
19
20class LayeredAbilities {
21public:
22 LLNDAPI Ability& getAbility(::AbilitiesIndex val);
23 LLNDAPI Ability& getAbility(::AbilitiesLayer layer, ::AbilitiesIndex val);
24 LLAPI bool setAbility(::AbilitiesIndex val, float value);
25 LLAPI bool setAbility(::AbilitiesIndex val, bool value);
26 // LLAPI void setPlayerPermissions(::PlayerPermissionLevel permissions);
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 24, ::PermissionsHandler> mPermissions;
32 ::ll::TypedStorage<4, 1440, ::std::array<::Abilities, 6>> mLayers;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 LayeredAbilities(LayeredAbilities const&);
38
39public:
40 // member functions
41 // NOLINTBEGIN
42 MCAPI LayeredAbilities();
43
44#ifdef LL_PLAT_C
45 MCAPI void addSaveData(::CompoundTag& parentTag) const;
46#endif
47
48 MCAPI void forEachAbility(
49 ::std::function<void(::Ability const&, char const*)> const& callback,
50 ::Ability::Options requiredOptions
51 ) const;
52
53 MCAPI void forEachAbility(
54 ::std::function<void(::Ability const&, ::AbilitiesIndex)> const& callback,
55 ::Ability::Options requiredOptions
56 ) const;
57
58#ifdef LL_PLAT_C
59 MCFOLD void forEachLayer(::std::function<void(::AbilitiesLayer, ::Abilities&)> const& callback);
60#endif
61
62 MCFOLD void forEachLayer(::std::function<void(::AbilitiesLayer, ::Abilities const&)> const& callback) const;
63
64 MCAPI ::Ability const& getAbility(::AbilitiesIndex val) const;
65
66 MCAPI bool getBool(::AbilitiesIndex val) const;
67
68#ifdef LL_PLAT_C
69 MCAPI bool loadSaveData(::CompoundTag const& parentTag);
70#endif
71
72 MCAPI ::LayeredAbilities& operator=(::LayeredAbilities const& rhs);
73
74 MCAPI void setPlayerPermissions(::PlayerPermissionLevel permissions);
75
76#ifdef LL_PLAT_C
77 MCAPI ~LayeredAbilities();
78#endif
79 // NOLINTEND
80
81public:
82 // static functions
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCAPI static ::std::optional<::std::string> getDiff(::LayeredAbilities const& lhs, ::LayeredAbilities const& rhs);
86#endif
87 // NOLINTEND
88
89public:
90 // static variables
91 // NOLINTBEGIN
92#ifdef LL_PLAT_C
93 MCAPI static ::std::string const& DIFF_LAYER_AT();
94#endif
95 // NOLINTEND
96
97public:
98 // constructor thunks
99 // NOLINTBEGIN
100 MCAPI void* $ctor();
101 // NOLINTEND
102
103public:
104 // destructor thunk
105 // NOLINTBEGIN
106#ifdef LL_PLAT_C
107 MCFOLD void $dtor();
108#endif
109 // NOLINTEND
110};
Definition Abilities.h:15
Definition Ability.h:5
Definition CompoundTag.h:18