Skip to content

Steel Extractor

The Steel Extractor is a Fabric mod written in Kotlin that runs on a Minecraft server and extracts comprehensive game data into JSON files. It is the primary tool used to generate the data files that Steel relies on.

The mod hooks into the server startup lifecycle and automatically runs all extractors once the server is fully loaded. The output is written to the steel_extractor_output/ directory as pretty-printed JSON.


At first you need to create the run directory. It’s very easy: build it from the command line (./gradlew runServer), or simply click the Run button (Minecraft server) in your IDE of choice (e.g., IntelliJ). This will start the minecraft server and the extraction will be started automatically, the extraction of the world hashes can take up to 30min.

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:

Terminal window
export STEEL_EXTRACTOR_DISABLE_BLOCKS=true

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

Terminal window
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:

Terminal window
export STEEL_EXTRACTOR_EXIT_ON_COMPLETE=true

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.

Every extractor implements the Extractor interface:

interface Extractor {
fun fileName(): String
@Throws(Exception::class)
fun extract(server: MinecraftServer): JsonElement
}

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/.

ExtractorOutput FileDescriptionEnviroment Variable
Blockssteel-registry/build_assets/blocks.jsonAll blocks with behavior properties, block states, default values, collision and outline shapesSTEEL_EXTRACTOR_DISABLE_BLOCKS
BlockEntitiessteel-registry/build_assets/block_entities.jsonRegistry keys of all block entity typesSTEEL_EXTRACTOR_DISABLE_BLOCK_ENTITIES
Itemssteel-registry/build_assets/items.jsonAll items with components, block references, and class namesSTEEL_EXTRACTOR_DISABLE_ITEMS
ParticleTypeRegistryExtractorsteel-registry/build_assets/particle_types.jsonParticle type registry keysSTEEL_EXTRACTOR_DISABLE_PARTICLE_TYPES
VillagerTypeRegistryExtractorsteel-registry/build_assets/villager_types.jsonVillager type registry keysSTEEL_EXTRACTOR_DISABLE_VILLAGER_TYPES
VillagerProfessionRegistryExtractorsteel-registry/build_assets/villager_professions.jsonVillager profession registry keysSTEEL_EXTRACTOR_DISABLE_VILLAGER_PROFESSIONS
Packetssteel-registry/build_assets/packets.jsonAll serverbound and clientbound packets grouped by protocol phaseSTEEL_EXTRACTOR_DISABLE_PACKETS
MenuTypessteel-registry/build_assets/menutypes.jsonAll menu/GUI types, such as crafting table and furnaceSTEEL_EXTRACTOR_DISABLE_MENU_TYPES
Entitiessteel-registry/build_assets/entities.jsonEntities with dimensions, synched data, attributes, and behavior flagsSTEEL_EXTRACTOR_DISABLE_ENTITIES
EntityEventssteel-utils/build_assets/entity_events.jsonEntity event constantsSTEEL_EXTRACTOR_DISABLE_ENTITY_EVENTS
Fluidssteel-registry/build_assets/fluids.jsonAll fluids with behavior properties and state dataSTEEL_EXTRACTOR_DISABLE_FLUIDS
GameRulesExtractorsteel-registry/build_assets/game_rules.jsonAll game rules with types, defaults, and boundsSTEEL_EXTRACTOR_DISABLE_GAME_RULES
Classessteel-core/build/classes.jsonJava class names for all blocks and items, plus extra per-entry metadata when availableSTEEL_EXTRACTOR_DISABLE_CLASSES
Attributessteel-registry/build_assets/attributes.jsonEntity attributes with defaults, ranges, and sync infoSTEEL_EXTRACTOR_DISABLE_ATTRIBUTES
MobEffectssteel-registry/build_assets/mob_effects.jsonStatus effects with categories and colorsSTEEL_EXTRACTOR_DISABLE_MOB_EFFECTS
Potionssteel-registry/build_assets/potions.jsonPotions with their effects, durations, and amplifiersSTEEL_EXTRACTOR_DISABLE_POTIONS
SoundTypessteel-registry/build_assets/sound_types.jsonBlock sound types with volume, pitch, and sound event referencesSTEEL_EXTRACTOR_DISABLE_SOUND_TYPES
SoundEventssteel-registry/build_assets/sound_events.jsonMapping of all sound event paths to registry IDsSTEEL_EXTRACTOR_DISABLE_SOUND_EVENTS
MultiNoiseBiomeParameterssteel-registry/build_assets/multi_noise_biome_source_parameters.jsonMulti-noise biome source parameter listsSTEEL_EXTRACTOR_DISABLE_MULTI_NOISE_BIOME_PARAMETERS
BiomeHashessteel-core/test_assets/biome_hashes.jsonDeterministic biome hash fixtures used by Steel testsSTEEL_EXTRACTOR_DISABLE_BIOME_HASHES
LevelEventssteel-registry/build_assets/level_events.jsonAll level event constants, including particles and soundsSTEEL_EXTRACTOR_DISABLE_LEVEL_EVENTS
Tagssteel-registry/build_assets/tags.jsonBlock and item tags excluding the minecraft namespaceSTEEL_EXTRACTOR_DISABLE_TAGS
StructureStartssteel-core/test_assets/structure_starts.jsonStructure start fixtures used by Steel testsSTEEL_EXTRACTOR_DISABLE_STRUCTURE_STARTS
Strippablessteel-core/build/strippables.jsonBlock mappings for axe stripping behaviorSTEEL_EXTRACTOR_DISABLE_STRIPPABLES
Weatheringsteel-core/build/weathering.jsonBlock mappings for copper weathering behaviorSTEEL_EXTRACTOR_DISABLE_WEATHERING
CandleCakessteel-core/build/candle_cakes.jsonCandle-to-candle-cake block mappingsSTEEL_EXTRACTOR_DISABLE_CANDLE_CAKES
Waxablessteel-core/build/waxables.jsonBlock mappings for waxed variantsSTEEL_EXTRACTOR_DISABLE_WAXABLES
PoiTypesExtractorsteel-registry/build_assets/poi_types.jsonPoint of interest type registry dataSTEEL_EXTRACTOR_DISABLE_POI_TYPES
GameEventssteel-registry/build_assets/game_events.jsonGame event registry keysSTEEL_EXTRACTOR_DISABLE_GAME_EVENTS
ChunkStageHashessteel-core/test_assets/chunk_stage_hashes.json and steel-core/test_assets/chunk_stage_*_blocks.bin.gzChunk generation stage hashes and binary block dumps for sampled chunksSTEEL_EXTRACTOR_DISABLE_CHUNK_STAGE_HASHES

Here is a minimal example of how to create a new extractor. This extractor outputs all entity attributes with their default values:

package com.steelextractor.extractors
import com.google.gson.JsonArray
import com.google.gson.JsonElement
import com.google.gson.JsonObject
import com.steelextractor.SteelExtractor
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.server.MinecraftServer
class Attributes : SteelExtractor.Extractor {
override fun fileName(): String {
return "attributes.json"
}
override fun extract(server: MinecraftServer): JsonElement {
val attributesArray = JsonArray()
for (attribute in BuiltInRegistries.ATTRIBUTE) {
val key = BuiltInRegistries.ATTRIBUTE.getKey(attribute)
val name = key?.path ?: "unknown"
val attributeJson = JsonObject()
attributeJson.addProperty("id", BuiltInRegistries.ATTRIBUTE.getId(attribute))
attributeJson.addProperty("name", name)
attributeJson.addProperty("default_value", attribute.defaultValue)
attributesArray.add(attributeJson)
}
return attributesArray
}
}

To register your new extractor, add it to the immediateExtractors array in SteelExtractor.kt:

val immediateExtractors = arrayOf(
Blocks(),
// ... other extractors ...
Attributes(),
MyNewExtractor() // Add your extractor here
)

After starting the server, the output will appear in steel_extractor_output/attributes.json.


SteelMC logo by colonthreeing.