Fix Optifine CEM texture path recognition issue

Bump version to 4.0.2
This commit is contained in:
JannisX11 2021-10-23 15:53:02 +02:00
parent 16f15b7aad
commit 8e86a39212
3 changed files with 5 additions and 9 deletions

View File

@ -25,7 +25,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '4.0.1';
const appVersion = '4.0.2';
if (localStorage.getItem('theme')) {

View File

@ -583,16 +583,12 @@ class Texture {
let tex_arr = path.split(osfs).slice(0, -1);
let index = 0;
tex_arr.find((dir, i) => {
if (dir != model_arr[i]) return true;
if (Project.export_path && dir != model_arr[i]) return true;
if (!Project.export_path && tex_arr[i-2] == 'optifine' && tex_arr[i-1] == 'cem') return true;
index++;
})
this.folder = tex_arr.slice(index).join('/');
console.log(this.folder)
/*
var arr = path.split(osfs)
this.folder = arr[arr.length-2]
console.log(arr, this.folder)
*/
if (Format.id === 'java_block' && isApp && settings.dialog_loose_texture.value) {
Blockbench.showMessageBox({
translateKey: 'loose_texture',

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Low-poly modeling and animation software",
"version": "4.0.1",
"version": "4.0.2",
"license": "GPL-3.0-or-later",
"author": {
"name": "JannisX11",