39 ::ll::TypedStorage<4, 4, int> mPaddingDuration;
40 ::ll::TypedStorage<4, 4, float> mFactorStart;
41 ::ll::TypedStorage<4, 4, float> mFactorTarget;
42 ::ll::TypedStorage<4, 4, float> mFactorCurrent;
45 ::ll::TypedStorage<4, 4, int> mTicksActive;
46 ::ll::TypedStorage<4, 4, float> mFactorPreviousFrame;
47 ::ll::TypedStorage<1, 1, bool> mHadEffectLastTick;
48 ::ll::TypedStorage<1, 1, bool> mHadApplied;
52 using AttributeBuffPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeBuff>>;
54 using AttributeModPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeModifier>>;
59 ::ll::TypedStorage<4, 4, uint const> mId;
60 ::ll::TypedStorage<1, 1, bool> mIsHarmful;
61 ::ll::TypedStorage<4, 16, ::mce::Color> mColor;
62 ::ll::TypedStorage<8, 48, ::HashedString> mParticleEffectId;
63 ::ll::TypedStorage<8, 48, ::HashedString> mParticleEffectAmbientId;
64 ::ll::TypedStorage<8, 32, ::std::string> mDescriptionId;
65 ::ll::TypedStorage<4, 4, int> mIcon;
66 ::ll::TypedStorage<4, 4, float> mDurationModifier;
67 ::ll::TypedStorage<1, 1, bool> mIsDisabled;
68 ::ll::TypedStorage<8, 32, ::std::string> mResourceName;
69 ::ll::TypedStorage<8, 32, ::std::string> mIconName;
70 ::ll::TypedStorage<1, 1, bool> mEffectVisible;
71 ::ll::TypedStorage<4, 8, ::std::optional<::SharedTypes::Legacy::LevelSoundEvent>> mOnApplySound;
72 ::ll::TypedStorage<8, 48, ::HashedString> mComponentName;
73 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Amplifier>> mValueAmplifier;
74 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Amplifier>> mDurationAmplifier;
75 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeBuff>>>>
77 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeModifier>>>>
79 ::ll::TypedStorage<8, 96, ::MobEffect::FactorCalculationData> mFactorCalculationData;
90 virtual ~MobEffect() =
default;
99 virtual void onEffectExpired(
::Actor& target)
const;
101 virtual void onActorDied(
::Actor& target,
int amplifier)
const;
106 applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
108 virtual bool isInstantaneous()
const;
110 virtual float getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;
118 ::std::string
const& resourceName,
119 ::std::string
const& locName,
123 ::std::string
const& iconName,
127 MCAPI ::TemporalAttributeBuff
130 MCAPI
void _setParticleEffectIds(
char const* particleEffectId,
char const* particleEffectAmbientId);
132 MCAPI
void addAttributeBuff(
::Attribute const& attribute, ::std::shared_ptr<::AttributeBuff> buff);
134 MCAPI
void addAttributeModifier(
::Attribute const& attribute, ::std::shared_ptr<::AttributeModifier> modifier);
136 MCAPI
void applyModsAndBuffs(
142 MCAPI
void updateModsAndBuffs(
152 MCAPI static ::MobEffect
const* getByName(::std::string
const& name);
154 MCAPI static ::std::string getNameById(uint effectId);
162 MCAPI static ::mce::Color
const& DEFAULT_COLOR();
164 MCAPI static ::Bedrock::DenseEnumMap<::MobEffectIds, ::std::unique_ptr<::MobEffect>, 38>& mMobEffects();
172 ::std::string
const& resourceName,
173 ::std::string
const& locName,
177 ::std::string
const& iconName,
197 MCFOLD
void $onEffectExpired(
::Actor& target)
const;
199 MCFOLD
void $onActorDied(
::Actor& target,
int amplifier)
const;
204 $applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
206 MCFOLD
bool $isInstantaneous()
const;
208 MCAPI
float $getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;