Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 52 additions & 34 deletions src/content/docs/development/tools/steel_extractor.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ It's very easy: build it from the command line (`./gradlew runServer`), or simpl
This will create a `steel_extractor_output/` folder in the server working directory. There, you'll find all generated JSON and binary files, which Steel needs as a reference to vanilla.
Not all output files are copied to the same directory in Steel. Check the mapping first before you move something.

To disable a specific extractor, set the corresponding environment variable to `true` before starting the server. For example, to disable the `Blocks` extractor, run:

```bash
export STEEL_EXTRACTOR_DISABLE_BLOCKS=true
```

To disable the lengthy chunk extraction, set the following environment variable:

```bash
export STEEL_EXTRACTOR_ENABLE_CHUNK_EXTRACTION=false
```

You can also set the server to shut down once the extractor has run it's course by setting the following environment variable:

```bash
export STEEL_EXTRACTOR_EXIT_ON_COMPLETE=true
```

## How It Works

The extractor registers a `SERVER_STARTED` event. When the server finishes loading, it iterates through all registered extractors, calls their `extract()` method, and writes the result to a JSON file.
Expand All @@ -38,40 +56,40 @@ interface Extractor {

## Extracted Data

The following table lists all current extractors and what data they produce. Output paths are relative to `steel_extractor_output/`.

| Extractor | Output File | Description |
| --- | --- | --- |
| `Blocks` | `steel-registry/build_assets/blocks.json` | All blocks with behavior properties, block states, default values, collision and outline shapes |
| `BlockEntities` | `steel-registry/build_assets/block_entities.json` | Registry keys of all block entity types |
| `Items` | `steel-registry/build_assets/items.json` | All items with components, block references, and class names |
| `ParticleTypeRegistryExtractor` | `steel-registry/build_assets/particle_types.json` | Particle type registry keys |
| `VillagerTypeRegistryExtractor` | `steel-registry/build_assets/villager_types.json` | Villager type registry keys |
| `VillagerProfessionRegistryExtractor` | `steel-registry/build_assets/villager_professions.json` | Villager profession registry keys |
| `Packets` | `steel-registry/build_assets/packets.json` | All serverbound and clientbound packets grouped by protocol phase |
| `MenuTypes` | `steel-registry/build_assets/menutypes.json` | All menu/GUI types, such as crafting table and furnace |
| `Entities` | `steel-registry/build_assets/entities.json` | Entities with dimensions, synched data, attributes, and behavior flags |
| `EntityEvents` | `steel-utils/build_assets/entity_events.json` | Entity event constants |
| `Fluids` | `steel-registry/build_assets/fluids.json` | All fluids with behavior properties and state data |
| `GameRulesExtractor` | `steel-registry/build_assets/game_rules.json` | All game rules with types, defaults, and bounds |
| `Classes` | `steel-core/build/classes.json` | Java class names for all blocks and items, plus extra per-entry metadata when available |
| `Attributes` | `steel-registry/build_assets/attributes.json` | Entity attributes with defaults, ranges, and sync info |
| `MobEffects` | `steel-registry/build_assets/mob_effects.json` | Status effects with categories and colors |
| `Potions` | `steel-registry/build_assets/potions.json` | Potions with their effects, durations, and amplifiers |
| `SoundTypes` | `steel-registry/build_assets/sound_types.json` | Block sound types with volume, pitch, and sound event references |
| `SoundEvents` | `steel-registry/build_assets/sound_events.json` | Mapping of all sound event paths to registry IDs |
| `MultiNoiseBiomeParameters` | `steel-registry/build_assets/multi_noise_biome_source_parameters.json` | Multi-noise biome source parameter lists |
| `BiomeHashes` | `steel-core/test_assets/biome_hashes.json` | Deterministic biome hash fixtures used by Steel tests |
| `LevelEvents` | `steel-registry/build_assets/level_events.json` | All level event constants, including particles and sounds |
| `Tags` | `steel-registry/build_assets/tags.json` | Block and item tags excluding the `minecraft` namespace |
| `StructureStarts` | `steel-core/test_assets/structure_starts.json` | Structure start fixtures used by Steel tests |
| `Strippables` | `steel-core/build/strippables.json` | Block mappings for axe stripping behavior |
| `Weathering` | `steel-core/build/weathering.json` | Block mappings for copper weathering behavior |
| `CandleCakes` | `steel-core/build/candle_cakes.json` | Candle-to-candle-cake block mappings |
| `Waxables` | `steel-core/build/waxables.json` | Block mappings for waxed variants |
| `PoiTypesExtractor` | `steel-registry/build_assets/poi_types.json` | Point of interest type registry data |
| `GameEvents` | `steel-registry/build_assets/game_events.json` | Game event registry keys |
| `ChunkStageHashes` | `steel-core/test_assets/chunk_stage_hashes.json` and `steel-core/test_assets/chunk_stage_*_blocks.bin.gz` | Chunk generation stage hashes and binary block dumps for sampled chunks |
The following table lists all current extractors, what data they produce and what environment variable can be used to disable them. Output paths are relative to `steel_extractor_output/`.

| Extractor | Output File | Description | Enviroment Variable |
| --- | --- | --- | --- |
| `Blocks` | `steel-registry/build_assets/blocks.json` | All blocks with behavior properties, block states, default values, collision and outline shapes | `STEEL_EXTRACTOR_DISABLE_BLOCKS` |
| `BlockEntities` | `steel-registry/build_assets/block_entities.json` | Registry keys of all block entity types | `STEEL_EXTRACTOR_DISABLE_BLOCK_ENTITIES` |
| `Items` | `steel-registry/build_assets/items.json` | All items with components, block references, and class names | `STEEL_EXTRACTOR_DISABLE_ITEMS` |
| `ParticleTypeRegistryExtractor` | `steel-registry/build_assets/particle_types.json` | Particle type registry keys | `STEEL_EXTRACTOR_DISABLE_PARTICLE_TYPES` |
| `VillagerTypeRegistryExtractor` | `steel-registry/build_assets/villager_types.json` | Villager type registry keys | `STEEL_EXTRACTOR_DISABLE_VILLAGER_TYPES` |
| `VillagerProfessionRegistryExtractor` | `steel-registry/build_assets/villager_professions.json` | Villager profession registry keys | `STEEL_EXTRACTOR_DISABLE_VILLAGER_PROFESSIONS` |
| `Packets` | `steel-registry/build_assets/packets.json` | All serverbound and clientbound packets grouped by protocol phase | `STEEL_EXTRACTOR_DISABLE_PACKETS` |
| `MenuTypes` | `steel-registry/build_assets/menutypes.json` | All menu/GUI types, such as crafting table and furnace | `STEEL_EXTRACTOR_DISABLE_MENU_TYPES` |
| `Entities` | `steel-registry/build_assets/entities.json` | Entities with dimensions, synched data, attributes, and behavior flags | `STEEL_EXTRACTOR_DISABLE_ENTITIES` |
| `EntityEvents` | `steel-utils/build_assets/entity_events.json` | Entity event constants | `STEEL_EXTRACTOR_DISABLE_ENTITY_EVENTS` |
| `Fluids` | `steel-registry/build_assets/fluids.json` | All fluids with behavior properties and state data | `STEEL_EXTRACTOR_DISABLE_FLUIDS` |
| `GameRulesExtractor` | `steel-registry/build_assets/game_rules.json` | All game rules with types, defaults, and bounds | `STEEL_EXTRACTOR_DISABLE_GAME_RULES` |
| `Classes` | `steel-core/build/classes.json` | Java class names for all blocks and items, plus extra per-entry metadata when available | `STEEL_EXTRACTOR_DISABLE_CLASSES` |
| `Attributes` | `steel-registry/build_assets/attributes.json` | Entity attributes with defaults, ranges, and sync info | `STEEL_EXTRACTOR_DISABLE_ATTRIBUTES` |
| `MobEffects` | `steel-registry/build_assets/mob_effects.json` | Status effects with categories and colors | `STEEL_EXTRACTOR_DISABLE_MOB_EFFECTS` |
| `Potions` | `steel-registry/build_assets/potions.json` | Potions with their effects, durations, and amplifiers | `STEEL_EXTRACTOR_DISABLE_POTIONS` |
| `SoundTypes` | `steel-registry/build_assets/sound_types.json` | Block sound types with volume, pitch, and sound event references | `STEEL_EXTRACTOR_DISABLE_SOUND_TYPES` |
| `SoundEvents` | `steel-registry/build_assets/sound_events.json` | Mapping of all sound event paths to registry IDs | `STEEL_EXTRACTOR_DISABLE_SOUND_EVENTS` |
| `MultiNoiseBiomeParameters` | `steel-registry/build_assets/multi_noise_biome_source_parameters.json` | Multi-noise biome source parameter lists | `STEEL_EXTRACTOR_DISABLE_MULTI_NOISE_BIOME_PARAMETERS` |
| `BiomeHashes` | `steel-core/test_assets/biome_hashes.json` | Deterministic biome hash fixtures used by Steel tests | `STEEL_EXTRACTOR_DISABLE_BIOME_HASHES` |
| `LevelEvents` | `steel-registry/build_assets/level_events.json` | All level event constants, including particles and sounds | `STEEL_EXTRACTOR_DISABLE_LEVEL_EVENTS` |
| `Tags` | `steel-registry/build_assets/tags.json` | Block and item tags excluding the `minecraft` namespace | `STEEL_EXTRACTOR_DISABLE_TAGS` |
| `StructureStarts` | `steel-core/test_assets/structure_starts.json` | Structure start fixtures used by Steel tests | `STEEL_EXTRACTOR_DISABLE_STRUCTURE_STARTS` |
| `Strippables` | `steel-core/build/strippables.json` | Block mappings for axe stripping behavior | `STEEL_EXTRACTOR_DISABLE_STRIPPABLES` |
| `Weathering` | `steel-core/build/weathering.json` | Block mappings for copper weathering behavior | `STEEL_EXTRACTOR_DISABLE_WEATHERING` |
| `CandleCakes` | `steel-core/build/candle_cakes.json` | Candle-to-candle-cake block mappings | `STEEL_EXTRACTOR_DISABLE_CANDLE_CAKES` |
| `Waxables` | `steel-core/build/waxables.json` | Block mappings for waxed variants | `STEEL_EXTRACTOR_DISABLE_WAXABLES` |
| `PoiTypesExtractor` | `steel-registry/build_assets/poi_types.json` | Point of interest type registry data | `STEEL_EXTRACTOR_DISABLE_POI_TYPES` |
| `GameEvents` | `steel-registry/build_assets/game_events.json` | Game event registry keys | `STEEL_EXTRACTOR_DISABLE_GAME_EVENTS` |
| `ChunkStageHashes` | `steel-core/test_assets/chunk_stage_hashes.json` and `steel-core/test_assets/chunk_stage_*_blocks.bin.gz` | Chunk generation stage hashes and binary block dumps for sampled chunks | `STEEL_EXTRACTOR_DISABLE_CHUNK_STAGE_HASHES` |

---

Expand Down