Add shapenator to gradle build file
This commit is contained in:
parent
7a303f07e2
commit
c2931d03c2
@ -23,6 +23,12 @@ archivesBaseName = 'overdrive_that_matters'
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(16)
|
||||
|
||||
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
|
||||
|
||||
exec {
|
||||
executable 'node'
|
||||
args 'shapenator.js'
|
||||
}
|
||||
|
||||
minecraft {
|
||||
// The mappings can be changed at any time and must be in the following format.
|
||||
// Channel: Version:
|
||||
|
@ -13,10 +13,12 @@ const fs = require('fs')
|
||||
const _root = './src/main/resources/assets/overdrive_that_matters/'
|
||||
const root = _root + 'models/block/'
|
||||
|
||||
const time = Date.now()
|
||||
process.stdout.write('Generating data files\n')
|
||||
const handle = fs.openSync('./src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java', 'w')
|
||||
|
||||
fs.writeSync(handle, 'package ru.dbotthepony.mc.otm.shapes;\n\n\n')
|
||||
fs.writeSync(handle, `// Auto generated at ${new Date().toUTCString()}\n`)
|
||||
fs.writeSync(handle, `// This file is regenerated on each gradle run. Do not edit it!\n`)
|
||||
fs.writeSync(handle, 'public class BlockShapes {\n')
|
||||
|
||||
for (const model of models) {
|
||||
@ -107,3 +109,5 @@ const facings = [
|
||||
|
||||
fs.writeFileSync(_root + 'blockstates/pattern_storage.json', JSON.stringify(blockstate, null, '\t'))
|
||||
}
|
||||
|
||||
process.stdout.write(`Generated data files in ${Date.now() - time}ms\n`)
|
||||
|
Loading…
Reference in New Issue
Block a user