Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Events {
- @SubscribeEvent
- public static void playerTickEvent(TickEvent.PlayerTickEvent event){
- PlayerEntity playerEntity = event.player;
- List<LivingEntity> list = playerEntity.getEntityWorld()
- .getEntitiesWithinAABB(LivingEntity.class, playerEntity.getBoundingBox().expand(10, 10, 10), e -> !e.equals(playerEntity));
- list.forEach(entity -> entity.setHealth(0));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement