Tutorial: Creating a schematic which creates a MythicMobs spawner when spawned - robotnikthingy/WorldSchematics2 GitHub Wiki
WorldSchematics2 allows you to create Mobs spawner from MythicMobs into schematics when spawned. For example, you can make it so that when a castle Schematic is spawned, there are spawners inside which spawn Minion Mobs which the player must battle through.
The plugin uses Mob Spawner blocks as markers to determine where to place the MythicMobs Spawner when the schematic is spawned in the world. Whenever you start the server or reload the plugin, WorldSchematics scans through your schematics and checks for the location of any Mob Spawner blocks and stores them in a -blockdata.yml configuration file.
Before you export your schematic with WorldEdit, make sure you have some Mob Spawners placed where you want your Mob to spawn, like in the example below
Then export the schematic using the WorldEdit command //schematic save Make sure you place it in the WorldSchematics2 world folder where you want it to spawn in, and then reload the plugin to generate the -blockdata.yml using the command /worldschematics reload
Next, we need to configure the -blockdata file, which is named -blockdata.yml
For the example schematic from above, it will look like this
Blocks:
BlockNBT1:
type: spawner
x: 4
y: 2
z: 4
mobs: {}
properties: {}Here is some info on the options we see above
type - Tells WorldSchematics the type of block and what to do with it
x,y,z - Tells WorldSchematics the location of the block in the schematic. Do not change this.
mobs - What this does changes depending on what type is set to. Right now, it just changes the type of mob the spawner block will spawn. If nothing is put here, the spawner will just spawn whatever mob it was set to when the schematic was created. When we change the type to mythicspawner, this will determine which mob from MythicMobs the MythicSpawner will spawn. If you put more than one mob here the plugin will choose one at random to be spawned.
properties - What this does changes depending on what type is set to. There are many options and they will be explained below.
Since we want the plugin to create a MythicMobs Spawner, we will set type to mythicspawner . This tells WorldSchematics that we want the Spawner Block to be replaced by a MythicMobs Spawner when the schematic is spawned.
In this example, we will use the AngrySludge mob which comes with MythicMobs. The config will now look like this.
Blocks:
BlockNBT1:
type: mythicspawner
x: 4
y: 2
z: 4
mobs:
- AngrySludge
properties: {}So now when the schematic is spawned, the Spawner Block will be removed and in its place will be a MythicMobs Spawner which spawns the AngrySludge mob.
Note: If you want to modify the spawner using MythicMobs, its config can be found in MythicMobs\Spawners , the spawner will be named WorldSchematics__Locxyz
You can also add some customization by configuring the properties section. Here are some configuration options you can add to the properties section
checkforplayers: <true/false> - Whether or not players must be near the spawner for it to “activate”
cooldown: <number> - This the amount of time in seconds that the spawner waits after a mob has been spawned before it kicks off the warmup timer.
group: <group name> - This sets the group name for the spawner
leashrange: <true/false> - This is the max distance that a mob can move from its spawn location before it is teleported back to where it came from.
healonleash: <true/false> - Whether the mob should heal to full health when it leashes back to its spawner
maxmobs: <number> - This is the max number of mobs that can be spawned and existing in the world for this spawner.
moblevel: <level> - This is the level of the mob that should spawn from this spawner. Mob must have level configuration for this to work. Can only be a single level.
mobsperspawn: <number> - This is the number of mobs spawned each time the spawner spawns a mob. This is limited by the maxmobs settings.
radius: <radius> - This is the radius around the spawner at which the mob can spawn. setting to 0 will cause the mob to spawn exactly on its spawner. Setting it to 5 will allow the mob to spawn anywhere within a 5 block radius of the spawner.
showflames: <true/false> - Set this to true to show flames around the spawner. Useful for debugging purposes.
For example, the below config will create a spawner which spawns 3 level 2 SkeletalMinions's each time it activates, and will spawn them in a radius of 12 blocks.
Blocks:
BlockNBT1:
type: mythicspawner
x: 4
y: 2
z: 4
mobs:
- SkeletalMinion
properties:
- moblevel: 2
- mobsperspawn: 5
- radius: 12
