SrinjoySS01

Untitled

Oct 11th, 2020
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data