Advertisement
SrinjoySS01

Untitled

Oct 11th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public class Events {
  2.     @SubscribeEvent
  3.     public static void playerTickEvent(TickEvent.PlayerTickEvent event){
  4.         PlayerEntity playerEntity = event.player;
  5.         List<LivingEntity> list = playerEntity.getEntityWorld()
  6.                 .getEntitiesWithinAABB(LivingEntity.class, playerEntity.getBoundingBox().expand(10, 10, 10), e -> !e.equals(playerEntity));
  7.         list.forEach(entity -> entity.setHealth(0));
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement