Skip to content
LeviMC
English
AutoLightDark
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
35#ifdef LL_PLAT_S
36#else // LL_PLAT_C
37public:
38 // prevent constructor by default
39 LayeredAbilities(LayeredAbilities const&);
40
41#endif
42public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI LayeredAbilities();
46
47#ifdef LL_PLAT_S
48 MCNAPI LayeredAbilities(::LayeredAbilities const& other);
49#endif
50
51#ifdef LL_PLAT_C
52 MCNAPI void addSaveData(::CompoundTag& parentTag) const;
53
54 MCNAPI void forEachAbility(
55 ::std::function<void(::Ability const&, char const*)> const& callback,
56 ::Ability::Options requiredOptions
57 ) const;
58#endif
59
60 MCNAPI void forEachAbility(
61 ::std::function<void(::Ability const&, ::AbilitiesIndex)> const& callback,
62 ::Ability::Options requiredOptions
63 ) const;
64
65#ifdef LL_PLAT_C
66 MCNAPI void forEachLayer(::std::function<void(::AbilitiesLayer, ::Abilities&)> const& callback);
67#endif
68
69 MCNAPI void forEachLayer(::std::function<void(::AbilitiesLayer, ::Abilities const&)> const& callback) const;
70
71 MCNAPI ::Ability const& getAbility(::AbilitiesIndex val) const;
72
73 MCAPI bool getBool(::AbilitiesIndex val) const;
74
75#ifdef LL_PLAT_C
76 MCNAPI bool loadSaveData(::CompoundTag const& parentTag);
77#endif
78
79 MCAPI ::LayeredAbilities& operator=(::LayeredAbilities const& rhs);
80
81 MCAPI void setPlayerPermissions(::PlayerPermissionLevel permissions);
82
83#ifdef LL_PLAT_C
84 MCAPI ~LayeredAbilities();
85#endif
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91#ifdef LL_PLAT_C
92 MCNAPI static ::std::optional<::std::string> getDiff(::LayeredAbilities const& lhs, ::LayeredAbilities const& rhs);
93#endif
94 // NOLINTEND
95
96public:
97 // static variables
98 // NOLINTBEGIN
99#ifdef LL_PLAT_C
100 MCNAPI static ::std::string const& DIFF_LAYER_AT();
101#endif
102 // NOLINTEND
103
104public:
105 // constructor thunks
106 // NOLINTBEGIN
107 MCAPI void* $ctor();
108
109#ifdef LL_PLAT_S
110 MCNAPI void* $ctor(::LayeredAbilities const& other);
111#endif
112 // NOLINTEND
113
114public:
115 // destructor thunk
116 // NOLINTBEGIN
117#ifdef LL_PLAT_C
118 MCFOLD void $dtor();
119#endif
120 // NOLINTEND
121};
Definition Abilities.h:15
Definition Ability.h:5
Definition CompoundTag.h:18
MCAPI void forEachLayer(::std::function< void(::AbilitiesLayer, ::Abilities const &)> const &callback) const
MCAPI void forEachAbility(::std::function< void(::Ability const &, ::AbilitiesIndex)> const &callback, ::Ability::Options requiredOptions) const
MCAPI::Ability const & getAbility(::AbilitiesIndex val) const