Attack Nearest entity even if there isn't and avoid crashing the game

Started by Saiber Rida on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Attack Nearest entity even if there isn't and avoid crashing the game
Tue, 08/04/2020 - 11:55 (edited)

If you choose attack nearest entity when there isn't one, the game crashes, is there a way to make the procedure just cancel itself when that happens so it doesn't crash? I want to make a potion effect that makes you go on a rampage by attacking anything nearby, but this easily allows you to kill the mobs nearby, so the game will eventually crash because of not being able to find an entity to attack.

 

EDIT: okay I'm blind nevermind

Edited by Saiber Rida on Tue, 08/04/2020 - 11:55