Skip to content

Commit 5dded25

Browse files
committed
Added comments to the structure registry
Had to scrap the litematic conversion because their code is so fucking ass ffs
1 parent 485da54 commit 5dded25

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

common/src/main/kotlin/com/lambda/interaction/construction/StructureRegistry.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ object StructureRegistry : ConcurrentHashMap<String, StructureTemplate>(), Loada
5858
private val serializers = mapOf(
5959
"nbt" to StructureTemplate::readNbtOrException,
6060
"schem" to StructureTemplate::readSpongeOrException,
61-
"litematica" to StructureTemplate::readLitematicaOrException,
6261

63-
// Not supported, who could've guess that converting a format from 14 years ago would be hard? :clueless:
62+
// Not supported due to the clusterfuck codebase of litematica and basically zero documentation
63+
"litematic" to StructureTemplate::readLitematicaOrException,
64+
65+
// Not supported, who could've guess that converting a format from 15 years ago would be hard? :clueless:
6466
"schematic" to StructureTemplate::readSchematicOrException,
6567
)
6668

@@ -134,7 +136,7 @@ object StructureRegistry : ConcurrentHashMap<String, StructureTemplate>(), Loada
134136
// Verify the structure integrity after it had been
135137
// converted to a regular structure template
136138
if (compound.isValidStructureTemplate()) template
137-
else throw IllegalStateException("Corrupted structure file: ${path.pathString}")
139+
else throw IllegalStateException("Corrupted structure file ${path.pathString}")
138140
}
139141

140142
/**

common/src/main/kotlin/com/lambda/util/extension/Structures.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,4 @@ private fun StructureTemplate.readSpongeV3OrException(
155155
fun StructureTemplate.readLitematicaOrException(
156156
lookup: RegistryEntryLookup<Block>,
157157
nbt: NbtCompound,
158-
): Throwable {
159-
return IllegalStateException("Litematica parsing is not implemented")
160-
}
158+
): Throwable = NotImplementedError("Litematica is not supported, you can help by contributing to the project")

0 commit comments

Comments
 (0)