35 struct FactorCalculationData {
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;
53 FactorCalculationData(FactorCalculationData
const&);
54 FactorCalculationData();
61 MCAPI ::std::unique_ptr<::CompoundTag> save()
const;
63 MCAPI ~FactorCalculationData();
69 MCAPI static ::MobEffect::FactorCalculationData load(
::CompoundTag const* tag);
79 using AttributeBuffPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeBuff>>;
81 using AttributeModPair = ::std::pair<::Attribute const*, ::std::shared_ptr<::AttributeModifier>>;
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;
116 virtual ~MobEffect();
122 virtual void onEffectExpired(
::Actor&)
const;
124 virtual void onActorDied(
::Actor&,
int)
const;
129 applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
131 virtual bool isInstantaneous()
const;
133 virtual float getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;
141 ::std::string
const& resourceName,
142 ::std::string
const& locName,
146 ::std::string
const& iconName,
150 MCAPI ::InstantaneousAttributeBuff
151 _createInstantBuff(
::AttributeBuff const& baseBuff,
int amplification,
float scale)
const;
153 MCAPI ::TemporalAttributeBuff
156 MCAPI
void _setParticleEffectIds(
char const* particleEffectId,
char const* particleEffectAmbientId);
158 MCAPI
void addAttributeBuff(
::Attribute const& attribute, ::std::shared_ptr<::AttributeBuff> buff);
160 MCAPI
void addAttributeModifier(
::Attribute const& attribute, ::std::shared_ptr<::AttributeModifier> modifier);
162 MCAPI
void applyModsAndBuffs(
168 MCAPI_C ::std::string
const& getIconName()
const;
170 MCAPI
void setDurationAmplifier(::std::shared_ptr<::Amplifier> amplifier);
174 MCAPI
void setValueAmplifier(::std::shared_ptr<::Amplifier> amplifier);
176 MCAPI
void updateModsAndBuffs(
189 MCAPI_C static ::MobEffect* getById(uint effectId);
191 MCAPI static ::MobEffect* getByName(::std::string
const& name);
193 MCAPI static ::MobEffect::FactorCalculationData getDarknessEffectFactorCalculationData();
201 MCAPI static ::MobEffect*& ABSORPTION();
203 MCAPI static ::MobEffect*& BAD_OMEN();
205 MCAPI static ::MobEffect*& BLINDNESS();
207 MCAPI static ::MobEffect*& CONDUIT_POWER();
209 MCAPI static ::MobEffect*& CONFUSION();
211 MCAPI static ::MobEffect*& DAMAGE_BOOST();
213 MCAPI static ::MobEffect*& DAMAGE_RESISTANCE();
215 MCAPI static ::MobEffect*& DARKNESS();
217 MCAPI static ::mce::Color
const& DEFAULT_COLOR();
219 MCAPI static ::MobEffect*& DIG_SLOWDOWN();
221 MCAPI static ::MobEffect*& DIG_SPEED();
223 MCAPI static ::MobEffect*& EMPTY_EFFECT();
225 MCAPI static ::MobEffect*& FATAL_POISON();
227 MCAPI static ::MobEffect*& FIRE_RESISTANCE();
229 MCAPI static ::MobEffect*& HARM();
231 MCAPI static ::MobEffect*& HEAL();
233 MCAPI static ::MobEffect*& HEALTH_BOOST();
235 MCAPI static ::MobEffect*& HERO_OF_THE_VILLAGE();
237 MCAPI static ::MobEffect*& HUNGER();
239 MCAPI static ::MobEffect*& INFESTED();
241 MCAPI static ::MobEffect*& INVISIBILITY();
243 MCAPI static ::MobEffect*& JUMP();
245 MCAPI static ::MobEffect*& LEVITATION();
247 MCAPI static ::MobEffect*& MOVEMENT_SLOWDOWN();
249 MCAPI static ::MobEffect*& MOVEMENT_SPEED();
251 MCAPI static ::MobEffect*& NIGHT_VISION();
253 MCAPI static ::MobEffect*& OOZING();
255 MCAPI static ::MobEffect*& POISON();
257 MCAPI static ::MobEffect*& RAID_OMEN();
259 MCAPI static ::MobEffect*& REGENERATION();
261 MCAPI static ::MobEffect*& SATURATION();
263 MCAPI static ::MobEffect*& SLOW_FALLING();
265 MCAPI static ::MobEffect*& TRIAL_OMEN();
267 MCAPI static ::MobEffect*& WATER_BREATHING();
269 MCAPI static ::MobEffect*& WEAKNESS();
271 MCAPI static ::MobEffect*& WEAVING();
273 MCAPI static ::MobEffect*& WIND_CHARGED();
275 MCAPI static ::MobEffect*& WITHER();
277 MCAPI static ::std::add_lvalue_reference_t<::std::unique_ptr<::MobEffect>[]> mMobEffects();
285 ::std::string
const& resourceName,
286 ::std::string
const& locName,
290 ::std::string
const& iconName,
308 MCFOLD
void $onEffectExpired(
::Actor&)
const;
310 MCFOLD
void $onActorDied(
::Actor&,
int)
const;
315 $applyInstantaneousEffect(
::Actor* source,
::Actor* owner,
::Actor* target,
int amplification,
float scale)
const;
317 MCFOLD
bool $isInstantaneous()
const;
319 MCAPI
float $getAttributeModifierValue(
int amplifier,
::AttributeModifier const& modifier)
const;
327 MCAPI
static void** $vftable();