How to make boss core block (like The Creaking)

Started by AdinTheGalacti… on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make boss core block (like The Creaking)

I'm thinking of a boss linked to a block of some sort (like a core) that you need to destroy to beat. But I can't think well on how to code it. Any tips or tricks I could use?

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can just check for the…
Tue, 10/29/2024 - 14:36

You can just check for the block on for example XYZ (where this block is) on entity tick event. And if a player destroys it you doing the dark magic (extinguish/kill entity)

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there's literally a "on…
Thu, 10/31/2024 - 16:19

there's literally a "on block destroyed" trigger. just make a new proceedure, make it execute /kill @e[type=yourmod:yourmob, r=5], and then attatch it to the core block in the "on block destroyed" trigger.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The better way to do this…
Thu, 10/31/2024 - 16:31

The better way to do this would be with custom data properties. Have the block spawn an entity on random tick, and immediately set three integer properties for that entity to the position of the block. Then, on the entity's update tick, check if the block at their saved position is still the correct type, and kill them if it isn't. This way only the specific entity bound to the block is killed. When the entity is attacked, you can cancel the global trigger and do the particle effect by getting a vector between the current position and their saved position, and then generating particles at random intervals along said vector, with their velocity set in the same direction. (The beam thing is a bit more complicated, there's probably some better explanations out there.)