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<1, 2, ::PermissionsHandler> mPermissions;
30 ::ll::TypedStorage<4, 1440, ::std::array<::Abilities, 6>> mLayers;
31 // NOLINTEND
32
33public:
34 // member functions
35 // NOLINTBEGIN
36 MCAPI LayeredAbilities();
37
38 MCAPI void _handlePlayerPermissionsChange(::PlayerPermissionLevel from, ::PlayerPermissionLevel to);
39
40 MCAPI_C void forEachAbility(
41 ::std::function<void(::Ability const&, char const*)> const& callback,
42 ::Ability::Options requiredOptions
43 ) const;
44
45 MCAPI void forEachAbility(
46 ::std::function<void(::Ability const&, ::AbilitiesIndex)> const& callback,
47 ::Ability::Options requiredOptions
48 ) const;
49
50 MCAPI ::Ability const& getAbility(::AbilitiesIndex val) const;
51
52 MCAPI bool getBool(::AbilitiesIndex val) const;
53
54 MCAPI_C bool loadSaveData(::CompoundTag const& parentTag);
55
56 MCAPI_C void onSwitchToCustom();
57 // NOLINTEND
58
59public:
60 // static functions
61 // NOLINTBEGIN
62 MCAPI_C static ::std::optional<::std::string> getDiff(::LayeredAbilities const& lhs, ::LayeredAbilities const& rhs);
63 // NOLINTEND
64
65public:
66 // static variables
67 // NOLINTBEGIN
68 MCAPI static ::std::string const& DIFF_LAYER_AT();
69 // NOLINTEND
70
71public:
72 // constructor thunks
73 // NOLINTBEGIN
74 MCAPI void* $ctor();
75 // NOLINTEND
76};
Definition Ability.h:5
Definition CompoundTag.h:23