# The work of mystics

## Spawn

**The mystic will spawn with a certain chance after a certain cooldown at certain coordinates, there are 2 types of spawn**:

* On random coordinates, in the range from *x1* to *x2* and from *z1* to *z2*
* At the specified coordinates - xyz

<figure><img src="https://3028028495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FigwAQPzNc2IW1lWYcLlM%2Fuploads%2Fd3eQB5b0fliYINaLwMFc%2F2024-09-21_23.29.14.png?alt=media&#x26;token=7ee8d4fb-d79e-4afc-b55d-d4b7ba5fd647" alt=""><figcaption><p><strong>en a mystic spawns, a message is displayed in the world chat</strong></p></figcaption></figure>

{% hint style="info" %}
After this, the mystic himself will not spawn completely, he will wait until players appear at needDistance and only then will he physically spawn
{% endhint %}

**There are also several other message types**<br>

<figure><img src="https://3028028495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FigwAQPzNc2IW1lWYcLlM%2Fuploads%2FJ08AakT9Jm1Oaud5RrcX%2Ffirst%20open.gif?alt=media&#x26;token=985d29ba-4d77-49a0-ae8f-d5feeb071db0" alt=""><figcaption><p>First open message</p></figcaption></figure>

<figure><img src="https://3028028495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FigwAQPzNc2IW1lWYcLlM%2Fuploads%2FzV6FIxHtXKyVJKansNtA%2Ffirst%20open%202%20.gif?alt=media&#x26;token=fb3be4dd-ba03-43ec-ae71-10cffb0e7586" alt=""><figcaption><p>First opening after timer</p></figcaption></figure>

{% hint style="info" %}
There is also a message blocking opening
{% endhint %}

## Region

When it spawns, a region is created around it in order to avoid breaking the block itself and its surroundings

> You can also configure flags and prohibited commands of the region, as well as the size of the region

## Holograms

It is possible to add holograms in mysticism and change them

> This is what yml looks like with the settings:

```yaml
hologram:
  timerInHologram: true # TRUE - there will be a line "Before opening: %s"
  beforeOpen:
    - "&6&lFlame Mystic Chest"
    - "&c&l%name &f&l- Burning with Power!"
    - "&4&m-------------------------"
    - "&eOpening in: &f&l%timer"
    - "&4&m-------------------------"
  afterOpen:
    - "&6&lFlame Mystic Chest"
    - "&c&l%name &f&l- The Flames Have Awakened!"
    - "&a&m-------------------------"
    - "&7The chest has opened!"
    - "&a&m-------------------------"
```

**Here is a list of available placeholders**

```
%timer
%name
%x
%y
%z
```

## Mystic type

The mystic type is a block material that will be represented as the mystic itself

<details>

<summary>Free types (3)</summary>

{% code lineNumbers="true" %}

```
CHEST,
ENDER_CHEST,
CHEST_MINECART
```

{% endcode %}

</details>

<details>

<summary>Premium types (189)</summary>

{% code lineNumbers="true" %}

```
CHEST,
ENDER_CHEST,
STONE,
ANDESITE,
GRANITE,
DIORITE,
POLISHED_ANDESITE,
POLISHED_GRANITE,
POLISHED_DIORITE,
COBBLESTONE,
STONE_BRICKS,
MOSSY_COBBLESTONE,
MOSSY_STONE_BRICKS,
CRACKED_STONE_BRICKS,
CHISELED_STONE_BRICKS,
BRICKS,
NETHER_BRICKS,
RED_NETHER_BRICKS,
BLACKSTONE,
POLISHED_BLACKSTONE,
POLISHED_BLACKSTONE_BRICKS,
GILDED_BLACKSTONE,
OBSIDIAN,
CRYING_OBSIDIAN,
BASALT,
POLISHED_BASALT,
SMOOTH_BASALT,
QUARTZ_BLOCK,
CHISELED_QUARTZ_BLOCK,
PILLAR_QUARTZ_BLOCK,
SMOOTH_QUARTZ_BLOCK,
PRISMARINE,
PRISMARINE_BRICKS,
DARK_PRISMARINE,
SANDSTONE,
CHISELED_SANDSTONE,
CUT_SANDSTONE,
SMOOTH_SANDSTONE,
RED_SANDSTONE,
CHISELED_RED_SANDSTONE,
CUT_RED_SANDSTONE,
SMOOTH_RED_SANDSTONE,
END_STONE,
END_STONE_BRICKS,
PURPUR_BLOCK,
PURPUR_PILLAR,
NETHERITE_BLOCK,
ANCIENT_DEBRIS,
IRON_BLOCK,
GOLD_BLOCK,
DIAMOND_BLOCK,
EMERALD_BLOCK,
COAL_BLOCK,
LAPIS_BLOCK,
REDSTONE_BLOCK,
HONEYCOMB_BLOCK,
BONE_BLOCK,
SEA_LANTERN,
GLOWSTONE,
MAGMA_BLOCK,
SLIME_BLOCK,
HONEY_BLOCK,
SHULKER_BOX,
CLAY,
TERRACOTTA,
WHITE_TERRACOTTA,
ORANGE_TERRACOTTA,
MAGENTA_TERRACOTTA,
LIGHT_BLUE_TERRACOTTA,
YELLOW_TERRACOTTA,
LIME_TERRACOTTA,
PINK_TERRACOTTA,
GRAY_TERRACOTTA,
LIGHT_GRAY_TERRACOTTA,
CYAN_TERRACOTTA,
PURPLE_TERRACOTTA,
BLUE_TERRACOTTA,
BROWN_TERRACOTTA,
GREEN_TERRACOTTA,
RED_TERRACOTTA,
BLACK_TERRACOTTA,
WHITE_CONCRETE,
ORANGE_CONCRETE,
MAGENTA_CONCRETE,
LIGHT_BLUE_CONCRETE,
YELLOW_CONCRETE,
LIME_CONCRETE,
PINK_CONCRETE,
GRAY_CONCRETE,
LIGHT_GRAY_CONCRETE,
CYAN_CONCRETE,
PURPLE_CONCRETE,
BLUE_CONCRETE,
BROWN_CONCRETE,
GREEN_CONCRETE,
RED_CONCRETE,
BLACK_CONCRETE,
WHITE_GLAZED_TERRACOTTA,
ORANGE_GLAZED_TERRACOTTA,
MAGENTA_GLAZED_TERRACOTTA,
LIGHT_BLUE_GLAZED_TERRACOTTA,
YELLOW_GLAZED_TERRACOTTA,
LIME_GLAZED_TERRACOTTA,
PINK_GLAZED_TERRACOTTA,
GRAY_GLAZED_TERRACOTTA,
LIGHT_GRAY_GLAZED_TERRACOTTA,
CYAN_GLAZED_TERRACOTTA,
PURPLE_GLAZED_TERRACOTTA,
BLUE_GLAZED_TERRACOTTA,
BROWN_GLAZED_TERRACOTTA,
GREEN_GLAZED_TERRACOTTA,
RED_GLAZED_TERRACOTTA,
BLACK_GLAZED_TERRACOTTA,
BEEHIVE,
BEE_NEST,
BARREL,
BLAST_FURNACE,
BELL,
CAMPFIRE,
CARVED_PUMPKIN,
CARTOGRAPHY_TABLE,
CAULDRON,
COAL_ORE,
COARSE_DIRT,
COBWEB,
CRAFTING_TABLE,
DIAMOND_ORE,
DIRT,
DISPENSER,
DRIED_KELP_BLOCK,
DROPPER,
EMERALD_ORE,
FLETCHING_TABLE,
FURNACE,
GOLD_ORE,
GRASS_BLOCK,
GRAVEL,
IRON_ORE,
JIGSAW,
JUKEBOX,
LECTERN,
LODESTONE,
MELON,
MOSS_BLOCK,
MOSS_CARPET,
NOTE_BLOCK,
PISTON,
PUMPKIN,
REDSTONE_ORE,
SMITHING_TABLE,
SMOKER,
SNOW_BLOCK,
SOUL_SAND,
SOUL_SOIL,
SPONGE,
TNT,
WET_SPONGE,
BOOKSHELF,
DAYLIGHT_DETECTOR,
DRAGON_EGG,
END_PORTAL_FRAME,
ENCHANTING_TABLE,
END_ROD,
END_CRYSTAL,
FARMLAND,
GRINDSTONE,
JACK_O_LANTERN,
LANTERN,
LECTURN,
STONECUTTER,
TARGET,
TURTLE_EGG,
WITHER_ROSE,
WHITE_WOOL,
ORANGE_WOOL,
MAGENTA_WOOL,
LIGHT_BLUE_WOOL,
YELLOW_WOOL,
LIME_WOOL,
PINK_WOOL,
GRAY_WOOL,
LIGHT_GRAY_WOOL,
CYAN_WOOL,
PURPLE_WOOL,
BLUE_WOOL,
BROWN_WOOL,
GREEN_WOOL,
RED_WOOL,
BLACK_WOOL
```

{% endcode %}

</details>

## Loot

This is what the default mystic setting looks like, loot is configured in the menu

```
loot:
  chestName: "Mystic сontents"
  size: 27
  cooldownSpawnItem: 10 #Time in ticks after which objects will appear

  items:
    1:
      chance: 1.0 
      range: 1-64
      stack:
        ==: org.bukkit.inventory.ItemStack
        v: 2586
        type: DIAMOND
        amount: 5
```

{% hint style="info" %}
As you can see, setting up default items in yml is inconvenient, but why? Because items are configured via gui
{% endhint %}

<figure><img src="https://3028028495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FigwAQPzNc2IW1lWYcLlM%2Fuploads%2Fu9fa0LHvlaMRzkKEKImU%2Ftickitems.gif?alt=media&#x26;token=8dbadf3a-7be4-4449-a135-61b69eb73336" alt=""><figcaption><p>Item spawn cooldown</p></figcaption></figure>

## Animations&#x20;

There are 4 types of activation animations

1. Block animation - triggers when the mystic is not available for opening
2. First open animation - triggers when someone tries to activate mystic for the first time
3. Start open animation - triggers when someone opens the mystic for the first time after it has been activated
4. Spawn animation - triggers when the mystic spawns

> Here is a list of all available animations:

<details>

<summary>Free animation (5)</summary>

AURA - Surround the chest with an aura\
MYTHIC\_CYCLE - Cyclically change colors around the chest \
FIRE\_TORNADO - Fire tornado around the chest \
FALL\_STAR - Falling stars above the chest \
ENCHANTED - Enchantment effect coming from the chest&#x20;

</details>

<details>

<summary>Premium animation (60)</summary>

AURA - Surround the chest with an aura\
MYTHIC\_CYCLE - Cyclically change colors around the chest \
FIRE\_TORNADO - Fire tornado around the chest \
FALL\_STAR - Falling stars above the chest \
ENCHANTED - Enchantment effect coming from the chest \
CRYSTAL - Crystals appearing around the chest \
DANCE - Dancing particles around the chest \
FEATHER - Flying feathers around the chest \
FOG - Mystical fog surrounding the chest \
FROST - Freezing the space around the chest \
LEAF - Falling leaves around the chest \
MAGIC - Magic sparks around the chest \
METEOR - Small meteors fall on the chest \
SAND - A whirlwind of sand around the chest \
SHINE - Bright shine around the chest \
WATER\_WHIRL - Water funnel around the chest \
THUNDER - Thunder and lightning around the chest \
GLOW -  Soft glow of the chest \
SPARKLES - parkling particles like fireworks \
BLOOM - Blooming animation like a flower \
VINES - Climbing vines entwining the chest \
LAVA\_BUBBLES - Lava bubbles rising around the chest \
SNOW - Snowfall around the chest \
RAINBOW - Rainbow particles around the chest \
ASH - Falling ash around the chest \
THORNS - Thorns appearing around the chest \
GHOSTLY - Ghostly silhouettes floating around the chest \
FLAME\_RING - Fire ring around the chest \
BUBBLE - Air bubbles rise around the chest \
DRAGON\_BREATH - Dragon's breath surrounding the chest \
TWINKLE - Flickering lights around the chest \
WAVE, - Waves of energy emanating from the chest \
SHADOW - Shadows surrounding the chest \
ORBIT - Particles rotate around the chest like planets \
FLARE - Flashes of light around the chest \
EXPLOSION - Explodes small particles around the chest \
PULSATE - Pulsating light around the chest \
BREATH - Effect of breathing around the chest \
ILLUSION - Illusory figures appearing next to the chest \
GLOWING\_RUNE - Glowing runes surrounding the chest \
VEIL - A veil of fog or smoke enveloping a chest \
COMET - Comets flying over the chest \
BLOOD - Bloody rain around the chest \
PETALS - Falling flower petals around the chest \
NEBULA - Heavenly clouds, like a nebula, around the chest \
CANDLE - Flickering candles around the chest \
SPIRAL - Spiral particles around the chest \
CHAOS - Random particle chaos around the chest \
GLITTER - Shiny particles showering the chest \
EMBER - Embers rising up around the chest \
CORONA - Solar crown glowing around the chest \
RADIANCE - Outgoing radiance that creates an aura effect \
SPIRIT -  Ghostly figures floating slowly around the chest \
PHANTOM - Phantom flashes that disappear and reappear \
WISP - Little lights wandering around the chest \
HORIZON - The effect of a horizontal beam spreading from the chest \
CHRONO - Stopped time effect, particles freeze around the chest \
MYST - Mysterious smoke slightly surrounding the chest \
SPARK - The effect of sparks randomly flashing around the chest \
ORE - Flying balls of light around the chest

</details>

## Statistical Mystic

If you set the mystic's statistics, then he will not respawn in another place, but will remain in the same place after respawning.

## Disappearance

Mystic disappears 5 times:

* The cooldown expires and it respawns itself
* He gets looted and disappears

  <figure><img src="https://3028028495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FigwAQPzNc2IW1lWYcLlM%2Fuploads%2Flet4GfIrGYx1zWlvts2P%2Fdeleteafterloot.gif?alt=media&#x26;token=0f050140-19db-46b5-b6dd-1ea50625ed20" alt=""><figcaption></figcaption></figure>
* When the mystic has not been looted and past a certain amount of time
* When the mystic was not looted
* Command /mystic despawn or delete

## MythicMobs

If you want to make your mystic discovery more exciting and challenging, then you connect MythicMobs and when the mystic spawns, your mob will appear

## Discarding

When the mystic is activated, all nearby players will be thrown aside. This function is configured in yml

{% code title="config.yml" %}

```yaml
discardingPlayers: false
powerDiscarding: 3
```

{% endcode %}
