How to get a boss mob to spawn automatically on a block.

Started by Whos_Ark on Thu, 04/29/2021 - 22:51

Topic category: Help with modding (Java Edition)

Last seen on 01:14, 10. Jun 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to get a boss mob to spawn automatically on a block.
Thu, 04/29/2021 - 22:51

Hello! I've been using MCreator for a few months now but this is my first forum post.

I am currently working on a procedure where a boss can spawn on top of a special block when a player gets close enough, but I am not sure how to do this without the block continuously spawning the boss. I plan on implementing this block in a structure that can only be found in the tundra and spruce forests. I have done similar things with blocks spawning bosses, but those required the player interacting with the block. For this boss, I just want a single instance of the boss to spawn when the player gets close to the structure. Any help would be greatly appreciated!

-Ark

Last seen on 23:32, 17. May 2021
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
still need help?  
Wed, 05/05/2021 - 17:44

still need help?

 
Last seen on 01:14, 10. Jun 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes. I'm still fairly new to…
Thu, 05/06/2021 - 19:04

Yes. I'm still fairly new to MCreator however I have a bit of knowledge under my belt so I'll probably understand a slightly more complex solution. I've come up with a temporary solution where the mob spawns with the generated structure, but it isn't where I want it to be. Basically my idea is that when the structure generates, one "chained" version of the boss spawns in the center, where the player can interact with it before deciding to fight it or not. In this form, it is invincible and cannot be harmed until the actual fight is started. When the fight starts, the chained version of the boss will immediately despawn and be replaced by a "new" version of the boss, which can actually attack and be attacked. The main issue I have is that if something happens to the boss, such as it accidentally despawning due to a difficulty change or some other reason, it won't respawn again. I had originally considered just making a procedure that spawns the boss on the block, however I am not sure of how to do that without it continuously spawning the boss. TLDR: I want the structure to spawn only one instance of the boss, on one specific type of block, with the ability for it to respawn after some time.

Last seen on 23:32, 17. May 2021
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Use something like ento in …
Thu, 05/06/2021 - 19:35

Use something like ento in "update tik" on block
3
red marked is the distance for the player to be detected