A chance to spawn mob when a specific block is broken

Started by CristianLN on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A chance to spawn mob when a specific block is broken

I want to make a block (ex: diamond block) when broken to have a random chance to summon a mob (ex: creeper).

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
//This procedure has a 50%…
Fri, 06/19/2020 - 11:21

//This procedure has a 50% chance to spawn a creeper when breaking a diamond block

global trigger(on block broken){

   if(convert block to item(get block at x y z) == diamond_block){

      if(random between 0 and and 1 > 0.5){

         spawn mob at x y z type creeper                  

      }

   }

}

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm trying to do the same…
Sun, 11/15/2020 - 07:04

I'm trying to do the same but two of the same mob will come out of the block 100% of the time, but I can't find a procedure that lets me spawn entities.