aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/kotlin/testutil/ItemResources.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/kotlin/testutil/ItemResources.kt b/src/test/kotlin/testutil/ItemResources.kt
index 107b565..8631c21 100644
--- a/src/test/kotlin/testutil/ItemResources.kt
+++ b/src/test/kotlin/testutil/ItemResources.kt
@@ -24,7 +24,7 @@ object ItemResources {
}
fun loadSNbt(path: String): NbtCompound {
- return StringNbtReader.parse(loadString(path))
+ return StringNbtReader.readCompound(loadString(path))
}
fun getNbtOps(): RegistryOps<NbtElement> = MC.currentOrDefaultRegistries.getOps(NbtOps.INSTANCE)
@@ -35,6 +35,7 @@ object ItemResources {
fun loadItem(name: String): ItemStack {
// TODO: make the load work with enchantments
+ // TODO: use DFU to load older items
return ItemStack.CODEC.parse(getNbtOps(), loadSNbt("testdata/items/$name.snbt"))
.getOrThrow { IllegalStateException("Could not load test item '$name': $it") }
}