Gist c9bd662941bf0c774e47523b31df1177
✓ Published0🌍 Public
44xDMG
Last edited Apr 9, 2017
Created on Apr 9, 2017
This example shows a recursive flood-fill algorithm that triggers a chain of explosions across connected blocks in a Minecraft world. The code defines a `floodBoom` function that identifies the targeted block type and initiates a recursive spread through six cardinal directions. Using the Bukkit API, it calls `createExplosion` on the world object to detonate each matching block, while a depth counter limits recursion to 100 iterations. The `checkPower` helper caps the explosion radius at level 5, and the recursion continues only while encountering blocks identical to the original target.
AI-generated description