Skip to content

Adding Spheres (Advanced) (Starry Skies 3.x)

DaFuqs edited this page Jan 10, 2025 · 1 revision

Mastered the way of adding Spheres and are in for more? Or wonder how these rainbow Spheres are made?

Let me tell you a secret.

StarryStateProviders

All entries in the chapter adding Spheres that mentioned a BlockStateProvider arent BlockStateProviders at all! Well, close to, but still a tad different. Additionally to StateProviders, these entries support the flag reroll_for_every_pos, which defaults to false.

But what does setting that flag to true?

Well, let's look at an existing sphere before:

{
  "type": "starry_skies:core",
  "config": {
    "main_block": {
      "type": "minecraft:weighted_state_provider",
      "entries": [
        {
          "weight": 10,
          "data": {
            "Name": "minecraft:infested_deepslate"
          }
        },
        {
          "weight": 5,
          "data": {
            "Name": "minecraft:deepslate"
          }
        },
        {
          "weight": 2,
          "data": {
            "Name": "minecraft:cobbled_deepslate"
          }
        }
      ]
    },
    "core_block": {
      "type": "minecraft:simple_state_provider",
      "state": {
        "Name": "minecraft:deepslate_emerald_ore"
      }
    },
    [...]
  }
}

This Emerald sphere has a weighted_state_provider for its shell: it generates with Infested Deepslate most of the time, but also has a chance of generating with Deepslate or Cobbled Deepslate shell. Each time an Emerald sphere generates, it chooses one of these blocks.

Adding "reroll_for_every_pos": true will make the sphere evaluate that state provider for every block instead for every sphere instead - in this case picking an weighted entry in that list, giving the sphere a speckled shell instead.

{
  "type": "starry_skies:core",
  "config": {
    "main_block": {
      "type": "minecraft:weighted_state_provider",
      "reroll_for_every_pos": true,
      "entries": [...]

New State Proviers

  • starry_skies:weighted_block_group_state_provider
  • starry_skies:unique_block_group_state_provider
  • starry_skies:alternating_state_provider

Alternating State Provider

Weighted Block Groups

Unique Block Groups