Skip to content

BBS Model Ex/importer v1.3.2#942

Merged
JannisX11 merged 2 commits into
JannisX11:masterfrom
Bay4lly:master
Jul 7, 2026
Merged

BBS Model Ex/importer v1.3.2#942
JannisX11 merged 2 commits into
JannisX11:masterfrom
Bay4lly:master

Conversation

@Bay4lly

@Bay4lly Bay4lly commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Bug fixes:
-Fixed animation import

Features:
-Added ZIP export fallback for "Export as ZIP" option on the web version of Blockbench

Bug fixes:
-Fixed animation import

Features:
-Added ZIP export fallback for \"Export as ZIP\" option on the web version of Blockbench
@JannisX11 JannisX11 changed the title v1.3.2 BBS Model Ex/importer v1.3.2 Jul 7, 2026
@JannisX11

JannisX11 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

@mchorse please check this PR. If you want to add members who can make updates without approval in the future, you can add a members file.

@Bay4lly

Bay4lly commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@mchorseLütfen bu PR'ı inceleyin. Gelecekte onay almadan güncelleme yapabilen üyeler eklemek isterseniz, bir üye dosyası ekleyebilirsiniz.

I asked McHorse for this.
Screenshot_20260707_213438_Discord
Screenshot_20260707_213445_Discord

@mchorse

mchorse commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@Bay4lly you messed up the formatting... it was

if (...)
{

}

And now it's:

if (...) {

}

Please fix it. In addition to that, it seems like you also need to add tags, i.e. "tags": ["Exporter", "Importer"], in .js where plugin is registered, i.e. somewhere around here: https://github.com/JannisX11/blockbench-plugins/pull/942/changes#diff-b38774d45c49c4d0cfa132be6a11b93c2b0ccc9dfa99e12fc0f6e82865a3b1dfR667

I'm not sure whether the ZIP code is working though, but it seems to be sensible. According to Claude, it seems that there could be name duplication, if there are textures with same name, and this can be fixed something like this:

var usedNames = {};

Texture.all.forEach((t) => 
{
    if (t.error) return;

    var base = t.name.endsWith(".png") ? t.name.slice(0, -4) : t.name;
    var name = base + ".png";
    var n = 1;

    while (usedNames[name]) name = base + "_" + (n++) + ".png";
    
    usedNames[name] = true;

    zip.file(name, t.getBase64(), { base64: true });
});

@JannisX11 it's one time thing. bay4lly just wanted to push the fix, and add a feature. I don't have any intention on adding someone as a member.

@Bay4lly

Bay4lly commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@Bay4lly you messed up the formatting... it was

if (...)
{

}

And now it's:

if (...) {

}

Please fix it. In addition to that, it seems like you also need to add tags, i.e. "tags": ["Exporter", "Importer"], in .js where plugin is registered, i.e. somewhere around here: https://github.com/JannisX11/blockbench-plugins/pull/942/changes#diff-b38774d45c49c4d0cfa132be6a11b93c2b0ccc9dfa99e12fc0f6e82865a3b1dfR667

I'm not sure whether the ZIP code is working though, but it seems to be sensible. According to Claude, it seems that there could be name duplication, if there are textures with same name, and this can be fixed something like this:

var usedNames = {};

Texture.all.forEach((t) => 
{
    if (t.error) return;

    var base = t.name.endsWith(".png") ? t.name.slice(0, -4) : t.name;
    var name = base + ".png";
    var n = 1;

    while (usedNames[name]) name = base + "_" + (n++) + ".png";
    
    usedNames[name] = true;

    zip.file(name, t.getBase64(), { base64: true });
});

@JannisX11 it's one time thing. bay4lly just wanted to push the fix, and add a feature. I don't have any intention on adding someone as a member.

Okay, i think when press ctrl+s text editor changed formatting

@Bay4lly

Bay4lly commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

hey i changed with claude can you check it? i am in phone so i cant edit it now.

@Bay4lly you messed up the formatting... it was

if (...)
{

}

And now it's:

if (...) {

}

Please fix it. In addition to that, it seems like you also need to add tags, i.e. "tags": ["Exporter", "Importer"], in .js where plugin is registered, i.e. somewhere around here: https://github.com/JannisX11/blockbench-plugins/pull/942/changes#diff-b38774d45c49c4d0cfa132be6a11b93c2b0ccc9dfa99e12fc0f6e82865a3b1dfR667

I'm not sure whether the ZIP code is working though, but it seems to be sensible. According to Claude, it seems that there could be name duplication, if there are textures with same name, and this can be fixed something like this:

var usedNames = {};

Texture.all.forEach((t) => 
{
    if (t.error) return;

    var base = t.name.endsWith(".png") ? t.name.slice(0, -4) : t.name;
    var name = base + ".png";
    var n = 1;

    while (usedNames[name]) name = base + "_" + (n++) + ".png";
    
    usedNames[name] = true;

    zip.file(name, t.getBase64(), { base64: true });
});

@JannisX11 it's one time thing. bay4lly just wanted to push the fix, and add a feature. I don't have any intention on adding someone as a member.

@mchorse

mchorse commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Looks good to me! 🚀

@JannisX11
JannisX11 merged commit c695196 into JannisX11:master Jul 7, 2026
2 checks passed
@mchorse

mchorse commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Thank you Jannis, and thank you Bay! 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants