Composition

The pattern of blocks the players must build

/goop customstructures edit composition <structure name> <cuboid radius> [w x y z]

This page is the more technical version of Composition 101 and contains more in-depth information.

There are a few special blocks when calling that command in-game:

  1. Air blocks are ignored

  2. Barrier blocks are ignored

  3. Structure Void blocks are considered Air (Player must leave an air block in their place)

  4. GooP JSON Furniture

  5. Signs (see signs section)


This makes Barriers and Structure Void blocks impossible to import from the game, and if you truly wish the structure to require them, you will have to manually write them into the YML File and call /goop reload.

YML Format

For reference, this is how the file looks in YML:

- RED_SANDSTONE -1 2 -2

- ANDESITE_STAIRS -1 2 -1||HALF false,FACING BACK

Which comes from

- <MATERIAL> <X> <Y> <Z>||<Blockstates>

Importing with the command VS Writing in the YML File

Importing from the word has the HUGE advantage that it is so fast and easy to use, it will:

  • Automatically calculate the X Y Z offsets of the blocks

  • Automatically include ALL supported blockstates of the blocks

  • Write the blocks in correct sintax


Why would anyone want to write into the YML file then? For the following reasons:

  • Allow to make BARRIER and STRUCTURE_VOID blocks required parts of the structure

  • If a blockstate is not specified, it is just not checked ex. a slab block would not matter if it is on the bottom or top

    • Since importing with the command always imports ALL blockstates, it will only match the exact thing being imported.

    • You may want to allow more build flexibility by deleting some blockstates — not checking if the slab is on top or bottom.

Signs

It is possible to import signs with text in them, though only one line of text is supported.

  • Allows to make repair signs (like essentials plugin) that support MMOItems, with /goop nbt damage

  • Note that the wood used for the sign will matter, as well as if it is placed on a wall or standing.

    • This is because minecraft saves, for example oak wood, standing sings as "OAK_SIGN" and wall sings as "OAK_WALL_SIGN"

  • The sign does not have to be the interactable block, and there can be any number of signs that require whatever text in a structure.

Simple Example

A sign that, when clicked, repairs all the items of in the player's inventory at the cost of $10 (using vault economy)

RepairallSign:

Composition:

- DARK_OAK_WALL_SIGN 0 0 0||SIGN Repair

Triggers:

- INTERACT

VaultCost: 10

Commands:

- 'goop nbt damage %player% * 0 oS: goop tell @s &eAll Items Repaired!'

As long as the sign has the word "repair" in any line, it will be detected by CustomStructures.

Orientation

Structures are not saved as facing "East" or "West" or whatever, they are saved as facing "Forward", "Left", "Back"...

For example, stair blocks, you import two of them rotated 90° relative to each other, and one of them is 'Forward.' The other one must be either "Left" or "Right", and when a player builds the structure in their houses, they must match this (unless you delete the blockstate from the YML).

Structures are not detected when mirrored in any axis. Only simple rotations by 90°

When importing, SOUTH is always chosen as 'Forward'