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