---
title: Fundamentals
modified: 2026-09-29
---

# Fundamentals

This page covers the command concepts that most Skygen systems are built from.

## Command blocks

| Mode | Typical use |
| --- | --- |
| Impulse | Run a command once when triggered |
| Repeat | Run a command continuously while active |
| Chain | Run after another command block in a command chain |

## Selectors

- `@a` — all players
- `@p` — nearest player
- `@e` — entities
- `@s` — the current command executor

Selectors can be filtered, for example `@a[tag=playing]` or `@e[type=bat,name="dirtgen"]`.

## Scoreboards

Create an objective with `scoreboard objectives add money dummy`.

Set a player's value with `scoreboard players set @p money 100`.

Add with `scoreboard players add @p money 25`, or remove with `scoreboard players remove @p money 25`.

Score filters can also be used inside selectors, such as `@a[scores={money=100..}]`.

## Tags

Use `tag @p add hasGenerator` to add a tag and `tag @p remove hasGenerator` to remove it.

## Execute

`execute` changes the context a command runs in.

For example: `execute as @a at @s run setblock ~ ~-1 ~ stone`

## Raw text and actionbar UI

`titleraw` can display structured text in the actionbar. A `score` rawtext component inserts a live scoreboard value instead of hardcoding a number.

## Clone

`clone` copies blocks from one location to another.

A simple example is `clone 100 64 100 100 64 100 ~ ~ ~`.

This is one of the key commands behind player-placeable Egg Gen systems.
