Skip to content

Instantly share code, notes, and snippets.

@DaMatrix
Last active October 1, 2020 09:54
Show Gist options
  • Select an option

  • Save DaMatrix/e57dd8636a1f93b7963fffffbc3a4381 to your computer and use it in GitHub Desktop.

Select an option

Save DaMatrix/e57dd8636a1f93b7963fffffbc3a4381 to your computer and use it in GitHub Desktop.
Structures

Cloudburst Server - Standard Generator - Structure config format

generator/structure/minecraft/nether_fortress/structure.yml:

# Define the structure type.
# The structure type defines how the individual components will be placed.
# Valid values:
# - piece: freeform 3d structure
# - village: generates a road network on the surface and places components off to the sides
type: piece

# Provide a list of all possible components
components:
- center_room
- path

# The number of components that will be recursively generated from the start component
depth: "2-12"

# One structure start per 512² block area
gridSize: 512

# The strucute start will be placed somewhere in the given Y range
startY: "80-90"

# The structure may not extend beyond these bounds, centered on the structure start.
radius:
  x: 128
  y: 16
  z: 128

generator/structure/minecraft/nether_fortress/component/center_room.yml:

options:
  # Indicates that this component can be used as a starting component for the structure.
  start: true

  # Repeatedly places the bottommost layer until a solid block is reached.
  extendDownToSolid: false

  # Forces this component to be generated at the world's surface.
  moveUpToSurface: false

  # The directions that this component may be rotated in.
  allowedRotations: "all"

# Defines this component's weight: the change that it will be generated
# higher -> more probable
# non-positive -> impossible
weight:
  # The component's base weight
  base: 100
  
  # Defines the component's weight after a certain strucutre generation recursion depth.
  depth:
    # Use a weight of -1 for every depth level after 1.
    # This prevents this component from being used anywhere other than the structure start.
    1: -1

# The dimensions of this component
size:
  x: 4
  y: 4
  z: 4

# The intersection bounds of the component.
# Two components will never be generated with intersecting bounding boxes.
# In the case of this simple component, the bounds are simply the same as the component's own size.
bounds:
  min:
    x: 0
    y: 0
    z: 0
  max:
    x: 4
    y: 4
    z: 4

# Defines the palette: a mapping of characters to block selectors, used in the "blocks" section below.
# Note that these are the same block selectors used in the generator config.
palette:
  .: "air"
  b: "nether_brick"

# Define the pattern of blocks in the component.
# Each layer is a slice of the component along the Y-axis.
# A space indicates that the existing block should be left unmodified.
blocks:
- # Layer 0
  - "bbbb"
  - "bbbb"
  - "bbbb"
  - "bbbb"
- # Layer 1
  - "b..b"
  - "...."
  - "...."
  - "b..b"
- # Layer 2
  - "b..b"
  - "...."
  - "...."
  - "b..b"
- # Layer 3
  - " bb "
  - "bbbb"
  - "bbbb"
  - " bb "

# Define connection points.
# These are the points on the component that other components may attach to.
connections:
  # Relative position of connector in component
- x: 1
  y: 1
  z: 0
  # The direction that the connector is facing
  direction: -z
  # The connector type. A connector will always attach to a connector of the opposite type.
  # e.g. type -1 in center_room connects to type 1 in path
  type: -1
- x: 1
  y: 1
  z: 3
  direction: +z
  type: -1
- x: 0
  y: 1
  z: 1
  direction: -x
  type: -1
- x: 3
  y: 1
  z: 1
  direction: +x
  type: -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment