diff --git a/src/main/kotlin/com/steelextractor/SteelExtractor.kt b/src/main/kotlin/com/steelextractor/SteelExtractor.kt index 0bd4cde..628458b 100644 --- a/src/main/kotlin/com/steelextractor/SteelExtractor.kt +++ b/src/main/kotlin/com/steelextractor/SteelExtractor.kt @@ -30,6 +30,7 @@ import com.steelextractor.extractors.PoiTypesExtractor import com.steelextractor.extractors.Potions import com.steelextractor.extractors.StructureStarts import com.steelextractor.extractors.Tags +import com.steelextractor.extractors.Waxables import kotlinx.io.IOException import net.fabricmc.api.ModInitializer import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents @@ -91,6 +92,7 @@ object SteelExtractor : ModInitializer { LevelEvents(), Tags(), StructureStarts(), + Waxables(), Weathering(), PoiTypesExtractor() ) diff --git a/src/main/kotlin/com/steelextractor/extractors/Waxables.kt b/src/main/kotlin/com/steelextractor/extractors/Waxables.kt new file mode 100644 index 0000000..5db926f --- /dev/null +++ b/src/main/kotlin/com/steelextractor/extractors/Waxables.kt @@ -0,0 +1,27 @@ +package com.steelextractor.extractors + +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 +import net.minecraft.world.item.HoneycombItem + +class Waxables : SteelExtractor.Extractor { + override fun fileName(): String { + return "steel-core/build/waxables.json" + } + + override fun extract(server: MinecraftServer): JsonElement { + val topLevelJson = JsonObject() + + for ((normal, waxed) in HoneycombItem.WAXABLES.get()) { + topLevelJson.addProperty( + BuiltInRegistries.BLOCK.getKey(normal).path, + BuiltInRegistries.BLOCK.getKey(waxed).path + ) + } + + return topLevelJson + } +}