LeviLamina
Loading...
Searching...
No Matches
AngerLevelComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
7#include "mc/legacy/ActorUniqueID.h"
8#include "mc/util/molang/ExpressionNode.h"
9#include "mc/world/actor/ActorFilterGroup.h"
10#include "mc/world/level/Tick.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class CompoundTag;
16class ILevel;
17// clang-format on
18
19class AngerLevelComponent {
20public:
21 // AngerLevelComponent inner types declare
22 // clang-format off
23 struct ConditionalSound;
24 struct Nuisance;
25 struct NuisanceCompare;
26 // clang-format on
27
28 // AngerLevelComponent inner types define
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mSoundEvent;
34 ::ll::TypedStorage<8, 16, ::ExpressionNode> mCondition;
35 // NOLINTEND
36
37 public:
38 // member functions
39 // NOLINTBEGIN
40 MCAPI ~ConditionalSound();
41 // NOLINTEND
42
43 public:
44 // destructor thunk
45 // NOLINTBEGIN
46 MCFOLD void $dtor();
47 // NOLINTEND
48 };
49
50 struct Nuisance {
51 public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mActorId;
55 ::ll::TypedStorage<4, 4, int> mAnger;
56 ::ll::TypedStorage<1, 1, uchar> mPriority;
57 // NOLINTEND
58 };
59
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<4, 4, int> mAngerThreshold;
65 // NOLINTEND
66 };
67
68 using ActorNuisance = ::std::pair<::Actor*, int>;
69
70public:
71 // member variables
72 // NOLINTBEGIN
73 ::ll::TypedStorage<8, 8, ::Tick> mNextAngerDecrementTick;
74 ::ll::TypedStorage<4, 4, int> mDefaultAnnoyingness;
75 ::ll::TypedStorage<4, 4, int> mDefaultProjectileAnnoyingness;
76 ::ll::TypedStorage<4, 4, int> mAngerDecrementIntervalTicks;
77 ::ll::TypedStorage<4, 4, int> mMaxAngerLevel;
78 ::ll::TypedStorage<4, 4, int> mAngryThreshold;
79 ::ll::TypedStorage<1, 1, bool> mRemoveTargetWhenBelowAngryThreshold;
80 ::ll::TypedStorage<4, 4, int> mAngryBoost;
81 ::ll::TypedStorage<4, 4, int> mTopAnger;
82 ::ll::TypedStorage<8, 72, ::std::optional<::ActorFilterGroup>> mNuisanceFilter;
83 ::ll::TypedStorage<8, 24, ::std::vector<::AngerLevelComponent::ConditionalSound>> mOnIncreaseSoundDefinitions;
84 ::ll::TypedStorage<4, 4, ::AngerLevelComponent::NuisanceCompare> mNuisanceCompare;
85 ::ll::TypedStorage<8, 24, ::std::multiset<::AngerLevelComponent::Nuisance, ::AngerLevelComponent::NuisanceCompare>>
86 mNuisances;
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 AngerLevelComponent& operator=(AngerLevelComponent const&);
92 AngerLevelComponent(AngerLevelComponent const&);
93 AngerLevelComponent();
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCAPI AngerLevelComponent(::AngerLevelComponent&&);
99
100 MCAPI void _createOrModifyAngerLevel(::Actor const& nuisanceSource, ::std::function<int(int)> const& modifyingFn);
101
102 MCAPI ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> _getListeningSoundEvent(::Actor& actor) const;
103
104 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
105
106 MCAPI bool belowAngryThreshold(::ActorUniqueID id) const;
107
108 MCAPI bool canBeNuisance(::Actor* owner, ::Actor* target) const;
109
110 MCAPI ::std::optional<::std::pair<::Actor*, int>> getTopActiveNuisance(::Actor* owner, ::ILevel const& level) const;
111
112 MCAPI ::AngerLevelComponent& operator=(::AngerLevelComponent&&);
113
114 MCAPI void tick(::Actor* owner, ::ILevel const& level);
115
116 MCAPI void tryIncreaseAngerAt(::Actor& owner, ::Actor& nuisance, int anger, bool playSounds);
117
118 MCAPI ~AngerLevelComponent();
119 // NOLINTEND
120
121public:
122 // static variables
123 // NOLINTBEGIN
124 MCAPI static int const& DEFAULT_ANGRY_BOOST();
125
126 MCAPI static int const& DEFAULT_ANGRY_THRESHOLD();
127
128 MCAPI static int const& DEFAULT_MAX_ANGER_LEVEL();
129 // NOLINTEND
130
131public:
132 // constructor thunks
133 // NOLINTBEGIN
134 MCAPI void* $ctor(::AngerLevelComponent&&);
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140 MCAPI void $dtor();
141 // NOLINTEND
142};
Definition Actor.h:105
Definition CompoundTag.h:23
Definition ILevel.h:214
Definition ActorUniqueID.h:5
Definition AngerLevelComponent.h:29
Definition AngerLevelComponent.h:60
Definition AngerLevelComponent.h:50