Skip to content

Adding Decorators

DaFuqs edited this page Dec 12, 2022 · 1 revision

Sphere decorators work quite a bit like vanillas worldgen decorators: They get called after a sphere has been generated to add some detail to it.

Decorators can be plants that get placed on top of spheres, water or lava ponds that get created, chests with loot getting placed and much more.

Using a variety of presets, you can create your own decorators and add them to spheres. Starry comes with a nice range of finished decorators, already.

Let's take a look at one of them, namely starry_skies:fern:

{
	"type": "starry_skies:single_block",
	"type_data": {
		"block": "minecraft:fern",
		"chance": 0.1
	}
}

Much like sphere definitions, these decorator files consist of a type and type_data. The type defines how stuff should be placed on a sphere, while the type_data gives this placement additonal information, in this case what block should be placed (ferns) and how often (in 10 % of possible places).

Decorator Types

Decorator types define what blocks should be placed on a sphere and how. If you are a modder integrating into Starry you can also create completely new ones.

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

ground

Replaces some of the top blocks of the sphere

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position

single_block

Places a single blocks on top of the sphere

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position

double_block

Places blocks that have a top and bottom state (like tall plants) on top of the sphere

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position

stacked_block

Places a tower consisting of a block on top of the sphere, like a stack of cactus

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position
  • min_height: the min height of the stack
  • max_height: the max height of the stack

hanging_block

Places a single blocks on the bottom of the sphere

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position

hanging_cave_block

Places a single blocks on the inside top of the sphere's inside cave. Used for sphere types that have air in them, like dungeon or cave.

  • block: block getting placed
  • chance: chance from 0.0 - 1.0 for the block to get placed on each valid position

x_spot

Places a loot chest in the middle of the sphere and places 1-3 "X" shapes on sides of the sphere, consisting out of a marking block.

  • loot_table: the loot table used for the center chest
  • marking_block: The block used for the X markings

center_pond

Replaces a few blocks at the top of the sphere with air and creates an even pool that is filled with a fluid and given chance to create a treasure chest within

  • beach_block: the block used around the pool as "shoreline"
  • fluid_block: the fluid used for the pool
  • loot_table: the loot table used for the chest in the pond
  • loot_table_chance: chance from 0.0 - 1.0 for the pond to have a loot chest