Skip to content

Commit bdf06f1

Browse files
committed
Fixes the output offset of item display settings
1 parent 480f1c0 commit bdf06f1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/azurelib_utils/codec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,15 @@ export function maybeExportItemJson(options = {}, as) {
398398
}
399399
if (entries) {
400400
blockmodel.display = new_display
401+
const SUBTRACT_Y = 1.5;
402+
403+
for (const [slot, value] of Object.entries(new_display)) {
404+
const tr = value && value.translation;
405+
if (Array.isArray(tr)) {
406+
const y = Number(tr[1]) || 0;
407+
tr[1] = Math.round((y - SUBTRACT_Y) * 100) / 100;
408+
}
409+
}
401410
}
402411
}
403412
if (Project.textures && checkExport("textures", Object.keys(Project.textures).length >= 1)) {

0 commit comments

Comments
 (0)