# Your First Spawner

## Your first spawner

A 5-minute walkthrough. By the end you'll have a working wild spawner placed somewhere on your survival map, spawning custom mobs when players approach.

### Step 1 — Look at the example preset

`wild-presets.yml` ships with one example preset to get you started. Open it in any text editor:

```yaml
presets:
  example_preset:
    display-name: "<gold>⚔ Example Spawner</gold>"
    provider: mythicmobs
    enabled: true
    allow-empty: false
    normal-mobs:
      - ExampleMob
    ominous-mobs:
      - ExampleEliteMob
```

This preset uses MythicMobs as its mob provider. If you don't have MythicMobs installed, change `provider: mythicmobs` to `provider: vanilla` and replace the mob ids with vanilla types:

```yaml
presets:
  example_preset:
    display-name: "<gold>⚔ Example Spawner</gold>"
    provider: vanilla
    enabled: true
    normal-mobs:
      - minecraft:zombie
      - minecraft:skeleton
    ominous-mobs:
      - minecraft:wither_skeleton
```

Save the file and reload:

```
/tcpws reload
```

The plugin will log how many presets were loaded.

### Step 2 — Give yourself a spawner

```
/tcpws give example_preset YourName 1
```

Replace `YourName` with your in-game name. You'll receive an enriched trial-spawner item with the preset's display name and lore. The PDC tag `tcp:preset_id` is what marks it as a wild-preset spawner.

(Look at the item's tooltip — the bottom line is the preset id; the top is the display name. If you don't see custom text, the give failed; check the console for an error.)

### Step 3 — Place the spawner

Right-click anywhere in the world to place the spawner block. As soon as it's placed:

* Vanilla treats it like a normal trial spawner — same texture, same cage, same activation behaviour.
* A floating **hologram** appears above it showing the preset name, state (`Activating…` or `Cooldown: MM:SS`), and provider.
* The spawner immediately starts watching for players within its activation range (default 14 blocks vanilla; configurable per preset via `spawner_presets.yml` in TCP free).

### Step 4 — Walk into the activation range

Move to within \~14 blocks of the spawner. Watch the hologram:

* It first shows `Spawning: <obf>?????</obf>` (vanilla) or `Spawning: <rainbow>MythicMobs</rainbow>` (non-vanilla). That's the "mystery" state — players outside the activation range see this.
* When you're inside the activation range, the line resolves to the actual mob list, cycling through each id every second.

Mobs spawn, just like vanilla. Fight them, win the wave, get the vanilla rewards (vault keys, ominous bottles, XP).

### Step 5 — Try the mob tether

Spawn one wave's worth of mobs. Run away — try to lead one of them 30+ blocks from the spawner.

You'll see the mob start sprinting back toward the spawner once it gets too far. That's the **mob tether** — the mob can't follow you forever; if it strays past the configured distance (default 16 blocks), Paper's pathfinder pulls it back.

This solves the classic frustration of vanilla trial spawners where mobs disappear into the distance and waves never complete.

### Step 6 — Mine it up

Now the differentiator. Walk back to the spawner and **mine the block** like any other.

(Default mining is enabled for everyone — see Mining and re-deploying for how to gate this behind a permission or per-preset.)

The spawner block breaks and drops as a portable item. Pick it up. The dropped item carries the spawner's complete state in its PDC:

* The preset id
* Your UUID + name as the original placer
* Whether it's the ominous variant
* Any tracked players
* Any remaining cooldown ticks

Re-place the item somewhere else. The new spawner block restores that state — same cooldown, same ominous flag, same tracked-players list. **You moved a live spawner without resetting it.**

### Step 7 — Try the preview command

Want to see what a preset looks like before issuing it? Look at any empty block face and run:

```
/tcpws preview example_preset
```

A 30-second preview spawner appears at your crosshair. It's non-functional — it won't spawn mobs, won't drop loot, won't react to right-click — but the hologram and visual cage cycling are live. After 30 seconds it cleanly disappears.

Useful for showing a player what a preset will look like before committing to giving them one.

***

That's a complete spawner cycle: configure, give, place, fight, mine, re-deploy. Everything else in the docs is configuration depth on top of this skeleton.

### Where to go next

* **Configuring wild-presets.yml →** — define your own presets, add multiple mob lists, configure griefing protection.
* **Custom mobs →** — using non-vanilla providers (MythicMobs, EliteMobs, etc.).
* **The admin GUI →** — every screen explained.
* **Distributing spawners →** — integrate with shop plugins, mob drops, quests.

### Cleaning up

If you're done testing and want to reset the example:

1. Mine the spawner (drops as an item).
2. Pick up the item, throw it into lava, or `/clear`.

The spawner is gone. No registration to clean up — wild spawners are "placed by the player" and tracked entirely by the placed block's PDC.


---

# 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://darkstarworks.gitbook.io/plugins/mc/tcp-documentation/tcp-wildspawners/your-first-spawner.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.
