10% chance to spawn an entity when a specific block is broken

Help | Java 1.21.5/6/7/8/9

Whenever a player breaks a certain block (like diamond ore), there's a 10% chance it spawns an entity (eg. an allay).
Like detect the block break and apply the random chance
Any help would be appreciated

Posted Dec 7, 2025, 10:42 PM UTC

23
Loading comments…