Posted August 15, 20205 yr 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); } }
August 15, 20205 yr performEffect only runs if isReady returns true. It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.