diff --git a/app/shared/app_version.ts b/app/shared/app_version.ts index 4a9ba040..716c6903 100644 --- a/app/shared/app_version.ts +++ b/app/shared/app_version.ts @@ -1,4 +1,4 @@ /** * Current bridge. app version */ -export default 'v1.8.10' +export default 'v1.8.11' diff --git a/package.json b/package.json index abd32478..b56fbea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bridge", - "version": "1.8.6", + "version": "1.8.11", "private": true, "author": "solvedDev ", "description": "A powerful add-on editor", diff --git a/static/validate/block_component.js b/static/validate/block_component.js index 5f9103b9..e8cda546 100644 --- a/static/validate/block_component.js +++ b/static/validate/block_component.js @@ -129,8 +129,6 @@ const validate = () => { else if (removedComponents.has(component_name) && compareVersions.compare(fileFormatVersion, removedComponents.get(component_name), '>=') && compareVersions.compare(removedComponents.get(component_name), projectTargetVersion, '<=')) { - // const msg = removedComponents.get('minecraft:rotation') ? `${component_name} was replaced with minecraft:transformation from ${removedComponents.get(component_name)}` : removedComponents.get('minecraft:destroy_time') ? `${component_name} was replaced with minecraft:destructible_by_mining from ${removedComponents.get(component_name)}` : removedComponents.get('minecraft:explosion_resistance') ? `${component_name} was replaced with minecraft:destructible_by_explosion from ${removedComponents.get(component_name)}` : ; - Node.error = { is_warning: false, show: true, @@ -138,36 +136,6 @@ const validate = () => { fix: { run: () => { - if (component_name == 'minecraft:rotation') { - - let newComponent = { 'minecraft:transformation': {} } - newComponent["minecraft:transformation"]['rotation'] = component.toJSON() - - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) - components.buildFromObject(newComponent) - - } - - else if (component_name == 'minecraft:destroy_time') { - - let newComponent = { 'minecraft:destructible_by_mining': {} } - newComponent["minecraft:destructible_by_mining"]["seconds_to_destroy"] = component.data; - - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) - components.buildFromObject(newComponent) - - } - - else if (component_name == 'minecraft:explosion_resistance') { - - let newComponent = { 'minecraft:destructible_by_explosion': {} } - newComponent["minecraft:destructible_by_explosion"]["explosion_resistance"] = component.data; - - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) - components.buildFromObject(newComponent) - - } - components.removeNode(component) Tab.setUnsaved(); @@ -192,8 +160,8 @@ const validate = () => { let newComponent = { 'minecraft:transformation': {} } newComponent["minecraft:transformation"]['rotation'] = component.toJSON() - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) components.buildFromObject(newComponent) + Bridge.GlobalNode.children[0].edit(replacedComponents.get(component_name), true) } @@ -202,8 +170,8 @@ const validate = () => { let newComponent = { 'minecraft:destructible_by_mining': {} } newComponent["minecraft:destructible_by_mining"]["seconds_to_destroy"] = component.data; - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) components.buildFromObject(newComponent) + Bridge.GlobalNode.children[0].edit(replacedComponents.get(component_name), true) } @@ -212,8 +180,8 @@ const validate = () => { let newComponent = { 'minecraft:destructible_by_explosion': {} } newComponent["minecraft:destructible_by_explosion"]["explosion_resistance"] = component.data; - Bridge.GlobalNode.children[0].edit(removedComponents.get(component_name), true) components.buildFromObject(newComponent) + Bridge.GlobalNode.children[0].edit(replacedComponents.get(component_name), true) } @@ -227,8 +195,8 @@ const validate = () => { if (json.looping) newComponent["minecraft:queued_ticking"]["looping"] = json.looping; if (json.on_tick) newComponent["minecraft:queued_ticking"]["on_tick"] = json.on_tick; - Bridge.GlobalNode.children[0].edit(replacedComponents.get(component_name), true) components.buildFromObject(newComponent) + Bridge.GlobalNode.children[0].edit(replacedComponents.get(component_name), true) }