Posted June 5, 20205 yr So, I want to make an enchantment that gives jump boost when a piece of armor with said enchantment is worn, how so I do this?
June 5, 20205 yr Either give yourself a potion effect when the armor is worn or look at how the potion affects the player and replicate that with your enchantment.
June 5, 20205 yr Author 1 hour ago, diesieben07 said: Unfortunately the jump boost effect is hardcoded all over the game's code. You probably have to just apply a potion effect to achieve this. @Mod.EventBusSubscriber(modid = MysteriousArtifacts.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) public static class HighStepEquipped{ @SubscribeEvent public static void action(TickEvent.PlayerTickEvent event) { PlayerEntity playerIn = event.player; playerIn.addPotionEffect(new EffectInstance(Effects.JUMP_BOOST, 20, 2)); } } I am using this code in my enchantment class, but if i join into the game it gives me this effect even when I'm not wearing the boots
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.