Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
MobEffectInstance.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/effect/EffectDuration.h"
7#include "mc/world/effect/MobEffect.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class CompoundTag;
13namespace mce { class Color; }
14// clang-format on
15
16class MobEffectInstance {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<4, 4, uint> mId;
21 ::ll::TypedStorage<4, 4, ::EffectDuration> mDuration;
22 ::ll::TypedStorage<4, 8, ::std::optional<::EffectDuration>> mDurationEasy;
23 ::ll::TypedStorage<4, 8, ::std::optional<::EffectDuration>> mDurationNormal;
24 ::ll::TypedStorage<4, 8, ::std::optional<::EffectDuration>> mDurationHard;
25 ::ll::TypedStorage<4, 4, int> mAmplifier;
26 ::ll::TypedStorage<8, 24, ::std::vector<::MobEffectInstance>> mEffects;
27 ::ll::TypedStorage<1, 1, bool> mDisplayOnScreenTextureAnimation;
28 ::ll::TypedStorage<1, 1, bool> mIsCounterPausedThisTick;
29 ::ll::TypedStorage<1, 1, bool> mAmbient;
30 ::ll::TypedStorage<1, 1, bool> mEffectVisible;
31 ::ll::TypedStorage<1, 1, bool> mIsLeveled;
32 ::ll::TypedStorage<8, 96, ::MobEffect::FactorCalculationData> mFactorCalculationData;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 MobEffectInstance& operator=(MobEffectInstance const&);
38 MobEffectInstance(MobEffectInstance const&);
39 MobEffectInstance();
40
41public:
42 // member functions
43 // NOLINTBEGIN
44 MCAPI MobEffectInstance(uint id, ::EffectDuration duration);
45
46 MCAPI ::std::string getDisplayName() const;
47
48 MCAPI ::MobEffectInstance& operator=(::MobEffectInstance&&);
49
50 MCAPI ::std::unique_ptr<::CompoundTag> save() const;
51
52 MCNAPI bool tick();
53
54 MCNAPI void update(::MobEffectInstance const& takeOver);
55
56 MCAPI void updateEffects(::Actor& mob) const;
57
58 MCAPI ~MobEffectInstance();
59 // NOLINTEND
60
61public:
62 // static functions
63 // NOLINTBEGIN
64 MCAPI static ::mce::Color getAverageColorValue(::std::vector<::MobEffectInstance> const& effects);
65
66 MCAPI static ::MobEffectInstance load(::CompoundTag const& tag);
67 // NOLINTEND
68
69public:
70 // static variables
71 // NOLINTBEGIN
72 MCNAPI static ::MobEffectInstance const& NO_EFFECT();
73
74 MCAPI static float& splashDurationMultiplier();
75 // NOLINTEND
76
77public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCAPI void* $ctor(uint id, ::EffectDuration duration);
81 // NOLINTEND
82
83public:
84 // destructor thunk
85 // NOLINTBEGIN
86 MCAPI void $dtor();
87 // NOLINTEND
88};
Definition Actor.h:116
Definition CompoundTag.h:18
static MCAPI ::MobEffectInstance const & NO_EFFECT()
MCAPI bool tick()
MCAPI void update(::MobEffectInstance const &takeOver)
Definition Color.h:13
Definition EffectDuration.h:5