35 using AttributeBuffPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeBuff>>;
37 using AttributeModPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeModifier>>;
43 ::ll::TypedStorage<4, 4, int> mPaddingDuration;
44 ::ll::TypedStorage<4, 4, float> mFactorStart;
45 ::ll::TypedStorage<4, 4, float> mFactorTarget;
46 ::ll::TypedStorage<4, 4, float> mFactorCurrent;
49 ::ll::TypedStorage<4, 4, int> mTicksActive;
50 ::ll::TypedStorage<4, 4, float> mFactorPreviousFrame;
51 ::ll::TypedStorage<1, 1, bool> mHadEffectLastTick;
52 ::ll::TypedStorage<1, 1, bool> mHadApplied;
65 MCNAPI ::std::unique_ptr<::CompoundTag>
save()
const;
86 ::ll::TypedStorage<4, 4, uint const> mId;
87 ::ll::TypedStorage<1, 1, bool> mIsHarmful;
88 ::ll::TypedStorage<4, 16, ::mce::Color> mColor;
89 ::ll::TypedStorage<8, 48, ::HashedString> mParticleEffectId;
90 ::ll::TypedStorage<8, 48, ::HashedString> mParticleEffectAmbientId;
91 ::ll::TypedStorage<8, 32, ::std::string> mDescriptionId;
92 ::ll::TypedStorage<4, 4, int> mIcon;
93 ::ll::TypedStorage<4, 4, float> mDurationModifier;
94 ::ll::TypedStorage<1, 1, bool> mIsDisabled;
95 ::ll::TypedStorage<8, 32, ::std::string> mResourceName;
96 ::ll::TypedStorage<8, 32, ::std::string> mIconName;
97 ::ll::TypedStorage<1, 1, bool> mEffectVisible;
98 ::ll::TypedStorage<4, 8, ::std::optional<::SharedTypes::Legacy::LevelSoundEvent>> mOnApplySound;
99 ::ll::TypedStorage<8, 48, ::HashedString> mComponentName;
100 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Amplifier>> mValueAmplifier;
101 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Amplifier>> mDurationAmplifier;
102 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeBuff>>>>
104 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeModifier>>>>
106 ::ll::TypedStorage<8, 96, ::MobEffect::FactorCalculationData> mFactorCalculationData;
126 virtual void onEffectExpired(
::Actor&)
const;
129 virtual void onActorDied(
::Actor&,
int)
const;
136 applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
139 virtual bool isInstantaneous()
const;
142 virtual float getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;
150 ::std::string
const& resourceName,
151 ::std::string
const& locName,
155 ::std::string
const& iconName,
159 MCAPI ::InstantaneousAttributeBuff
160 _createInstantBuff(
::AttributeBuff const& baseBuff,
int amplification,
float scale)
const;
162 MCAPI ::TemporalAttributeBuff
165 MCAPI
void _setParticleEffectIds(
char const* particleEffectId,
char const* particleEffectAmbientId);
167 MCAPI
void addAttributeBuff(
::Attribute const& attribute, ::std::shared_ptr<::AttributeBuff> buff);
169 MCAPI
void addAttributeModifier(
::Attribute const& attribute, ::std::shared_ptr<::AttributeModifier> modifier);
171 MCAPI
void applyModsAndBuffs(
177 MCAPI
void setDurationAmplifier(::std::shared_ptr<::Amplifier> amplifier);
181 MCAPI ::MobEffect& setOnApplySound(::SharedTypes::Legacy::LevelSoundEvent onApplySound);
183 MCAPI
void setValueAmplifier(::std::shared_ptr<::Amplifier> amplifier);
185 MCAPI
void updateModsAndBuffs(
198 MCAPI static ::MobEffect* getByName(::std::string
const& name);
200 MCAPI static ::MobEffect::FactorCalculationData getDarknessEffectFactorCalculationData();
208 MCAPI static ::MobEffect*& ABSORPTION();
210 MCAPI static ::MobEffect*& BAD_OMEN();
212 MCAPI static ::MobEffect*& BLINDNESS();
214 MCAPI static ::MobEffect*& CONDUIT_POWER();
216 MCAPI static ::MobEffect*& CONFUSION();
218 MCAPI static ::MobEffect*& DAMAGE_BOOST();
220 MCAPI static ::MobEffect*& DAMAGE_RESISTANCE();
222 MCAPI static ::MobEffect*& DARKNESS();
224 MCAPI static ::mce::Color
const& DEFAULT_COLOR();
226 MCAPI static ::MobEffect*& DIG_SLOWDOWN();
228 MCAPI static ::MobEffect*& DIG_SPEED();
230 MCAPI static ::MobEffect*& EMPTY_EFFECT();
232 MCAPI static ::MobEffect*& FATAL_POISON();
234 MCAPI static ::MobEffect*& FIRE_RESISTANCE();
236 MCAPI static ::MobEffect*& HARM();
238 MCAPI static ::MobEffect*& HEAL();
240 MCAPI static ::MobEffect*& HEALTH_BOOST();
242 MCAPI static ::MobEffect*& HERO_OF_THE_VILLAGE();
244 MCAPI static ::MobEffect*& HUNGER();
246 MCAPI static ::MobEffect*& INFESTED();
248 MCAPI static ::MobEffect*& INVISIBILITY();
250 MCAPI static ::MobEffect*& JUMP();
252 MCAPI static ::MobEffect*& LEVITATION();
254 MCAPI static ::MobEffect*& MOVEMENT_SLOWDOWN();
256 MCAPI static ::MobEffect*& MOVEMENT_SPEED();
258 MCAPI static ::MobEffect*& NIGHT_VISION();
260 MCAPI static ::MobEffect*& OOZING();
262 MCAPI static ::MobEffect*& POISON();
264 MCAPI static ::MobEffect*& RAID_OMEN();
266 MCAPI static ::MobEffect*& REGENERATION();
268 MCAPI static ::MobEffect*& SATURATION();
270 MCAPI static ::MobEffect*& SLOW_FALLING();
272 MCAPI static ::MobEffect*& TRIAL_OMEN();
274 MCAPI static ::MobEffect*& WATER_BREATHING();
276 MCAPI static ::MobEffect*& WEAKNESS();
278 MCAPI static ::MobEffect*& WEAVING();
280 MCAPI static ::MobEffect*& WIND_CHARGED();
282 MCAPI static ::MobEffect*& WITHER();
284 MCAPI static ::std::add_lvalue_reference_t<::std::unique_ptr<::MobEffect>[]> mMobEffects();
292 ::std::string
const& resourceName,
293 ::std::string
const& locName,
297 ::std::string
const& iconName,
315 MCFOLD
void $onEffectExpired(
::Actor&)
const;
317 MCFOLD
void $onActorDied(
::Actor&,
int)
const;
322 $applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
324 MCFOLD
bool $isInstantaneous()
const;
326 MCAPI
float $getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;