An intersection between stairs and a cross-way in a stone-styled dungeon

Dungeons are strongholds, found all over worlds, in many different forms. A common form of dungeon is the single room dungeon, with stone styled dungeons also found.


The dungeon generator in VC4-Vanilla permits many different dungeon-styles to be avaliable, with different spawn requirements, spawn chances and rooms.

Dungeon Styles in Vanilla:

  • Single room dungeon
  • Stone-wall dungeons (100)
  • Library dungeons (10)

The numbers to the right of the styles indicate the chance that style has of spawning

Dungeon-Style APIEdit

To create a dungeon style, you must create a subclass of ​"", your class will look something like this:


import vc4.vanilla.generation.dungeon.WeightedRoom;

public class DungeonStyleStone extends DungeonStyle{

	public DungeonStyleStone() {
		addRoom(new WeightedRoom(new DungeonRoomBase(), 15));
		addRoom(new WeightedRoom(new DungeonRoomCorridor(), 20));
		addRoom(new WeightedRoom(new DungeonRoomLeftTurn(), 6));
		addRoom(new WeightedRoom(new DungeonRoomRightTurn(), 6));
		addRoom(new WeightedRoom(new DungeonRoomStairs(), 8));
		addRoom(new WeightedRoom(new DungeonRoomPit(), 5));
		addRoom(new WeightedRoom(new DungeonRoomLibrary(), 2));

The WeightedRoom class tells the generator the chance of this room generating. As you can see, the chance of a Crossways (Base) room spawning is 15/62 (24%), because the chance given for it to spawn is 15, and the total chance is 62. There are several other things you can do with styles:

public void onWorldLoad(World world){

This method "onWorldLoad" is used when a new world is loaded. Use it to set the block ids of the brick and moss in the dungeon, because these can be different per world.


This allows you to set the chance a room has to fail spawning. This can be used to keep dungeons small and create empty doorways.


This allows you to set the maximum rooms in a dungeon. This is incredibly useful for keeping dungeons small. Failed to generate rooms do not count.


This allows you to set the data value (5-bit) of the brick and moss blocks that can be generated. Useful ones include "4" for stone, "14" for hell-cobble" and "15" for cobblestone"


Version Changes
  • Added dungeon styles
  • Added stone-wall and library dungeons
  • Added library room
  • To prevent small dungeons, there must be more than 8 rooms in a dungeon before rooms will begin to fail to generate
  • Added dungeon generator
  • Added crossway, corridor, turn, stairs and pit rooms