Mob appearing

Started by Ray21354 on

Topic category: Help with modding (Java Edition)

Last seen on 19:21, 25. Jun 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob appearing

Hi
 

I'm making a mod about Herobrine but I have a problem with his appearance, does anyone know how I can make him appear every 5 minutes with a small chance?

 

Thanks in advance (sorry for bad english I use translator)

Last seen on 15:44, 30. Jul 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add a new procedure mod…
Thu, 07/04/2024 - 17:28

add a new procedure mod element

set the trigger to when player spawns

set player's nbt number tag to 0 (give the nbt tag your own name, something like "herobrineSpawnTimer" or something else)

then add a new procedure

set the trigger to loaded entity tick update

if player nbt tag is 6000 ticks (5 minutes), then 

if random number is less than a certain threshold, then

spawn herobrine

otherwise, set nbt tag to nbt tag + 1