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 DataLoadHelper;
17class ILevel;
18// clang-format on
19
21public:
22 // AngerLevelComponent inner types declare
23 // clang-format off
24 struct ConditionalSound;
25 struct Nuisance;
26 struct NuisanceCompare;
27 // clang-format on
28
29 // AngerLevelComponent inner types define
31 public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mSoundEvent;
35 ::ll::TypedStorage<8, 16, ::ExpressionNode> mCondition;
36 // NOLINTEND
37 };
38
39 struct Nuisance {
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mActorId;
44 ::ll::TypedStorage<4, 4, int> mAnger;
45 ::ll::TypedStorage<1, 1, uchar> mPriority;
46 // NOLINTEND
47 };
48
50 public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<4, 4, int> mAngerThreshold;
54 // NOLINTEND
55 };
56
57 using ActorNuisance = ::std::pair<::Actor*, int>;
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 8, ::Tick> mNextAngerDecrementTick;
63 ::ll::TypedStorage<4, 4, int> mDefaultAnnoyingness;
64 ::ll::TypedStorage<4, 4, int> mDefaultProjectileAnnoyingness;
65 ::ll::TypedStorage<4, 4, int> mAngerDecrementIntervalTicks;
66 ::ll::TypedStorage<4, 4, int> mMaxAngerLevel;
67 ::ll::TypedStorage<4, 4, int> mAngryThreshold;
68 ::ll::TypedStorage<1, 1, bool> mRemoveTargetWhenBelowAngryThreshold;
69 ::ll::TypedStorage<4, 4, int> mAngryBoost;
70 ::ll::TypedStorage<4, 4, int> mTopAnger;
71 ::ll::TypedStorage<8, 72, ::std::optional<::ActorFilterGroup>> mNuisanceFilter;
72 ::ll::TypedStorage<8, 24, ::std::vector<::AngerLevelComponent::ConditionalSound>> mOnIncreaseSoundDefinitions;
73 ::ll::TypedStorage<4, 4, ::AngerLevelComponent::NuisanceCompare> mNuisanceCompare;
74 ::ll::TypedStorage<8, 24, ::std::multiset<::AngerLevelComponent::Nuisance, ::AngerLevelComponent::NuisanceCompare>>
75 mNuisances;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI void _decrementAnger(::Actor* owner, ::ILevel const& level);
82
83 MCAPI ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> _getListeningSoundEvent(::Actor& actor) const;
84
85 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
86
87 MCAPI bool belowAngryThreshold(::ActorUniqueID id) const;
88
89 MCAPI bool canBeNuisance(::Actor* owner, ::Actor* target) const;
90
91 MCAPI int getAngerForAnimations(::Actor& owner) const;
92
93 MCAPI ::std::optional<::std::pair<::Actor*, int>> getTopActiveNuisance(::Actor* owner, ::ILevel const& level) const;
94
95 MCAPI bool isAngry() const;
96
97 MCAPI void readAdditionalSaveData(::Actor&, ::CompoundTag const& tag, ::DataLoadHelper&);
98
99 MCAPI void tick(::Actor* owner, ::ILevel const& level);
100
101 MCAPI void tryIncreaseAngerAt(::Actor& owner, ::Actor& nuisance, int anger, bool playSounds);
102
103 MCAPI ~AngerLevelComponent();
104 // NOLINTEND
105
106public:
107 // static variables
108 // NOLINTBEGIN
109 MCAPI static float const& DEFAULT_ANGER_DECREMENT_INTERVAL_SECONDS();
110
111 MCAPI static int const& DEFAULT_ANGRY_BOOST();
112
113 MCAPI static int const& DEFAULT_ANGRY_THRESHOLD();
114
115 MCAPI static int const& DEFAULT_MAX_ANGER_LEVEL();
116
117 MCAPI static bool const& DEFAULT_SHOULD_REMOVE_TARGET();
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123 MCAPI void $dtor();
124 // NOLINTEND
125};
Definition Actor.h:125
Definition AngerLevelComponent.h:20
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:219
Definition ActorUniqueID.h:10
Definition AngerLevelComponent.h:30
Definition AngerLevelComponent.h:49
Definition AngerLevelComponent.h:39