Adding custom Structure: The Command - Silverminer007/Shrines GitHub Wiki

The shrines-structures Command

This is the command to add custom structures to your worlds. The command as multiple options to use. Let's go over them.

add

/shrines-structures add <name> [<seed>]

  • This command adds a structure to the list of structures that should be generated in your worlds.
  • The Parameter <name> is the name, that your structure will have. This is needed in later commands too. Only small letters are allowed
  • The Paramter [<seed>] is optional. That means, that you don't have to give a value to this. The seed decides where the structures are placed in the worlds similar as Minecraft world seed decides how your world looks like.

Example

We want to a new structure named "giant_flower" To do this we use /shrines-structures add giant_flower Now we want to set a seed too (Here is only a random choosen integer used, this has no meaning) To do this we use /shrines-structures add giant_flower 687543596328

remove

/shrines-structures remove <name> [<fromDisk>]

  • The command removes the structure from the list of structures to generate. This will cause worlds, that were loaded with this structure to stop saving. To only stop generation use /shrines-structures configure <name> generate false, but more to this comes later
  • The Parameter <name> indicates which structure should be removed. Only existing structures are possible (To see which are possible use query, explained below)
  • The Parameter [<fromDisk>] indicated wether the data of your structure should also be deleted from disk (default: false). This would also delete related resource files (*.nbt files)

Example

We want to remove the structure we've added above, So we use /shrines-structures remove giant_flower We didn't add any resource file, so we can delete it from disk too. So we use /shrines-structures remove giant_flower true

query

/shrines-structures query [<name>]

  • This command gives information about custom structures
  • Using the command without the Parameter [<name>] will give a list of every added custom structure
  • Using the command with the parameter [<name>] will give a list of all config options with their value

Example

We've add a new structure and wants to see wether it was added succesfully or not We use /shrines-structures query to get a list of structures and we now search for the new added one. It's one of the outputs, so adding was successful

Now that we know addding the new structure "giant_flower" was successful we want to see how it's configured, so we use /shrines-structures query giant_flower and see a list of all options and values

configure

/shrines-structures configure <name> <option> <value>

  • This command changes the given option of the given structure to the given value
  • The Parameter indicates which structure should be configured
  • For the Parameter there are some possible possibilities and such related values. Here is the list:

generate

  • This option indicates wether the structure should be generated or not
  • As value only true/false is possible

seperation

  • This options idicates the min. distance between two versions of the structure
  • As value is an integer needed, but this should always be positive and smaller than distance

distance

  • This options idicates the max. distance between two versions of the structure
  • As value is an integer needed, but this should always be positive and higher than seperation

spawn_chance

  • This option indicates the chance of a structure to spawn after a complete successful spawn validation
  • The value is an double betwen 0.0 and 1.0

seed

  • The use of an seed is explained at "add" section
  • The value should be a positive integer

needs_ground

  • This option indicates wether under the structure should be placed ground (dirt) to fill up, if there would only be air, as in cliffs or so on
  • The value is a bool (true/false)

use_random_varianting

  • There is an special feature of this mod called "random varianting". This can turn this on and off. Random varianting replaces in the one structure oak_planks with spruce_planks and in an other oak_planks with jungle_planks and so on
  • The value is a bool (true/false)

ignore_air

  • This option idicated wether all air in the structure resource should be forced to be air
  • The value is a bool (true/false)

categories

  • This is a list of possible Biome CATEGORIES for the structure to spawn in.
  • Possible Categories are [NONE,TAIGA,EXTREME_HILLS,JUNGLE,MESA,PLAINS,SAVANNA,ICY,THEEND,BEACH,FOREST,OCEAN,DESERT,RIVER,SWAMP,MUSHROOM,NETHER]. Special values, that only can be used alone are ["ALL", "DEFAULT"]. ALL means every possible category and DEFAULT means [FOREST,PLAINS,TAIGA]

blacklist

  • This is a list of biomes, the structure can't spawn in
  • Possible values are keys of biomes. Default minecraft biome keys starts with "minecraft:". Other mods may add some extra ones List of default minecraft biomes. The list should start with "[" and end with "]". Every biome should be seperated by ","

pieces

  • This is a list of pieces with their offset value. Each piece relates to a resource (*.nbt) file.
  • Each element is sourrounded with "[]" and the whole list is also sourrounded with "[]". The elements are seperated by "+". Each element contains a resource path and an offset position. An possible element with it's sourrounding "[]" would be "[example,[-7,2,3]"

Examples

We want to stop the structure "giant_flower" to stop generating, so we use: /shrines-structures configure giant_flower generate false

We want the structure "giant_flower" to make a spawn try every 17 - 50 chunks, so we use /shrines-structures configure giant_flower seperation 17 and /shrines-structures configure giant_flower distance 50

We want the structure "giant_flower" to accept only one of 10 tries so we use /shrines-structures configure giant_flower spawn_chance 0.1, because (1.0/10 = 0.1)

We want to change the seed of "giant_flower" to "87654320893", so we use /shrines-structures configure giant_flower seed 87654320893

"giant_flower" is a flower so we want it to have a solid ground so we use /shrines-structures configure giant_flower needs_ground true

"giant_flower" should have a green main color everytime, so we disable "random varianting" by using /shrines-structures configure giant_flower use_random_varianting false

"giant_flower" is a flower, so on the down side there is much air, that would cause unnatural look, so we'll disable this suing /shrines-structures configure giant_flower ignore_air true

We want "giant_flower" to spawn in Forests, but not in Drak Forests, so we first add FOREST to the whitelist and then add "minecraft:dark_forest_hills" and "minecarft:dark_forest" to the blacklist. /shrines-structures configure giant_flower categories FOREST and /shrines-structures configure giant_flower blacklist [minecraft:dark_forest_hills,minecarft:dark_forest]

Our "giant_flower" is so big, that we can't save it to only one resource file, so we saved it in two ones. Now we have to tell the mod where are the resource files and how large the offset is. The first files is called "giant_flower_1" and the second one is called "giant_flower_2". "giant_flower_2" is 48 blocks above "giant_flower_1" so the offset is [0,48,0]. "giant_flower_1" is should be directly on the ground so the offset there is [0,0,0]. This results in following command: /shrines-structures configure giant_flower pieces [[giant_flower_1,[0,0,0]]+[giant_flower_2,[0,48,0]]]

help

/shrines-structures help

  • This gives a URL that links to this wiki
⚠️ **GitHub.com Fallback** ⚠️