# Random Spawning

Custom mobs can spawn randomly throughout the world with this mechanic.

### How to disable?

Go into `plugins/AdvancedMobs/randomSpawning.yml` file, set `enabled` to false and restart.

### How to change which mobs randomly spawn?

In the same file as mentioned above, you will find a list of mobs that can randomly spawn. By default, it looks like this:

<pre class="language-yaml" data-title="randomSpawning.yml" data-line-numbers><code class="lang-yaml"># Random Spawn-able custom mobs list
<strong>mobsAllowedToRandomSpawn:
</strong>  - 'Demon'
  - 'Dog'
  - 'Dragon'
  - 'Flamingo'
  - 'Giraffe'
  - 'Gorilla'
  - 'Hippo'
  - 'Monkey'
  - 'Octopus'
  - 'Raccoon'
  - 'Raptor'
  - 'Robot'
  - 'Tiger'
  - 'Turtle'
  - 'Wyvern'
  - 'Zebra'
  - 'Snail'
</code></pre>

To remove a custom mob, just simply remove that entry from list and restart. To add a new one, simply add an entry with your wanted mob's name.

### Add a world in which mobs randomly spawn

By default, custom mobs spawn in `"world"` world only. To add new worlds, add an entry to `worldList` setting in randomSpawning.yml file. Below is an example where we add `custom_world` to our list.

<pre class="language-yaml" data-title="randomSpawning.yml" data-overflow="wrap" data-line-numbers><code class="lang-yaml"><strong># Worlds list for random spawning
</strong>#  In what worlds should random custom mobs spawn
worldList:
  - 'world'
  - 'custom_world'
</code></pre>

### Change biomes of where custom mobs spawn

To do that, go into `plugins/AdvancedMobs/customMobs` folder. Open any of the mobs file you want (the extension is `.amob` but the file acts like a `.yml` file - use your text editor to open it!).

Here's how the settings look like for Demon mob:

{% code title="customMobs/Demon.yml" overflow="wrap" lineNumbers="true" %}

```yaml
settings:
  health: 40
  sounds: WOLF
  hostile: true
  nametagHeight: 0.9
  damage: 8
  animateOnWalking: true
  animationSmoothness: 5
  animationSpeed: 2
  biomes:
    - 'ALL'
```

{% endcode %}

You can see the setting called `biomes`. To change biomes, simply add your entry from biome name list - <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html>.&#x20;

Adding entry `ALL` will allow the mob to spawn in any biomes.


---

# 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://mobs.advancedplugins.net/advancedmobs/mechanics/random-spawning.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.
