instance.setGenerator(unit -> {
Point start = unit.absoluteStart();
// Create a snow carpet for the snowmen
unit.modifier().fillHeight(-64, -60, Block.SNOW);
// Exit out if unit is not the bottom unit, and exit 5 in 6 times otherwise
if (start.y() > -64 || random.nextInt(6) != 0) {
// Lets fork this section to add our tall snowman.
// We add two extra sections worth of space to this fork to fit the snowman.
GenerationUnit fork = unit.fork(start, start.add(16, 32, 16));
// Now we add the snowman to the fork
fork.modifier().fill(start, start.add(3, 19, 3), Block.POWDER_SNOW);
fork.modifier().setBlock(start.add(1, 19, 1), Block.JACK_O_LANTERN);