Skip to content

Adding Spheres

DaFuqs edited this page Dec 12, 2022 · 3 revisions

You can add new spheres using data packs. For this you will have to add a new json file in the directory data/<your_pack_name>/starry_skies/spheres. All of Starry's builtin spheres are added this way, too, so you can use those as a handy reference.

Let's take a look at one of the builtin spheres, the sand sphere that is supported by sandstone in it's bottom layer:

{
	"generation_group": "starry_skies:overworld/essential",
	"generation_weight": 4.0,
	"min_size": 5,
	"max_size": 13,
	"type": "starry_skies:modular",
	"type_data": {
		"main_block": "minecraft:sand",
		"bottom_block": "minecraft:sandstone"
	},
	"decorators": {
		"starry_skies:cactus": 0.3,
		"starry_skies:dead_grass": 0.3,
		"starry_skies:x_spot_desert_pyramid": 0.1
	},
	"spawns": [
		{
			"type": "minecraft:rabbit",
			"chance": 0.5,
			"min_count": 2,
			"max_count": 3
		}
	]
}

Since it's json file is included via the path /data/starry_skies/starry_skies/spheres/overworld/essential/sand.json, it's Sphere-ID will be starry_skies:overworld/essential/sand. This ID is used, for example, in advancements. Or you can use this ID to locate the closest sand sphere by using the command /starry_skies_sphere starry_skies:overworld/essential/sand.

On to the other properties:

  • generation_group: the group this sphere generates in. The overworld/essential group is always found in the overworld Starry Skies dimension, with high frequency (this generation group has a high weight and just a few spheres mapped to it)
  • generation_weight: the generation probability this sphere has in the overworld/essential group. Spheres with a higher weight will generate more frequently
  • min_size: the min size this sphere can generate with
  • max_size: the max size this sphere can generate with
  • type: the type of this sphere. This defines how the sphere will look. See below
  • type_data: additional data individual for each type
  • decorators: the decorators this sphere can generate with, in an id : chance format. This can be plants, a water pond, or in this case a 30 % chance for cactus, 30 % chance for dead bushes and a chance of 10 % to have an X on it with a creasure chest inside
  • spawns: the entities that can spawn on this sphere

Sphere Types

Sphere types define how the spheres blocks are distributed. If you are a modder integrating into Starry you can also create completely new ones.

While a sphere of type simple will only ever consist of a single block, the type core will consist of 2 different blocks: an inner and an outer one. Their required information will get pulled out of the type_data field in your json file.

Here are the ones you will most often be tinkering with:

simple

  • block: The block the sphere consists of

modular

A simple sphere with modifiable top and bottom blocks, like growing grass on top of dirt, or sand that is supported by a bottom layer of sandstone.

Type Data:

  • main_block: The block the sphere consists of
  • top_block (optional): The block used for the top layer
  • bottom_block (optional): The block used for the bottom layer

core

"a sphere in a sphere". Most commonly used for ore that is surrounded by stone, but useful for all kinds of stuff

Type Data:

  • main_block: The block the sphere consists of
  • core_block: The block used for the blocks in the center of the sphere
  • min_core_size: The min size the core
  • max_core_size: The max size of the core

shell

"a sphere in a sphere". Most commonly used for wood that is surrounded by matching leaves, but useful for all kinds of stuff

Type Data:

  • main_block: The block the sphere consists of
  • shell_block: The block used for the blocks around the center of the sphere
  • min_shell_size: The min size the shell
  • max_shell_size: The max size of the shell

fluid

A sphere filled with a fluid like water or lava, kept in shape by a solid shell

Type Data:

  • fluid: The fluid this sphere is filled with
  • shell_block: The block used for the blocks around the center of the sphere
  • min_shell_size: The min size the shell
  • max_shell_size: The max size of the shell
  • min_fill_amount: The min fill size of this sphere from 0.0 to 1.0
  • max_fill_amount: The max fill size of this sphere from 0.0 to 1.0
  • hole_in_bottom_chance: The chance this sphere has a hole in the bottom from which fluid is flowing down from 0.0 to 1.0

fluid_core

Pretty much like the fliud variant, but with an additional core floating in the center of the fluid, like magma in lava, or ice in water.

Type Data:

  • fluid: The fluid this sphere is filled with
  • shell_block: The block used for the blocks around the center of the sphere
  • min_shell_size: The min size the shell
  • max_shell_size: The max size of the shell
  • min_fill_amount: The min fill size of this sphere from 0.0 to 1.0
  • max_fill_amount: The max fill size of this sphere from 0.0 to 1.0
  • hole_in_bottom_chance: The chance this sphere has a hole in the bottom from which fluid is flowing down from 0.0 to 1.0
  • core_block: The block used for the blocks in the center of the sphere
  • min_core_size: The min size the core
  • max_core_size: The max size of the core

shell_core

A sphere consisting out of 3 layers: a main part, an outer shell and an inner core.

Type Data:

  • main_block: The block the sphere consists of
  • shell_block: The block used for the blocks around the center of the sphere
  • min_shell_size: The min size the shell
  • max_shell_size: The max size of the shell
  • core_block: The block used for the blocks in the center of the sphere
  • min_core_size: The min size the core
  • max_core_size: The max size of the core

dungeon

Pretty much a vanilla dungeon in sphere form. Consists of a central spawner surrounded by air and a shell

Type Data:

  • entity_type: The entity the spawner will spawn
  • min_shell_size: The min amount of layers for the shell
  • max_shell_size: The max amount of layers for the shell
  • shell_block: The block the shell will consist of

cave

Consists of air surrounded by a shell

Type Data:

  • min_shell_size: The min amount of layers for the shell
  • max_shell_size: The max amount of layers for the shell
  • shell_block: The block the shell will consist of
  • top_block (optional): The block used for the top layer
  • bottom_block (optional): The block used for the bottom layer
  • cave_floor_block (optional): The block used for the cave floor
  • treasure_chest (optional): An loot table to use for a chest placed in the middle of the cave

rainbow

Takes a lists of blocks and distributes them from first to last forming a gradient of blocks

Type Data:

  • blocks: A list of blocks that are distributed so they form a gradient from first to last

modular_rainbow

Pretty much like a rainbow type, but supports top and bottom blocks, like a modular one does.

Type Data:

  • blocks: A list of blocks that are distributed so they form a gradient from first to last
  • top_blocks (optional): The blocks used for the bottom layer
  • bottom_blocks (optional): The blocks used for the bottom layer

stacked_horizontal

A sphere that consists of a stack of blocks that differ from top to bottom, like creating nationality flags, or for a group of themed blocks

Type Data:

  • blocks: A list of blocks that are stacked equally thick from top to bottom