Structure Types
Minecraft has sixteen structure types, listed in StructureType.
Each has a wrapper, a DefinedStructure
with the shared settings.
Simple Structures
Section titled “Simple Structures”Simple structures are structures that do not have a configuration in Vanilla Minecraft.
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(); Structures w/ Configurations
Section titled “Structures w/ Configurations”An example of a structure with a configuration
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();