# Config Examples

## Furniture

```yaml
unearth:
  furniture:
    fish_destroyed_1:
      no_protect: false #If true, the furniture will not protected by protections plugins
      base: "ia:elitefantasy:fish_destroyed_sand_1" #Item base
      tool: #With which tool do you want to make the change, if you want to use your hand, remove it.
        - ia:elitefantasy:copper_shovel
      transformation:
        stages: #The stages are as to what next model it will change to
          1:
            furniture_id: "ia:elitefantasy:fish_destroyed_sand_2"
            # remove_item_main_hand: true
            # reduce_item_main_hand: 1
            # only_one_drop: true
            # reduce_durability: 100
            # reduce_usages_ia: 1
          2:
            furniture_id: "ia:elitefantasy:fish_destroyed_sand_3"
          3:
            drops: #Which item do you want to drop when you reach the last state
              - "ia:elitefantasy:fish_destroyed_3;1;100"
            #only_one_drop: true
            remove: true #Eliminate the furniture from the floor
```

#### furniture\_random\_id

Only 1 random piece of furniture is selected from the list to be the stage 1

\<furniture\_id;chance> The sum of all the listed probabilities must equal `100`

This supports up to two decimal places in the probability, for example, `0.01`

```yml
            furniture_random_id:
              - "ia:glozz:furniture_1;75"
              - "ia:glozz:furniture_2;5"
              - "ia:glozz:furniture_3;5"
              - "ia:glozz:furniture_4;5"
              - "ia:glozz:furniture_5;5"
              - "ia:glozz:furniture_6;5"
```

## Block

```yaml
unearth:
  block:
    fish_destroyed_1:
      no_protect: false #If true, the block will not protected by protections plugin
      base: "ia:elitefantasy:fish_destroyed_sand_1" #Item base
      tool: #With which tool do you want to make the change, if you want to use your hand, remove it.
        - ia:elitefantasy:copper_shovel
      transformation:
        stages: The stages are as to what next model it will change to
          1:
            block_id: "ia:elitefantasy:fish_destroyed_sand_2"
          2:
            block_id: "ia:elitefantasy:fish_destroyed_sand_3"
          3:
            drops: #Which item do you want to drop when you reach the last state
              - "ia:elitefantasy:fish_destroyed_3;1;100"
            remove: true #Eliminate the block from the floor
```

#### block\_random\_id

Only 1 random piece of furniture is selected from the list to be the stage 1

\<block\_id;chance> The sum of all the listed probabilities must equal `100`

This supports up to two decimal places in the probability, for example, `0.01`

```yml
            block_random_id:
              - "ia:glozz:furniture_1;75"
              - "ia:glozz:furniture_2;5"
              - "ia:glozz:furniture_3;5"
              - "ia:glozz:furniture_4;5"
              - "ia:glozz:furniture_5;5"
              - "ia:glozz:furniture_6;5"
```

{% file src="/files/IiXU6qFRK3VIPWY6t906" %}

## Interaction Mode

### `INTERACT`

{% hint style="success" %}
Unless otherwise specified, this will be the default
{% endhint %}

```yaml
unearth:
  furniture:
    campfire_open:
      mode: INTERACT
      base: "ce:elitefantasy:campfire"
      tool:
        - "mc:air"
      transformation:
        stages:
          1:
            furniture_id: "ce:elitefantasy:campfire_open"
```

### `INTERACT_SHIFT`

```yaml
unearth:
  furniture:
    campfire_menu:
      mode: INTERACT_SHIFT
      base: "ce:elitefantasy:campfire"
      tool:
        - "mc:air"
      transformation:
        stages:
          1:
            execute_commands:
              - command: "menu open campfire {player}"
                as_console: true
```

## Some more examples

### Drops & Items\_add

`"<item_id>;<quantity>;<probability>"`

This can be used to drop various items

```yaml
          3:
            drops: #Which item do you want to drop when you reach the last state
              - "ia:elitefantasy:fish_destroyed_3;1;35"
              - "mc:stone;1-13;:65"
              - "mc:charcoal;1-6:95"
            #only_one_drop: true
            remove: true #Eliminate the furniture from the floor
```

```yaml
          3:
            items_add: #the item will be added to the inventory instead of dropping it
              - "ia:elitefantasy:fish_destroyed_3;1;35"
              - "mc:stone;1-13;:65"
              - "mc:charcoal;1-6:95"
            #only_one_add: true
```

#### Another Example

In this example, it's a simple swap, clicking switches the model to off or on state, either one or the other :)

```yaml
    big_lantern_on:
      base: "ia:elitefantasy:big_lantern_on" #Item base
      transformation:
        stages: #The stages are as to what next model it will change to
          1:
            furniture_id: "ia:elitefantasy:big_lantern_off"
    big_lantern_off:
      base: "ia:elitefantasy:big_lantern_off" #Item base
      transformation:
        stages: #The stages are as to what next model it will change to
          1:
            furniture_id: "ia:elitefantasy:big_lantern_on"
```

### Permission on Stages

If the player does not have the specified permission, they will not do anything.

```yaml
        stages:
          1:
            block_id: "ia:elitefantasy:fish_destroyed_sand_2"
            permission: "unearth.test1"
          2:
            block_id: "ia:elitefantasy:fish_destroyed_sand_3"
            permission: "unearth.test2"
```

### Multiple Base

This allows you to create configurations with multiple bases, making it easier to create configurations, it is important to specify at the end `“mc:example;example_1”` as it will end up being the id `“mc:example_example_1”` and will fix errors.

```yaml
unearth:
  block:
    white_stripped_log_1:
      base:
        - "mc:stripped_oak_log;1"
        - "mc:stripped_spruce_log;2"
        - "mc:stripped_birch_log;3"
        - "mc:stripped_jungle_log;4"
        - "mc:stripped_acacia_log;5"
        - "mc:stripped_dark_oak_log;6"
        - "mc:stripped_mangrove_log;7"
        - "mc:stripped_cherry_log;8"
        - "mc:stripped_warped_log;9"
        - "or:white_stripped_log;10"
        - "or:orange_stripped_log;11"
        - "or:magenta_stripped_log;12"
        - "or:light_blue_stripped_log;13"
        - "or:lime_stripped_log;14"
        - "or:yellow_stripped_log;15"
        - "or:pink_stripped_log;16"
        - "or:gray_stripped_log;17"
        - "or:light_gray_stripped_log;18"
        - "or:cyan_stripped_log;19"
        - "or:purple_stripped_log;20"
        - "or:blue_stripped_log;21"
        - "or:brown_stripped_log;22"
        - "or:green_stripped_log;23"
        - "or:red_stripped_log;24"
        - "or:black_stripped_log;25"
      tool:
        - "or:white_brush"
      transformation:
        stages:
          1:
            block_id: "or:white_stripped_log"
            reduce_durability: 1
```

### Sounds in Stages

<pre class="language-yaml"><code class="lang-yaml">unearth:
  block:
    white_stripped_log_1:
      transformation:
        stages:
          1:
<strong>            sounds:
</strong>              - sound: "minecraft:block.sand.break"
                volume: 1.0
                pitch: 1.0
                delay: 0
</code></pre>

### Delay on Stages

This is used to add delay when swapping blocks, for example when clicking it will take 1 second to swap, works on tool and stage.

```yaml
        stages:
          1:
            block_id: "or:white_stripped_log"
            delay: 6
            tool_anim_on_delay: true
```

### Execute Commands

If the command isn't run from the console, the player will run it

```yaml
      transformation:
        stages:
          1:
            furniture_id: "ia:glozz:furniture_0"
            execute_commands:
              - command: "clear {player}"
                as_console: true #true/false
```

### Region Conditions

{% hint style="warning" %}
This is for WorldGuard regions
{% endhint %}

| Types Available | Description                                                |
| --------------- | ---------------------------------------------------------- |
| `whitelist`     | Works only within the regions on the list                  |
| `blacklist`     | Foesn't work within the regions on the list                |
| `only_global`   | Works only outside WorldGuard regions (no list argument)   |
| `deny_global`   | It only works inside WorldGuard regions (no list argument) |

This only will works on regions `hospital` & `house`

```yaml
unearth:
  block:
    pattern_bricks_test:
      base: "ce:painter:pattern_bricks"
      transformation:
        stages:
          1:
            region-conditions:
              - type: whitelist
                list:
                  - hospital
                  - house
            block_id: "ce:painter:pattern_bricks[pattern=2]"
```

This only works if you're inside a region, but not inside the `spawn` or `safe_zone`

```yaml
           region-conditions:
              - type: deny_global
              - type: blacklist
                list:
                  - spawn
                  - safe_zone
```

### Food Feature

You can use this to make cake decorations

```yaml
      transformation:
        stages:
          1:
            food_add: 4
            saturation_add: 3.0
```

## Sequence in Stages

{% hint style="info" %}
This only supports some features, the list is [`<furniture/block>_id`](#furniture)*,* [*`<furniture/block>_random_id`*](#furniture_random_id)*,* [*`execute_commands`*](#execute-commands)*, and etc*
{% endhint %}

The sequence system is a way to add animations such as wait times between stages, allowing for greater customization when creating things.

```yaml
  block:
    black_bricks_test:
      base: "ia:painter:black_bricks"
      tool:
        - "mc:air"
      transformation:
        stages:
          1:
            block_id: "ia:painter:blue_bricks"
            sequence: #Each step is executed in sequence, followed by step 1.
              20: #delay step 2
                block_id: "ia:painter:yellow_bricks" # step 2
              40: #delay step 3
                furniture_id: "ia:painter:paint_mixer_2" # step 3
              60: #delay step 4
                block_id: "ia:painter:red_bricks" # step 4
          2:
            block_id: "ia:painter:white_bricks" #does not interfere with the sequence, a click is required to execute this stage
          3:
            block_id: "ia:painter:green_bricks"
```

For example, here, first `20` will be executed, then after another `20` ticks, `40` will be executed, and then after another `60`, like a kind of timeline

For example, in this example here, first `ia:painter:white_bricks` will be executed, then `ia:painter:pink_bricks`, then `ia:painter:lime_bricks`, and `finally ia:painter:yellow_bricks`

```yaml
        stages:
          1:
            block_id: "ia:painter:white_bricks" # step 1
            sequence:
              100:
                block_id: "ia:painter:yellow_bricks" # step 4
              10:
                block_id: "ia:painter:pink_bricks" # step 2
              20:
                block_id: "ia:painter:lime_bricks" # step 3
```

Example of logs

```json
[20:32:11 INFO]: handleStage applied for ia:painter:white_bricks in 67070
[20:32:11 INFO]: handleStage in Location{world=world,x=-429.0,y=92.0,z=401.0} - TICK: 67070
[20:32:11 INFO]: Stage 0 has 3 sequence steps.
[20:32:11 INFO]: handleStage applied for ia:painter:pink_bricks
[20:32:11 INFO]: handleStage in Location{world=world,x=-429.0,y=92.0,z=401.0} - TICK: 67080
[20:32:12 INFO]: handleStage applied for ia:painter:lime_bricks
[20:32:12 INFO]: handleStage in Location{world=world,x=-429.0,y=92.0,z=401.0} - TICK: 67090
[20:32:16 INFO]: handleStage applied for ia:painter:yellow_bricks
[20:32:16 INFO]: handleStage in Location{world=world,x=-429.0,y=92.0,z=401.0} - TICK: 67170
[20:32:16 INFO]: Sequence completed in Location{world=world,x=-429.0,y=92.0,z=401.0}
```

#### [furniture\_random\_id](#furniture_random_id) & [block\_random\_id](#block_random_id) also works here!

```yml
        stages:
          1:
            furniture_id: "ia:glozz:furniture_1"
            sequence:
              100:
                furniture_random_id:
                  - "ia:glozz:furniture_2;20"
                  - "ia:glozz:furniture_3;40"
                  - "ia:glozz:furniture_4;60"
                  - "ia:glozz:furniture_5;70"
                  - "ia:glozz:furniture_6;90"
```

#### [execute\_commands](#execute-commands) works here too!

```yaml
            sequence:
              20:
                furniture_id: "ia:glozz:furniture_2"
                execute_commands:
                  - command: "say {player} sequence 1"
                    as_console: true
              40:
                furniture_id: "ia:glozz:furniture_3"
                execute_commands:
                  - command: "clear {player}"
                    as_console: true
```

#### remove

This will immediately cancel the sequence

```yml
        stages:
          1:
            block_id: "ia:painter:white_bricks" # step 1
            sequence:
              100:
                remove: true
```

#### large example of a lot of features

```yaml
      transformation:
        stages:
          1:
            furniture_id: "ia:glozz:furniture_0_sequence"
            execute_commands:
              - command: "msg {player} 1"
                as_console: true #true/false
            items_add:
              - "ia:glozz:tomate;1;100"
            sounds:
              - sound: "minecraft:block.copper_grate.break"
                volume: 1
                pitch: 0.5
            sequence:
              20:
                furniture_id: "ia:glozz:furniture_1"
                execute_commands:
                  - command: "msg {player} 2"
                    as_console: true
                items_add:
                  - "ia:glozz:lechuga;1;100"
                sounds:
                  - sound: "minecraft:block.copper_grate.break"
                    volume: 1
                    pitch: 0.5
              40:
                furniture_id: "ia:glozz:furniture_2"
                execute_commands:
                  - command: "msg {player} 3"
                    as_console: true
                items_add:
                  - "ia:glozz:zanahoria;1;100"
                sounds:
                  - sound: "minecraft:block.copper_grate.break"
                    volume: 1
                    pitch: 0.5
```

### Timed Interaction

| Option           | Description                                                    |
| ---------------- | -------------------------------------------------------------- |
| `collect_window` | It is the time available for interaction                       |
| `outcomes`       | A list of possible outcomes depending on who you interact with |

```yaml
      transformation:
        stages:
          1:
            furniture_id: "ce:kitchen:pan_cooking"
            sequence:
              60:
                furniture_id: "ce:kitchen:pan_half_cooked"
              120:
                furniture_id: "ce:kitchen:pan_ready"
                timed_interaction:
                  collect_window: 60
                  outcomes:
                    spatula:
                      tool:
                        - "ce:kitchen:spatula"
                      success:
                        furniture_id: "ce:kitchen:empty_pan"
                        items_add:
                          - "mc:cooked_beef;100;1"
                    plate:
                      tool:
                        - "mc:bowl"
                      success:
                        reduce_item_main_hand: 1
                        furniture_id: "ce:kitchen:empty_pan"
                        items_add:
                          - "mc:beef_stew;100;1"
                    fallback:
                      success:
                        furniture_id: "ce:kitchen:pan_burned"
                        sounds:
                          - sound: "minecraft:block.fire.extinguish"
                            volume: 1.0
                            pitch: 0.7
              200:
                furniture_id: "ce:kitchen:pan_burned"
                sounds:
                  - sound: "minecraft:block.fire.extinguish"
                    volume: 1.0
                    pitch: 0.7
```

{% hint style="danger" %}
This no Supports&#x20;

```yaml
                      tool:                 
                        - "mc:bowl;delay=6"
                        - "nexo:white_large_brush;depth=1;size=3;deep=3"
                      success:
                        delay: 6
```

{% endhint %}

## Remember the previous Block/Furniture

On apply changes

```yaml
      tool:
        - "ce:painter:magenta_brush;anim=ce:painter:z_magenta_brush_animation;delayAnim=15;sound=painter:painting_brush;delay=6;replaceOnBreak=ce:painter:painting_brush"
      transformation:
        stages:
          1:
            block_id: "ce:painter:magenta_planks"
            reduce_durability: 1
            remember_previous: true
```

To retrieve the block that existed before it was transformed, you must use `um:previous` id

{% hint style="danger" %}
Don't forget to include a `fallback_block_id` or `fallback_furniture_id`
{% endhint %}

```yaml
      tool:
        - "ce:painter:paint_remover;anim=ce:painter:z_paint_remover_animation;delayAnim=5;sound=painter:spray_can;delay=4"
      transformation:
        stages:
          1:
            block_id: "um:previous"
            fallback_block_id: "mc:oak_planks"
            reduce_durability: 1
```

## Tools Configurations

### Affect more than one 1x1 area

```yaml
      tool:
        - "or:white_brush;depth=1;size=3;deep=3"
      transformation:
        stages:
          1:
            block_id: "or:white_stripped_log"
            reduce_durability: 1
```

depth, deep, size

{% hint style="info" %}
if you add a value and do not add the others, it will automatically set the others to 1

durability will be subtracted depending on the number of blocks being replaced
{% endhint %}

### Item Animations on Tools

The animations for example are when you are interacting, you can use another item to simulate that you are painting it or something like that.

```
anim=<item_id>
```

```yaml
delayAnim=<number> 
#These are the ticks at which the tool will continue with its animation item when you stop painting.
```

```yaml
      tool:
        - "nexo:black_brush;anim=nexo:z_black_brush_animation;delayAnim=15"
```

### Sounds on Tools

```yaml
      tool:
        - "nexo:black_brush;sound=mc:item.brush.brushing.generic"
```

### Delay on Tools

This is used to add delay when swapping blocks, for example when clicking it will take 1 second to swap, works on tool and stage.

```yaml
      tool:
        - "or:white_brush;delay=6"
```

### replaceOnBreak

This will allow that for example, when the item you are using loses all its durability, you can give another item with a broken model or something like that that you can reuse instead of crafting another one.

```yaml
      tool:
        - "nexo:black_large_roller;replaceOnBreak=nexo:large_paint_roller"
```

### Permission Per Tool

If the player does not have the specified permission, they will not do anything.

```yaml
      tool:
        - "ia:painter:blue_brush;permission=unearth.webo1"
        - "ia:painter:blue_roller;permission=unearth.webo2"
        - "ia:painter:blue_spray_can;permission=unearth.webo3"
        - "ia:painter:blue_large_roller;permission=unearth.webo4"
```

### TintFurniture Tool

```yaml
      tool:
        - "nexo:black_brush;tintfurniture=255,255,255"
```

## Unique CraftEngine examples

Change the BlockState of Craftengine Block

<pre class="language-yaml"><code class="lang-yaml"><strong>  block:
</strong>    pattern_bricks_test:
      base: "ce:painter:pattern_bricks[pattern=1]"
      tool:
        - "mc:air"
      transformation:
        stages:
          1:
            block_id: "ce:painter:pattern_bricks[pattern=2]"
</code></pre>

Change the Variant of Craftengine Furniture

```yaml
  furniture:
    oak_chair_test:
      base: "ce:painter:oak_chair[variant=ground]"
      tool:
        - "mc:air"
      transformation:
        stages:
          1:
            furniture_id: "ce:painter:oak_chair[variant=wall]"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://plugins.elitefantasy.net/mechanics/unearthmechanic/config-examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
