genesis

Getting Started with Celestials

Getting Started with Celestials

Introduction

Celestials are the stars, planets, moons, and other astronomical bodies in the Genesis mod. They form the foundation of your space environment, defining the positions, orbits, and properties of every celestial object in your universe.

This guide will introduce you to the core concepts of celestials and show you how to add them to your mod or datapack.

Core Concepts

What is a Celestial?

A celestial is any astronomical body in your space system. Each celestial has:

Celestial Types

Genesis includes two built-in celestial types:

Transform Providers

Transform providers control how a celestial moves and rotates. Genesis provides two built-in options:

Physical Properties

Each celestial has several configurable properties:

Quick Start Example

Here’s the simplest possible celestial - a static star at the origin:

{
  "celestials": [
    {
      "ID": "mymod:my_sun",
      "type": "genesis:star",
      "size": 15.0,
      "gravity": 1.0,
      "transformProvider": {
        "type": "genesis:static",
        "x": 0.0,
        "y": 0.0,
        "z": 0.0
      }
    }
  ]
}

This creates a large star named mymod:my_sun positioned at coordinates (0, 0, 0) that never moves.

How to Add Celestials

You can add celestials to Genesis in two ways:

  1. Datapacks (Recommended for most users)
    • Create JSON configuration files
    • No programming required
    • Easy to share and modify
  2. Code (For mod developers, offers more control)
    • Register celestials programmatically in Java
    • Full programmatic control
    • Can create dynamic celestials

Both approaches are covered in the Implementation Guide, which explains each concept once and shows examples for both formats.

Prerequisites

For Datapacks

For Code Registration

Next Steps

Example: Genesis Default Solar System

Genesis comes with a default solar system configured in builtin.json:

You can view this configuration as a reference example for building your own celestial systems.