-
Notifications
You must be signed in to change notification settings - Fork 5
Tutorial: Creating a schematic which creates a MythicMob when spawned
WorldSchematics2 allows you to place entities into schematics when spawned. For example, you can make it so that when a castle Schematic is spawned, there is a boss mob located inside which players can fight. If you have MythicMobs installed, you can also have mobs from MythicMobs spawned as well.
The plugin uses Mob Spawner blocks as markers to determine where to place the mob 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 Spawners and stores them in a -blockdata.yml configuration file.
Before you export your schematic, 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 mythicmob, this will determine which mob from MythicMobs it 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 spawn a mob from MythicMob, we will set type to mythicmob . This tells WorldSchematics that we want the Spawner Block to be replaced by a mob from MythicMobs when the schematic is spawned.
In this example, we will use the SkeletonKing mob which comes with MythicMobs. The config will now look like this.
Blocks:
BlockNBT1:
type: mythicmob
x: 4
y: 2
z: 4
mobs:
- SkeletonKing
properties: {}
So now when the schematic is spawned, the Spawner Block will be removed and in its place will be the SkeletonKing mob
You can also add some customization by configuring the properties section. Here are some configuration options you can add to the properties section
moblevel: <level> - sets the level of the mob when spawned
amount: <number> - sets the amount of the mob which will be spawned
For example, the below config will spawn 5 level 2 SkeletalMinions's
Blocks:
BlockNBT1:
type: mythicmob
x: 4
y: 2
z: 4
mobs:
- SkeletalMinion
properties:
moblevel: 2
amount: 5