Generate blockstates for matter scanner and replicator

This commit is contained in:
DBotThePony 2021-08-18 17:40:45 +07:00
parent 3f5d1bb129
commit bb8e594b4c
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 32 additions and 0 deletions

2
.gitignore vendored
View File

@ -32,3 +32,5 @@ forge*changelog.txt
/src/main/resources/assets/overdrive_that_matters/models/block/pattern/pattern_storage_pattern6.json
/src/main/java/ru/dbotthepony/mc/otm/shapes/BlockShapes.java
/src/main/resources/assets/overdrive_that_matters/blockstates/pattern_storage.json
/src/main/resources/assets/overdrive_that_matters/blockstates/matter_replicator.json
/src/main/resources/assets/overdrive_that_matters/blockstates/matter_scanner.json

View File

@ -110,4 +110,34 @@ const facings = [
fs.writeFileSync(_root + 'blockstates/pattern_storage.json', JSON.stringify(blockstate, null, '\t'))
}
// Matter scanner
{
const to_generate = ['matter_scanner', 'matter_replicator']
const states = ['idle', 'working', 'error']
for (const machine of to_generate) {
const blockstate = {
multipart: []
}
for (const face of facings) {
for (const state of states) {
blockstate.multipart.push({
when: {
facing: face.facing,
worker: state
},
apply: {
model: 'overdrive_that_matters:block/' + machine + '_' + state,
y: face.y ? face.y : undefined
}
});
}
}
fs.writeFileSync(_root + 'blockstates/' + machine + '.json', JSON.stringify(blockstate, null, '\t'))
}
}
process.stdout.write(`Generated data files in ${Date.now() - time}ms\n`)