Skip to content

Commit

Permalink
make extractor the same
Browse files Browse the repository at this point in the history
  • Loading branch information
kralverde committed Dec 1, 2024
1 parent c13e22d commit 04b1fce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions extractor/src/main/kotlin/de/snowii/extractor/Extractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Extractor : ModInitializer {
try {
val out = outputDirectory.resolve(ext.fileName())
val fileWriter = FileWriter(out.toFile(), StandardCharsets.UTF_8)
(ext.gson_builder() ?: gson).toJson(ext.extract(server), fileWriter)
gson.toJson(ext.extract(server), fileWriter)
fileWriter.close()
logger.info("Wrote " + out.toAbsolutePath())
} catch (e: java.lang.Exception) {
Expand All @@ -66,9 +66,5 @@ class Extractor : ModInitializer {

@Throws(Exception::class)
fun extract(server: MinecraftServer): JsonElement

fun gson_builder(): Gson? {
return null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ class Tests : Extractor.Extractor {
return null;
}

override fun gson_builder(): Gson {
return GsonBuilder().create()
}

// Dumps a chunk to an array of block state ids
override fun extract(server: MinecraftServer): JsonElement {
val topLevelJson = JsonArray()
Expand Down

0 comments on commit 04b1fce

Please sign in to comment.