Help a block when it is broken there is a chance to spawn a mob

Started by knvknvsnvlvls on

Topic category: Help with modding (Java Edition)

Last seen on 09:24, 4. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help a block when it is broken there is a chance to spawn a mob

I am making that when permafrost is destroyed, it has some chance for the mammoth to spawn. does anyone have ideas?

Last seen on 20:18, 12. Mar 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add a procedure to be run…
Mon, 10/23/2023 - 21:27

Add a procedure to be run when block is destroyed. In the procedure, write: If ( ( Random [0, 1) ) < ( 0.42 ) ) then spawn your entity

This represents a 42% chance. You can adjust the number 0.42 to change the probability.

Last seen on 09:24, 4. May 2024
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sillypantscoder, i figured…
Wed, 10/25/2023 - 04:57

sillypantscoder, i figured out many hours ago