Skip to content

Structure Types

Minecraft has sixteen structure types, listed in StructureType. Each has a wrapper, a DefinedStructure with the shared settings.

Simple structures are structures that do not have a configuration in Vanilla Minecraft.

ExamplePlugin.java Java
import dev.wyck.keys.ResourceKey;
import dev.wyck.worldgen.structure.Structure;
import dev.wyck.worldgen.structure.StructureType;
import dev.wyck.worldgen.structure.types.SimpleStructure;

// Using the builder method on Structure
Structure.swampHut(settings)
  .resourceKey(ResourceKey.of("wyck", "witch_hut"))
  .build()
  .register();

// Or by type
SimpleStructure.of(ResourceKey.of("wyck", "sand_temple"), StructureType.DESERT_PYRAMID, settings)
  .register();

An example of a structure with a configuration

ExamplePlugin.java Java
import dev.wyck.worldgen.structure.Structure;
import dev.wyck.worldgen.structure.types.RuinedPortalStructure;
import dev.wyck.worldgen.structure.types.RuinedPortalStructure.Placement;
import dev.wyck.worldgen.structure.types.RuinedPortalStructure.Setup;

RuinedPortalStructure portal = Structure.ruinedPortal(settings)
  .setup(new Setup(Placement.UNDERGROUND, 1.0F, 0.2F, false, false, true, false, 0.5F))
  .setup(new Setup(Placement.ON_LAND_SURFACE, 0.5F, 0.2F, false, false, true, false, 0.5F))
  .build();