Generate a test datapack from the datagen testmod output. (#2824)

* Add a datapack zip for testing the datagen module

* Fix deprecation
This commit is contained in:
modmuss50 2023-01-05 12:50:01 +00:00 committed by GitHub
parent ccd377ba6b
commit abdb4ad90b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -53,6 +53,16 @@ loom {
test.dependsOn runDatagen
task datapackZip(type: Zip, dependsOn: runDatagen) {
archiveFileName = "${archivesBaseName}-${project.version}-test-datapack.zip"
destinationDirectory = layout.buildDirectory.dir('libs')
from file("src/testmod/generated")
from file("pack.mcmeta")
}
build.dependsOn datapackZip
import org.objectweb.asm.ClassReader
import org.objectweb.asm.Opcodes
import org.objectweb.asm.tree.ClassNode

View file

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 10,
"description": "Datagen test Data Pack"
}
}