So recently I was working on my mod that adds custom potions.
I did manage to make the effect by watching tutorials but couldn't figure out how to add the performEffect so the effect does nothing currently.
Any help?
↓Code that registers it(Main)↓
@SubscribeEvent
public static void onEffectsRegistry(final RegistryEvent.Register<Effect> effectRegistryEvent) {
// register a new effect here
LOGGER.info("HELLO from Register Effect");
effectRegistryEvent.getRegistry().registerAll(
PotionList.biaseffect = new PotionList.BiasEffect(EffectType.BENEFICIAL, 14981690)
.setRegistryName(new ResourceLocation(MOD_ID, "bias_effect"))
);
}
↓Effect Class(PotionList)↓
public static class BiasEffect extends Effect {
@Override
public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
super.performEffect(entityLivingBaseIn, amplifier);
LOGGER.info("yes");
}
public BiasEffect(EffectType typeIn, int liquidColorIn){
super(typeIn, liquidColorIn);
}
}