mirror of
https://github.com/trafficlunar/blockmatic.git
synced 2026-06-27 22:24:12 +00:00
fix: bunch of block data fixes
This commit is contained in:
parent
6883267b95
commit
a953914bd3
7 changed files with 207 additions and 79 deletions
|
|
@ -40,7 +40,7 @@ const data = {};
|
|||
data[fileName] = {
|
||||
name: VERSION_DATA.blocksByName[fileName] ? VERSION_DATA.blocksByName[fileName].displayName : "REPLACE_ME_REPLACE_ME_REPLACE_ME_REPLACE_ME",
|
||||
version: getVersion(),
|
||||
id: VERSION_DATA.blocksByName[blockName] ? VERSION_DATA.blocksByName[blockName][property] : "REPLACE_ME_REPLACE_ME_REPLACE_ME_REPLACE_ME",
|
||||
id: VERSION_DATA.blocksByName[blockName] ? VERSION_DATA.blocksByName[blockName].id : "REPLACE_ME_REPLACE_ME_REPLACE_ME_REPLACE_ME",
|
||||
color: [color.value[0], color.value[1], color.value[2], color.value[3]],
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,24 @@ const INPUT = path.join(__dirname, "../blocks/");
|
|||
const image = sharp(filePath);
|
||||
const metadata = await image.metadata();
|
||||
|
||||
if (file.includes("glazed")) {
|
||||
await image
|
||||
.rotate(90)
|
||||
.toBuffer()
|
||||
.then((buffer) => {
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
});
|
||||
}
|
||||
|
||||
if (file.includes("barrel_top")) {
|
||||
await image
|
||||
.rotate(180)
|
||||
.toBuffer()
|
||||
.then((buffer) => {
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
});
|
||||
}
|
||||
|
||||
if (metadata.height > 16) {
|
||||
await image
|
||||
.extract({ top: 0, left: 0, width: 16, height: 16 })
|
||||
Loading…
Add table
Add a link
Reference in a new issue