Posted May 17, 20214 yr I'm trying to make an stun effect that don't let entity move. In the created Effect Class I write this lines with the "LivingEvent.LivingUpdateEvent", but when the entity have the Effect, it don't take damage, don't have gravity and other limitations. Is there some way to cancel only the move from it? @SubscribeEvent public static void dontMove(LivingEvent.LivingUpdateEvent event){ LivingEntity livingEntity = event.getEntityLiving(); if (livingEntity.hasEffect(stunningInstance)) { event.setCanceled(true); } }
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.