Skip to main content
100%

Gist 7787a984f4735d812b642d776e9d5913

✓ Published0🌍 Public
44xDMG
Last edited Apr 9, 2017
Created on Apr 9, 2017

This example uses procedural generation to create a cave-like dungeon in Minecraft, starting from a random map of logs and bedrock and then applying cellular automata rules to smooth the layout. The code’s `generateDungeonArr` populates a 50x100 grid, `generateNewMap` iterates neighbor counts to refine the map over 20 generations, and `floodDungeon` recursively carves out connected regions. The final `renderDungeon` function places blocks in 3D space using Bukkit’s `org.bukkit.Material` API, positioning them relative to the player’s coordinates. The visualization highlights how algorithmic map generation and flood-fill logic combine to create playable cave structures.

AI-generated description

Similar vizzes