You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/src/main/kotlin/com/lambda/util/extension/World.kt
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ fun StructureTemplate.readSpongeOrException(
83
83
fun StructureTemplate.readSchematicOrException(
84
84
lookup:RegistryEntryLookup<Block>,
85
85
nbt:NbtCompound,
86
-
): Throwable?=when (nbt.getString("Materials")) {
86
+
): Throwable=when (nbt.getString("Materials")) {
87
87
"Alpha"->IllegalStateException("Not implemented, you can help us by contributing to the project")
88
88
"Classic"->IllegalStateException("Method not implemented, you can help us by contributing to the Minecraft Wiki (https://minecraft.wiki/w/Data_values_(Classic))")
89
89
"Pocket"->IllegalStateException("Pocket Edition schematics are not supported")
@@ -121,24 +121,24 @@ private fun StructureTemplate.readSpongeV1OrException(
121
121
palette.keys
122
122
.sortedBy { palette.getInt(it) }
123
123
.forEach { key ->
124
-
val resource = key.substringBefore('[')
125
-
val blockState =NbtCompound()
126
-
127
-
// Why ?
128
-
// I know it's supposed to be SNBT, but it cannot be parsed back
129
-
key.substringAfter('[')
130
-
.substringBefore(']')
131
-
.takeIf { it != resource }
132
-
?.split(',')
133
-
?.associate { it.substringBefore('=') to it.substringAfter('=') }
0 commit comments