From 89da086f084e8c2be43d5f9a43fd1d947e5d830f Mon Sep 17 00:00:00 2001 From: ChampionAsh5357 Date: Wed, 23 Oct 2024 18:04:51 -0400 Subject: [PATCH] fix(effects): Add constructor for particle factory --- .../minecraft/world/effect/MobEffect.java.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/patches/net/minecraft/world/effect/MobEffect.java.patch b/patches/net/minecraft/world/effect/MobEffect.java.patch index 135584ef6b..1daf7ed3ab 100644 --- a/patches/net/minecraft/world/effect/MobEffect.java.patch +++ b/patches/net/minecraft/world/effect/MobEffect.java.patch @@ -9,6 +9,23 @@ public static final Codec> CODEC = BuiltInRegistries.MOB_EFFECT.holderByNameCodec(); public static final StreamCodec> STREAM_CODEC = ByteBufCodecs.holderRegistry(Registries.MOB_EFFECT); private static final int AMBIENT_ALPHA = Mth.floor(38.25F); +@@ -65,6 +_,16 @@ + this.particleFactory = p_333515_ -> p_333716_; + } + ++ /** ++ * Neo: Constructor that can take in the particle factory as a function of the {@link MobEffectInstance}. ++ * This should be used if the desired {@link ParticleOptions} depends on the presence of other registry entries. ++ */ ++ protected MobEffect(MobEffectCategory category, int color, Function particleFactory) { ++ this.category = category; ++ this.color = color; ++ this.particleFactory = particleFactory; ++ } ++ + public int getBlendDurationTicks() { + return this.blendDurationTicks; + } @@ -133,6 +_,18 @@ return this; }