Skip to content

2 Advanced Users

MagmaGuy edited this page Oct 25, 2023 · 5 revisions

Note: It is recommended you read the Basic Users page first!

Debugging

Commands

/betterstructures reload

/betterstructures reload (or /bs reload) reload the BetterStructures configurations and schematics.

Reloading allows you to add or remove structures after modifying the files in the schematic folder, or apply generator edits to the generators folder.

/betterstructures place

/betterstructures place <schematicname> <schematictype> (or /bs place <schematicname> <schematictype>) places a schematic following the type logic. Valid types are SURFACE, SKY, LIQUID_SURFACE, UNDERGROUND_SHALLOW and UNDERGROUND_DEEP.

Placing allows you to see how a build gets placed in the world. This can be useful to see how well it fits, if it has any specific issues and to test mob spawning, among other things. This bypasses specific generator restrictions - if you want to test generators, you will have to do so by flying around and manually verifying it.

/betterstructures lootify

/betterstructures lootify <treasure> <rarity> <minamount> <maxamount> <chance> allows you to add a held item to the loot list of the generator. This allows you to add complex custom items to the loot tables of chests, and possibly to do so with items from various plugins (compatibility should be good, but is not guaranteed).

Note that treasure is the file name of your treasure file, such as they appear in the treasures folder of BetterStructures.

Rarity is the rarity table that will be used for the roll. When a chest is being filled, each slot that gets filled rolls to see which rarity will be used for the item, and then it will roll inside of that rarity table to see what item from the table gets picked. You can see what the default rarities are inside of the generator configuration files. The default rarities of the plugin are common, rare and epic, and admins can modify existing rarities, add new rarities and even delete specific rarities.

Permissions

Currently, there is only one permission in BetterStructures - betterstructures.warn . This permission is made for admins and notifies admins when a build gets placed by the plugin. Admins can click on this notification to teleport to the build. This is the best way of testing generator settings and build placement.

Everything else requires betterstructures.* which is the default OP permission.

Customizing content

Everything distributed in BetterStructures is editable. You are able to modify any schematic files and generator settings to your liking.

Before you edit content, it is important you understand how the plugin fundamentally works.

Schematics

Schematics are files generated by WorldEdit or FastAsyncWorldEdit which contain the blocks for the build you will be pasting. Detailed instructions on how to make a schematic are not included here, as they are thoroughly detailed on the WorldEdit and FastAsyncWorldEdit documentations, but it is generally done by picking two opposite corners of a cube using //pos1 and //pos2, then doing //copy and finally doing /schem save <schematicname>.

Special blocks

BetterStructures has two special blocks: barriers and bedrock. Any other block that WorldEdit / FAWE can paste will be pasted normally, but barriers and bedrock blocks are the exception. Instead of pasting, these blocks get replaced with the following custom behaviors:

Barrier

Barrier blocks tell the plugin not to paste any blocks at that location. This means that whatever block was originally there in the normal world generation will remain there.

Builders can use this to round the edges of a paste, making it look more natural, or to mold walls to a potential cave, among other tricks.

Bedrock

Bedrock blocks tell the plugin to guarantee that there is a floor at that location. This means that if a solid block is already there in the default world generation, that block will not be modified; however, if the block is solid or liquid, it will be replaced with a solid block from the pedestal. More on the pedestal mechanics later.

Builders can use this to create floors with features such as minecart rails on them or guarantee that a path exists without necessarily overriding the blocks originally at that location in the world.

Spawn signs

There is a special kind of sign in BetterStructures called spawn sign.

Spawning vanilla mobs

If you take a normal sign and place it somewhere, then make sure the first line says [spawn] and the second line has the entity type name following the Spigot API you will spawn a persistent entity at that location of the defined type.

As an example, if you have a sign that says [spawn] on the first line and ZOMBIE on the second line, you will spawn a zombie at that location when the build gets placed. This can also be used for non-living entities such as armorstands or ender crystals.

Spawning Elite Mobs (recommended boss plugin)

BetterStructures also has advanced EliteMobs integration, which allows it to create boss arenas based on builds and spawn signs.

If you take a normal sign and place it somewhere, making the first line [elitemobs] then you can use all other lines to say what boss file to use.

As an example, if you do [elitemobs] on the first line and then test_boss.yml, on the second line, you will spawn the test boss. If you have a very long filename such as boss_with_very_long_filename.yml, you can break it up into multiple lines, so make line 2 boss_with_very_ and then line 3 long_filename.yml and that will work.

As a reminder, by default the combat arenas will be protected until players kill all the bosses in the build if your server is using WorldGuard.

Spawning Mythic Mobs

BetterStructures also has simple MythicMobs integration, which allows it to spawn a mob from MythicMobs into the build. On the first line of a normal sign write [mythicmobs], then on the second line use the mob identified. You can use a number on the third line to set the level of the mob.

Applying these blocks

In order to better understand how these blocks work, it is recommended you move some of the default builds over to the schematics folder of your WorldEdit or FastAsyncWorldEdit plugin and paste them to see what they originally look like, and then use the paste command to see what the plugin pastes it as.

Anchor point

Anchor points are where you run the //copy command for the schematic. When simply pasting a schematic, these are where you are standing relative to the build.

Anchor points are important to get right for the schematics to work correctly.

  • For surface builds, it is recommended you stand at the lowest point of the floor when copying the build.
  • For underground builds, it is recommended you stand on top of the build.
  • For liquid builds, it is recommended you stand on top of the water.
  • For air builds, it is recommended that you stand on top of the build.

Please note that you should always be very close or directly on top of the builds when copying - the farther away you are, the laggier it will be when the build needs to be pasted.

Schematic configurations

Every schematic file has a schematic configuration. If a schematic file has just been added to the server, the configuration will be generated after a restart or after a /betterstructures reload.

These configurations allow you to set the following settings for the schematic paste:

isEnabled

Sets whether the schematic is enabled. If disabled, it will not be placed anywhere.

weight

Weight sets the weight of the schematic in terms of how likely it is to get picked.

The default value is 1.0. If you make a build have a 2.0 weight, it will be 2x more likely of getting selected than the other builds. If you make it 0.5, it will have half the chances of getting picked.

Note: Keep in mind that the odds of a specific build getting picked change drastically based on how many build there are in total competing for the location that will be getting a structure!

pedestalMaterial

Important: optional field!

Pedestal material sets the material type of the pedestal blocks using the spigot api material names - use them or it won't work!

Pedestals are the blocks that get placed under surface and underground buildings to fit any air gaps and improve a building's fit with the world. These are also the same blocks that replace bedrock blocks in the schematic.

When nothing is defined in the configuration, the blocks under the location for the paste get analyzed and the best fit gets selected as the material for the best integrated look.

generatorConfigFilename

This option sets the name of the configuration file, by file name, that the schematic will be using. This requires the full filename, including the .yml extension at the end. As an example, generatorConfigFilename: generator_surface_global.yml would be the correct option if you want to use the generator defined in generator_surface_global.yml which you can find in the generators configuration folder.

Generators

Generators are the most powerful part of the configuration system for BetterStructures. By default there are 27 generators which collectively manage over 200 builds currently distributed by BetterStructures, and while you can create your own generators, you can also use existing ones as a shortcut.

Generators tell the plugin where exactly things should spawn and define loot tables. The default generators are also named in ways that should be very easy to guess what they do.

The only mandatory field for generators is the structureType setting, which tells the plugin if the building is meant to spawn in the sky, shallow underground, deep underground, surface or surface liquid.

isEnabled

Sets whether the generator is enabled.

structureType

Sets what kind of structure the build is. Note that you can make a list of several types! This has the following settings:

surface

structureType: 
- SURFACE

Surface structures spawn at the surface of the world. The only exception is the Nether environment, where it spawns at points the plugin deems to be sufficiently surface-like.

sky

structureType: 
- SKY

Sky structures spawn between 80 to 120 blocks above the air, configurable in config.yml. The only exception is the Nether environment, where it spawns at points the plugin deems to be sufficiently air-like.

underground_shallow

structureType: 
- UNDERGROUND_SHALLOW

Underground shallow structures spawn between y=0 and y=60 in the overworld, y=60 and y=120 in the nether and any valid underground height in the End.

**Note: ** You will notice there are two underground settings. This is because only having one results in having a very sparse underground, as Minecraft has a lot of underground space and players will often times miss underground structure simply because they didn't mine into them. This also guarantees that there is an even spread across different depths.

underground_deep

structureType: 
- UNDERGROUND_DEEP

Underground deep structures spawn between y=-64 and y=0 in the overworld, y=0 and y=60 in the nether and do not spawn in the End.

liquid_surface

structureType: 
- LIQUID_SURFACE

Liquid surface structures will spawn on liquids. In the case of the overworld, they will spawn on water, and almost always on oceans. In the case of the Nether, they will spawn in the lava lakes. They will not spawn in the End.

lowestYLevel

Sets the lowest Y level (altitude) the structure will spawn in.

highestYLevel

Sets the highest Y level (altitude) the structure will spawn in.

validWorlds

Sets the list of worlds the structure will spawn in. If no list is present, it will use all worlds allowed by the plugin, unless otherwise limited (such as by the environment type or biomes).

validBiomes

Sets the list of valid biomes the structure will spawn in. If no list is defined, it will assume every biome is valid!.

This requires using the list of biomes as defined by the Spigot API.

chestEntries

Sets the list of chest entries that chests can have. If a structure has chests, the contents of the chest will be randomized based on this list. If no list exists, chests will not be filled.

This list has a subset of configurations, which are as follows:

material

Sets the material using the Spigot API names of the item to potentially drop.

amount

Sets the amount to drop. This is expressed as a range as follows amount=MIN-MAX. As an example, to drop between 1 to 5 items: amount=1-5.

chance

Sets the chance of the item to drop. This is a value between 0 and 1, where 0 is 0%, 1 is 100% and 0.5 is 50%.

example

chestEntries:
- material=COAL:amount=2-5:chance=0.02
- material=BONE:amount=2-5:chance=0.02

Please take note of the specific use of = and : as separators. This is very format-sensitive.

serialized

Serialized is a special case for when items have been added to the generator using the lootify command. These values are not readable by humans, and need to be generated from in-game. The serialized option replaces the material option in this case.