diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 000000000..8b53ee17e
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,55 @@
+# Frequently-Asked-Questions
+
+There are many questions that are asked frequently within the bridge. Discord, and this document goes through them.
+
+**How do I use custom commands in game?**
+
+You can’t; bridge. custom commands are used only inside of the editor (functions, items, animations, animation controllers, entities) as they are compiled into normal
+commands.
+
+**After editing an animation in bridge., it stopped working. Why?**
+
+This is a known issue that has to do with how bridge. handles arrays and objects. The automatic type detection fails where there is ambiguity between objects and
+animations and both options are valid. Solution: Do not edit animations from Blockbench with bridge.; manually fix broken animations with a text editor.
+
+**Something isn’t behaving properly with bridge. behavior. What should I do?**
+
+Please verify your bridge. version is the latest, and then report it in **#bugs** (within the bridge. Discord, specifying the version, the problem, and what you were
+doing when the problem occured). We will get back to you as soon as we can. In case you have a GitHub account, it is preferred that you open an issue here:
+https://github.com/bridge-core/bridge./issues/new/choose
+
+**Something is wrong with the bridge. auto completions.**
+
+Follow the same steps as reporting improper bridge. behavior.
+
+**My entity exists in game, but is invisible.**
+
+If your entity has a shadow but is invisible, give it the `skeleton` material in the client entity file. If it has no shadow, you probably need to add a render
+controller.
+
+**My addon isn’t working. Why?**
+
+There are lots of reasons an addon might not work. Before you ask in an addon help channel within the bridge. Discord, please turn on content logs and review any errors.
+
+**How do I turn on content logs?**
+
+In *Minecraft* settings under the Profile section, there are two settings: ”Enable Content Log GUI” and “Enable Content Log File.” We recommend turning both on while
+testing.
+![Enable content logs](https://github.com/bridge-core/bridge./blob/master/images/faq_1.png)
+
+**How do I make a scripting GUI?**
+
+There are currently no tutorials for this, but Mojang has released an example pack using a GUI. You can get the pack here: https://aka.ms/minecraftscripting_turnbased
+
+**Is there a tutorial for…?**
+
+You can check #addon-guides in the bridge. Discord. If there isn’t one there, the documentation (https://bedrock.dev) might help. If you still need help, ask in an
+available #addon-help channel.
+
+**Do I need experimental gameplay for…?**
+
+As of 1.16.0, the following things require experimental gameplay:
+* Biomes
+* Features
+* Feature rules
+* Scripts
diff --git a/app/renderer/src/Presets.ts b/app/renderer/src/Presets.ts
index c1067598f..a85a64523 100644
--- a/app/renderer/src/Presets.ts
+++ b/app/renderer/src/Presets.ts
@@ -263,5 +263,10 @@ export async function expandPresetFile(
if (typeof original === 'string')
await fs.writeFile(to_path, `${original}\n${templ}`)
- else await writeJSON(to_path, detachMerge({}, original, JSON.parse(templ)))
+ else
+ await writeJSON(
+ to_path,
+ detachMerge({}, original, JSON.parse(templ)),
+ true
+ )
}
diff --git a/app/renderer/src/Project/Config.ts b/app/renderer/src/Project/Config.ts
index fca2e370e..e1f599b7c 100644
--- a/app/renderer/src/Project/Config.ts
+++ b/app/renderer/src/Project/Config.ts
@@ -8,7 +8,7 @@ import SETTINGS from '../../store/Settings'
import { on } from '../AppCycle/EventSystem'
import { getFormatVersions } from '../autoCompletions/components/VersionedTemplate/Common'
-on('bridge:changedProject', () => {
+on('bridge:onProjectChanged', () => {
ProjectConfig.prefix_cache = undefined
ProjectConfig.formatVersionCache = undefined
})
diff --git a/app/renderer/src/TabSystem.ts b/app/renderer/src/TabSystem.ts
index 5284b6fae..788dad51b 100644
--- a/app/renderer/src/TabSystem.ts
+++ b/app/renderer/src/TabSystem.ts
@@ -137,7 +137,8 @@ class TabSystem {
file_name: curr_file_name,
folders: curr_folders,
} = projects[this.project][i]
- if (file_path === tab.file_path) {
+
+ if (path.resolve(file_path) === path.resolve(tab.file_path)) {
Store.commit('removeLoadingWindow', { id: 'open-file' })
return this.select(i)
} else if (curr_file_name === file_name) {
diff --git a/app/renderer/src/UI/Editor/JsonEditor/JsonInput.vue b/app/renderer/src/UI/Editor/JsonEditor/JsonInput.vue
index 60030ff8b..c630d1b57 100644
--- a/app/renderer/src/UI/Editor/JsonEditor/JsonInput.vue
+++ b/app/renderer/src/UI/Editor/JsonEditor/JsonInput.vue
@@ -5,6 +5,7 @@
id="json-editing-input"
ref="input"
@keydown.enter.native="click"
+ v-on="autoApplyEdit ? { change: click } : null"
:disabled="file_navigation === 'global'"
v-if="type == 'edit'"
v-model="value"
@@ -107,14 +108,17 @@ export default {
provide_auto_completions() {
return this.$store.state.Settings.auto_completions
},
+ autoApplyEdit() {
+ return this.$store.state.Settings.automatically_apply_edits
+ },
},
methods: {
click(val) {
if (this.trigger_cooldown) return
- if (this.value === '')
+ if (!this.value)
this.value = this.$refs.input.$el.querySelector('input').value
- if (this.value === '' || !this.value) return
+ if (!this.value) return
let current = this.render_object.get(this.file_navigation)
let is_data_path = TabSystem.getSelected().content.isDataPath(
this.file_navigation
diff --git a/app/renderer/src/UI/Editor/JsonEditor/PredictingInput.vue b/app/renderer/src/UI/Editor/JsonEditor/PredictingInput.vue
index ee6c4413c..53b5f2060 100644
--- a/app/renderer/src/UI/Editor/JsonEditor/PredictingInput.vue
+++ b/app/renderer/src/UI/Editor/JsonEditor/PredictingInput.vue
@@ -92,7 +92,7 @@ export default {
methods: {
click(val, force) {
if (this.trigger_cooldown) return
- if (this.value === '')
+ if (!this.value)
this.value =
val || this.$refs.input.$el.querySelector('input').value
if (
diff --git a/app/renderer/src/UI/Editor/SingleFile.vue b/app/renderer/src/UI/Editor/SingleFile.vue
index c1c54e844..bb59c5991 100644
--- a/app/renderer/src/UI/Editor/SingleFile.vue
+++ b/app/renderer/src/UI/Editor/SingleFile.vue
@@ -10,7 +10,13 @@
}"
>
-
+
-
+
@@ -150,9 +150,11 @@ export default {
no_projects: false,
loaded_file_defs: FileType.LIB_LOADED,
disposable: null,
+ projectIcon: undefined,
}
},
mounted() {
+ this.projectIcon = this.loadProjectIcon()
this.$root.$on('refreshExplorer', () =>
EventBus.trigger('bridge:refreshExplorer')
)
@@ -203,23 +205,6 @@ export default {
value: p,
}))
},
- project_icon() {
- try {
- return DataUrl.convert({
- data: fsync.readFileSync(
- this.base_path + this.selected + '/pack_icon.png'
- ),
- mimetype: `image/png`,
- })
- } catch (e) {
- return DataUrl.convert({
- data: fsync.readFileSync(
- __static + '/images/pack_icon.png'
- ),
- mimetype: `image/png`,
- })
- }
- },
},
methods: {
openProjectScreen() {
@@ -227,6 +212,8 @@ export default {
ProjectChooser.open()
},
async refresh(force_val) {
+ this.projectIcon = this.loadProjectIcon()
+
if (this.force_project_algorithm) {
if (force_val) this.selected = force_val
console.log('[REFRESH RP] ' + this.selected)
@@ -261,7 +248,7 @@ export default {
async loadDirectory(dir = this.selected, force_reload) {
let lw = new LoadingWindow().show()
if (this.explorer_type === 'explorer') {
- EventBus.trigger('bridge:changedProject')
+ EventBus.trigger('bridge:onProjectChanged')
OmegaCache.init(dir)
LightningCache.init()
JSONFileMasks.resetMasks()
@@ -350,6 +337,33 @@ export default {
createRP() {
CreateRP.open()
},
+
+ loadProjectIcon() {
+ try {
+ return DataUrl.convert({
+ data: fsync.readFileSync(
+ path.join(
+ this.base_path,
+ this.selected,
+ 'pack_icon.png'
+ )
+ ),
+ mimetype: `image/png`,
+ })
+ } catch (e) {
+ return DataUrl.convert({
+ data: fsync.readFileSync(
+ path.join(__static, '/images/pack_icon.png')
+ ),
+ mimetype: `image/png`,
+ })
+ }
+ },
+ },
+ watch: {
+ selected() {
+ this.projectIcon = this.loadProjectIcon()
+ },
},
}
diff --git a/app/renderer/src/UI/Toolbar/Category/file.ts b/app/renderer/src/UI/Toolbar/Category/file.ts
index 4a49d9810..139e596ce 100644
--- a/app/renderer/src/UI/Toolbar/Category/file.ts
+++ b/app/renderer/src/UI/Toolbar/Category/file.ts
@@ -5,7 +5,7 @@ import { ipcRenderer } from 'electron'
import TabSystem from '../../../TabSystem'
import SettingsWindow from '../../../../windows/Settings'
import ExtensionBrowser from '../../../../windows/Extensions/Browser'
-import { ImportOBJ } from '../../Windows/ImportOBJ/definition'
+import { ImportOBJ } from '../../Windows/Tools/ImportOBJ/definition'
import LoadingWindow from '../../../../windows/LoadingWindow'
import FileSystem from '../../../FileSystem'
import { ImportFileMap } from '../../../plugins/scripts/modules/importFiles'
diff --git a/app/renderer/src/UI/Toolbar/Category/tools.ts b/app/renderer/src/UI/Toolbar/Category/tools.ts
index 2b6cf6c27..a1b15cb24 100644
--- a/app/renderer/src/UI/Toolbar/Category/tools.ts
+++ b/app/renderer/src/UI/Toolbar/Category/tools.ts
@@ -1,5 +1,5 @@
import { IAppMenu } from '../create'
-import { GoToFile } from '../../Windows/GoToFile/definition'
+import { GoToFile } from '../../Windows/Tools/GoToFile/definition'
import SnippetWindow from '../../../../windows/Snippets'
import PresetWindow from '../../../../windows/PresetWindow'
diff --git a/app/renderer/src/UI/Windows/Common/Input/Input.vue b/app/renderer/src/UI/Windows/Common/Input/Input.vue
index 294efec50..d7a06dc02 100644
--- a/app/renderer/src/UI/Windows/Common/Input/Input.vue
+++ b/app/renderer/src/UI/Windows/Common/Input/Input.vue
@@ -49,10 +49,12 @@ export default {
methods: {
onClose() {
this.currentWindow.close()
+ this.inputValue = ''
},
onConfirm() {
this.currentWindow.close()
this.onConfirmCb(this.inputValue + this.expandText)
+ this.inputValue = ''
},
},
}
diff --git a/app/renderer/src/UI/Windows/Layout/Base.vue b/app/renderer/src/UI/Windows/Layout/Base.vue
index 238c9a64c..12a7eb0ec 100644
--- a/app/renderer/src/UI/Windows/Layout/Base.vue
+++ b/app/renderer/src/UI/Windows/Layout/Base.vue
@@ -4,7 +4,7 @@
@input="$emit('closeWindow')"
:persistent="isPersistent"
:hide-overlay="!blurBackground"
- :max-width="isFullscreen ? maxWidth : width"
+ :max-width="isFullscreen ? maxWindowWidth : windowWidth"
content-class="no-overflow"
>
@@ -42,8 +42,8 @@
@@ -94,11 +94,45 @@ export default {
type: Number,
default: 800,
},
+ percentageHeight: Number,
+ percentageWidth: Number,
+ maxPercentageHeight: Number,
+ maxPercentageWidth: Number,
},
computed: {
isDarkMode() {
return this.$store.state.Appearance.is_dark_mode
},
+ windowWidth() {
+ if (this.percentageWidth == undefined) {
+ return this.width
+ } else {
+ return (window.innerWidth / 100) * this.percentageWidth
+ }
+ },
+ windowHeight() {
+ if (this.percentageHeight == undefined) {
+ return this.height
+ } else {
+ return (window.innerHeight / 100) * this.percentageHeight - 150
+ }
+ },
+ maxWindowHeight() {
+ if (this.maxPercentageHeight == undefined) {
+ return this.maxHeight
+ } else {
+ return (
+ (window.innerHeight / 100) * this.maxPercentageHeight - 150
+ )
+ }
+ },
+ maxWindowWidth() {
+ if (this.maxPercentageWidth == undefined) {
+ return this.maxWidth
+ } else {
+ return (window.innerWidth / 100) * this.maxPercentageWidth
+ }
+ },
},
}
diff --git a/app/renderer/src/UI/Windows/Project/Chooser/ProjectCard.vue b/app/renderer/src/UI/Windows/Project/Chooser/ProjectCard.vue
index 412d6362d..0d98b92d2 100644
--- a/app/renderer/src/UI/Windows/Project/Chooser/ProjectCard.vue
+++ b/app/renderer/src/UI/Windows/Project/Chooser/ProjectCard.vue
@@ -16,7 +16,7 @@
}}
- {{ projectDescription }}
+ {{ projectDescription }}