From 3939adf334e080d8843a560b53599af00ab733d7 Mon Sep 17 00:00:00 2001 From: MaXFeeD Date: Wed, 12 Oct 2022 02:20:27 +0300 Subject: [PATCH 1/4] Typo & audit fix --- .vscode/tasks.json | 5 +---- gruntfile.js | 4 +--- package.json | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bf12d4f81..b7e9399d4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "Run typedoc", "type": "shell", - "command": "grunt docs", + "command": "grunt typedoc", "group": { "kind": "build", "isDefault": true @@ -15,9 +15,6 @@ { "label": "Initialize Environment", "type": "shell", - "options": { - "cwd": "documentation" - }, "command": "npm install --safe-dev", "group": { "kind": "build", diff --git a/gruntfile.js b/gruntfile.js index c1beced8d..9ba167a30 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -21,9 +21,7 @@ module.exports = function (grunt) { name: 'Core Engine v2.1 API', readme: './README.md', theme: 'default', - validation: { - invalidLink: true - }, + 'validation.invalidLink': true, entryPoints: ['./documentation/core-engine/headers/core-engine.d.ts'], 'sourcefile-url-prefix': 'https://github.com/mineprogramming/innercore-docs/blob/gh-pages/headers/', } diff --git a/package.json b/package.json index 4c7b5c695..6b0d8bd17 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "2.0.0", "description": "InnerCore Docs v2", "devDependencies": { - "docsify-cli": "^4.4.3", + "docsify-cli": "^4.4.2", "grunt": "^1.4.1", "grunt-cli": "^1.4.3", "grunt-contrib-concat": "^2.0.0", From 96decb5fc2e6a7cc970456eda6a457991d88d6f4 Mon Sep 17 00:00:00 2001 From: MaXFeeD Date: Wed, 12 Oct 2022 02:37:17 +0300 Subject: [PATCH 2/4] Fixed Creating a Custom Dimension path mistypo --- .../static/en/page/guides/world/dimensions.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/documentation/static/en/page/guides/world/dimensions.md b/documentation/static/en/page/guides/world/dimensions.md index 209070fcc..c70ecdadc 100644 --- a/documentation/static/en/page/guides/world/dimensions.md +++ b/documentation/static/en/page/guides/world/dimensions.md @@ -46,7 +46,7 @@ In this minimalistic example we are creating a single generation layer between y ## Single Layer Generation -![Generation Example #1](../../../assets/images/pages/dimensions-1.jpg) +![Generation Example #1](../../../../images/dimensions-1.jpg) ```js var generator = Dimensions.newGenerator({ @@ -91,10 +91,10 @@ Thus, the `octaves: {count: 4, scale: 40}` gets transformed into: ```js octaves: { - {scale: 0.025, weight: 0.5333, seed: 0}, - {scale: 0.05, weight: 0.2667, seed: 1}, - {scale: 0.1, weight: 0.1333, seed: 2}, - {scale: 0.2, weight: 0.0667, seed: 3} + { scale: 0.025, weight: 0.5333, seed: 0 }, + { scale: 0.05, weight: 0.2667, seed: 1 }, + { scale: 0.1, weight: 0.1333, seed: 2 }, + { scale: 0.2, weight: 0.0667, seed: 3 } } ``` @@ -106,24 +106,24 @@ To better understand how this function works, let's take a couple of examples (y yConversion: [ [0, 0.5], [1, -0.5], -]; +] ``` Creates a landscape where most of the blocks are concentrated in the bottom part of the layer: -![Generation Example #2](../../../assets/images/pages/dimensions-2.jpg) +![Generation Example #2](../../../../images/dimensions-2.jpg) ```js yConversion: [ [0, 0.5], [0.5, -0.5], [1, 0.5], -]; +] ``` Creates a landscape where most of the blocks are concentrated in the bottom and the top parts of the layer, leaving the middle empty: -![Generation Example #3](../../../assets/images/pages/dimensions-3.jpg) +![Generation Example #3](../../../../images/dimensions-3.jpg) ```js yConversion: [ @@ -132,16 +132,16 @@ yConversion: [ [0.5, 0.3], [0.75, -0.3], [1, 0.5], -]; +] ``` Creates a more complex landscape like the one displayed on the image: -![Generation Example #4](../../../assets/images/pages/dimensions-4.jpg) +![Generation Example #4](../../../../images/dimensions-4.jpg) ## Dimension Materials -![Generation Example #5](../../../assets/images/pages/dimensions-5.jpg) +![Generation Example #5](../../../../images/dimensions-5.jpg) ```js var generator = Dimensions.newGenerator({ @@ -192,7 +192,7 @@ Materials noise can be used for single generation layer to consist of blocks of When you need a more complex generation, you can use multiple layers. Layers are generated in the order they were listed in the description object, so you should want to generate a water layer at first. Let's take a look at some example: -![Generation Example #6](../../../assets/images/pages/dimensions-6.jpg) +![Generation Example #6](../../../../images/dimensions-6.jpg) ```js var generator = Dimensions.newGenerator({ @@ -241,14 +241,14 @@ dimension.setGenerator(generator); In this example we have three layers of generation: -- Solid water layer at the height of 64 -- Grass layer with cover, a base landscape -- Stone layer, a mountainous landscape with an additional heightmap +- Solid water layer at the height of 64 +- Grass layer with cover, a base landscape +- Stone layer, a mountainous landscape with an additional heightmap Heightmap is a 2-dimensional (x, z) noise that is used to generate a general height scheme of the layer. In our example it is used to generate mountains only time to time. Note that we use 1 and -1 as values of `yConversion` function of grass layer to make the landscape more flat. To make mountains less rounded, we can change the count of octaves of the stone layer. Say, we had 6 octaves in the stone layer, the generation should look like this: -![Generation Example #7](../../../assets/images/pages/dimensions-7.jpg) +![Generation Example #7](../../../../images/dimensions-7.jpg) However, you should always think twice before adding a lot of octaves and layers. Massive generation requires more time for calculations, so it is generally better to use layer conversions and heightmap of the existing layer then create multiple layers with more noise octaves. From f393b558c1f2ac7e83b303b5fd336de47f5999a3 Mon Sep 17 00:00:00 2001 From: MaXFeeD Date: Wed, 12 Oct 2022 14:16:34 +0300 Subject: [PATCH 3/4] Simplified Docsify implementation --- .vscode/tasks.json | 2 +- documentation/static/index.html | 14 +++++------ documentation/static/src/config.js | 37 +++++++++++------------------- gruntfile.js | 8 +------ package.json | 10 +++++--- 5 files changed, 29 insertions(+), 42 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b7e9399d4..21ab53717 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -15,7 +15,7 @@ { "label": "Initialize Environment", "type": "shell", - "command": "npm install --safe-dev", + "command": "npm run preinstall && npm install --save-dev", "group": { "kind": "build", "isDefault": true diff --git a/documentation/static/index.html b/documentation/static/index.html index 3397951a5..4aeab467a 100644 --- a/documentation/static/index.html +++ b/documentation/static/index.html @@ -2,21 +2,21 @@ - Document + Inner Core Docs - - + +
- + - - - + + + diff --git a/documentation/static/src/config.js b/documentation/static/src/config.js index 4df22f2cc..ece904cce 100644 --- a/documentation/static/src/config.js +++ b/documentation/static/src/config.js @@ -1,37 +1,27 @@ -const GIT_SRC = 'mineprogramming/innercore-docs'; -const GIT_TEST_SRC = 'TMM-Corporation/innercore-docs'; window.$docsify = { - name: 'InnerCore v2.1 Docs', - repo: GIT_SRC, + name: 'Inner Core Docs', + repo: 'mineprogramming/innercore-docs', loadSidebar: 'config/_sidebar.md', loadNavbar: 'config/_navbar.md', subMaxLevel: 4, relativePath: true, - // autoHeader: true, - // routerMode: 'history', + autoHeader: true, nameLink: { '/ru/': '#/ru/', '/en/': '#/en/', '/': '#/' }, alias: { - // mineprogramming/innercore-docs - '/': `https://raw.githubusercontent.com/${GIT_SRC}/gh-pages/`, - '/ru/.*?config/_navbar.md': `https://raw.githubusercontent.com/${GIT_SRC}/gh-pages/ru/config/_navbar.md`, - '/ru/.*?config/_sidebar.md': `https://raw.githubusercontent.com/${GIT_SRC}/gh-pages/ru/config/_sidebar.md`, - '/.*?config/_navbar.md': `https://raw.githubusercontent.com/${GIT_SRC}/gh-pages/en/config/_navbar.md`, - '/.*?config/_sidebar.md': `https://raw.githubusercontent.com/${GIT_SRC}/gh-pages/en/config/_sidebar.md` - // '.*README.md': './README.md', - // '/': '#/en/', - // '.*/en/(_navbar)|(.)': 'https://raw.githubusercontent.com/mineprogramming/innercore-docs/gh-pages/$2', - // '.*/ru/(_sidebar)|(.)': 'https://raw.githubusercontent.com/mineprogramming/innercore-docs/gh-pages/$2' + '/ru/(.*/|)config/(.*)': '/ru/config/$2', + '/(en/|)(.*/|)config/(.*)': '/en/config/$3', + '/.*/src/(.*)': '/src/$1' }, themeable: { readyTransition: true, // default responsiveTables: true // default }, + // https://github.com/jperasmus/docsify-copy-code copyCode: { - //https://github.com/jperasmus/docsify-copy-code buttonText: { '/zh-cn/': '点击复制', '/ru/': 'Скопировать в буфер обмена', @@ -41,7 +31,7 @@ window.$docsify = { }, errorText: { '/zh-cn/': '错误', - '/ru/': 'ошибка', + '/ru/': 'Ошибка', '/': 'Error' }, successText: { @@ -52,8 +42,8 @@ window.$docsify = { '/': 'Copied' } }, + // https://jhildenbiddle.github.io/docsify-tabs tabs: { - // https://jhildenbiddle.github.io/docsify-tabs/#/ persist: true, // default sync: true, // default theme: 'classic', // default @@ -61,8 +51,8 @@ window.$docsify = { tabHeadings: true // default }, timeUpdater: { - text: '>Last Modify: {docsify-updated}', - formatUpdated: '{YYYY}/{MM}/{DD}' + text: '> Last Modify: {docsify-updated}', + formatUpdated: '{DD}.{MM}.{YYYY}' }, plugins: [ function (hook, vm) { @@ -74,10 +64,9 @@ window.$docsify = { } else if (/jsdelivr\.net/.test(vm.route.file)) { url = vm.route.file.replace('cdn.jsdelivr.net/gh', 'github.com').replace('@gh-pages', '/blob/gh-pages'); } else { - url = `https://github.com/${GIT_SRC}/blob/gh-pages/${vm.route.file}`; + url = 'https://github.com/mineprogramming/innercore-docs/blob/gh-pages/' + vm.route.file; } - var editHtml = '[:memo: Edit Document](' + url + ')\n'; - return editHtml + html; + return html + '\n\n[:memo: Edit Document](' + url + ')'; }); } ] diff --git a/gruntfile.js b/gruntfile.js index 9ba167a30..9633e5c1a 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -18,7 +18,7 @@ module.exports = function (grunt) { build: { options: { out: './out/api/', - name: 'Core Engine v2.1 API', + name: 'Core Engine API', readme: './README.md', theme: 'default', 'validation.invalidLink': true, @@ -37,12 +37,6 @@ module.exports = function (grunt) { src: 'documentation/core-engine/headers/*', dest: 'out/headers/' }, - { - expand: true, - flatten: true, - src: 'documentation/static/core-engine/images/*', - dest: 'out/api/assets/images/pages/' - }, { expand: true, src: '**/*', diff --git a/package.json b/package.json index 6b0d8bd17..ad6d758bc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "core-engine-api", - "version": "2.0.0", - "description": "InnerCore Docs v2", + "version": "2.1.0", + "description": "Inner Core Docs", "devDependencies": { "docsify-cli": "^4.4.2", "grunt": "^1.4.1", @@ -15,11 +15,15 @@ "typescript": "^4.5.4", "underscore.string": "^3.3.6" }, + "resolutions": { + "minimist": "^1.2.7" + }, "scripts": { "serve-docs": "docsify serve ./documentation/static", "serve-out": "docsify serve ./out", "build": "grunt docs_api", - "build-serve": "npm run build && npm run serve-out" + "build-serve": "npm run build && npm run serve-out", + "preinstall": "npx npm-force-resolutions" }, "repository": { "type": "git", From 59c91d5341b3e4c629394daa9c98a407873275c1 Mon Sep 17 00:00:00 2001 From: MaXFeeD Date: Tue, 18 Oct 2022 12:21:38 +0300 Subject: [PATCH 4/4] No related to commit itself, just restored changes, everything maintained parlamently lost --- .docsifytopdfrc.json | 5 + .github/workflows/github-pages.yml | 29 +- .gitignore | 7 +- .vscode/settings.json | 5 +- .vscode/spellright.dict | 5 + .vscode/tasks.json | 6 +- README.md | 2 +- docs/config/_404.md | 24 + .../static/en => docs}/config/_navbar.md | 2 +- docs/config/_sidebar.md | 38 ++ .../static => docs}/images/dimensions-1.jpg | Bin .../static => docs}/images/dimensions-2.jpg | Bin .../static => docs}/images/dimensions-3.jpg | Bin .../static => docs}/images/dimensions-4.jpg | Bin .../static => docs}/images/dimensions-5.jpg | Bin .../static => docs}/images/dimensions-6.jpg | Bin .../static => docs}/images/dimensions-7.jpg | Bin docs/index.html | 142 ++++ docs/page/apps/horizon/index.md | 30 + docs/page/apps/horizon/pack-system.md | 37 ++ docs/page/apps/horizon/packs.md | 29 + docs/page/apps/innercore/changelog.md | 611 ++++++++++++++++++ .../en => docs}/page/apps/innercore/index.md | 12 +- docs/page/guides/getting-started/config.md | 67 ++ .../guides/getting-started/setup-toolchain.md | 1 + .../toolchain-configuration.md | 1 + .../page/guides/minecraft/attributes.md | 0 .../page/guides/minecraft/playercontainers.md | 126 ++++ .../page/guides/mod-api/callbacks.md | 0 .../page/guides/mod-resources/materials.md | 2 +- .../page/guides/player/abilities.md | 6 +- .../en => docs}/page/guides/world/biomes.md | 0 .../page/guides/world/dimensions.md | 2 - .../en => docs}/page/lib/BackpackAPI.md | 52 +- docs/page/mod/IndustrialCraft2.md | 1 + .../en => docs}/page/other/contributing.md | 11 +- docs/page/other/create-page.md | 83 +++ docs/ru/README.md | 19 + docs/ru/config/_404.md | 24 + .../static => docs}/ru/config/_navbar.md | 0 docs/ru/config/_sidebar.md | 41 ++ docs/ru/page/apps/horizon/index.md | 30 + docs/ru/page/apps/horizon/pack-system.md | 37 ++ docs/ru/page/apps/horizon/packs.md | 29 + docs/ru/page/apps/innercore/changelog.md | 611 ++++++++++++++++++ docs/ru/page/apps/innercore/index.md | 31 + docs/ru/page/guides/blocks/liquids.md | 44 ++ docs/ru/page/guides/getting-started/config.md | 67 ++ .../guides/getting-started/setup-toolchain.md | 1 + .../toolchain-configuration.md | 1 + docs/ru/page/guides/items/enchantements.md | 107 +++ docs/ru/page/guides/minecraft/attributes.md | 57 ++ .../page/guides/minecraft/playercontainers.md | 126 ++++ docs/ru/page/guides/mod-api/callbacks.md | 271 ++++++++ .../ru/page/guides/mod-resources/materials.md | 58 ++ docs/ru/page/guides/player/abilities.md | 151 +++++ docs/ru/page/guides/world/biomes.md | 47 ++ docs/ru/page/guides/world/dimensions.md | 252 ++++++++ .../en => docs/ru}/page/lib/DungeonUtility.md | 2 +- docs/ru/page/other/contributing.md | 10 + docs/ru/page/other/create-page.md | 83 +++ .../docsify-v4.js => docs/src/docsify.min.js | 2 +- docs/src/syntax/prism-markdown.min.js | 1 + .../themes/docsify-darklight-theme.min.css | 0 .../src/themes/docsify-darklight-theme.min.js | 1 + docs/src/themes/prism-vsc-dark-plus.css | 275 ++++++++ docs/src/themes/sun.svg | 1 + .../core-engine/declarations/BlockSource.d.ts | 2 +- .../core-engine/declarations/CoreEngine.d.ts | 2 +- .../declarations/CustomEnchant.d.ts | 2 +- .../core-engine/declarations/Game.d.ts | 2 +- .../core-engine/declarations/Native.d.ts | 2 +- .../api/mod/ui/elements/UIElement.d.ts | 4 +- documentation/static/.nojekyll | 0 documentation/static/en/README.md | 1 - documentation/static/en/config/_sidebar.md | 46 -- .../static/en/page/apps/horizon/index.md | 34 - .../en/page/apps/horizon/pack-system.md | 38 -- .../static/en/page/apps/horizon/packs.md | 31 - .../en/page/apps/innercore/changelog.md | 610 ----------------- .../en/page/guides/getting-started/config.md | 74 --- .../page/guides/minecraft/playercontainers.md | 118 ---- .../static/en/page/mod/IndustrialCraft2.md | 1 - .../static/en/page/other/create-page.md | 111 ---- .../page/wiki/building-mods/mod_structure.md | 138 ---- documentation/static/index.html | 22 - documentation/static/ru/README.md | 1 - documentation/static/ru/config/_sidebar.md | 12 - ...thods-and-variables-of-executable-files.md | 41 -- .../building-mods/bytecode-compilation.md | 16 - .../static/ru/page/building-mods/libraries.md | 103 --- .../ru/page/building-mods/mod-resources.md | 60 -- .../ru/page/building-mods/mod_structure.md | 136 ---- .../building-mods/standart-mod-template.md | 72 --- ...coreengine-global-methods-and-variables.md | 21 - documentation/static/src/config.js | 73 --- documentation/static/src/syntax/json.min.js | 11 - documentation/static/src/themes/dark-light.js | 27 - documentation/static/src/themes/fix.css | 10 - documentation/static/src/themes/vue.css | 1 - gruntfile.js | 16 +- package.json | 16 +- tsconfig.json | 24 +- 103 files changed, 3680 insertions(+), 1913 deletions(-) create mode 100644 .docsifytopdfrc.json create mode 100644 docs/config/_404.md rename {documentation/static/en => docs}/config/_navbar.md (63%) create mode 100644 docs/config/_sidebar.md rename {documentation/static => docs}/images/dimensions-1.jpg (100%) rename {documentation/static => docs}/images/dimensions-2.jpg (100%) rename {documentation/static => docs}/images/dimensions-3.jpg (100%) rename {documentation/static => docs}/images/dimensions-4.jpg (100%) rename {documentation/static => docs}/images/dimensions-5.jpg (100%) rename {documentation/static => docs}/images/dimensions-6.jpg (100%) rename {documentation/static => docs}/images/dimensions-7.jpg (100%) create mode 100644 docs/index.html create mode 100644 docs/page/apps/horizon/index.md create mode 100644 docs/page/apps/horizon/pack-system.md create mode 100644 docs/page/apps/horizon/packs.md create mode 100644 docs/page/apps/innercore/changelog.md rename {documentation/static/en => docs}/page/apps/innercore/index.md (93%) create mode 100644 docs/page/guides/getting-started/config.md create mode 100644 docs/page/guides/getting-started/setup-toolchain.md create mode 100644 docs/page/guides/getting-started/toolchain-configuration.md rename {documentation/static/en => docs}/page/guides/minecraft/attributes.md (100%) create mode 100644 docs/page/guides/minecraft/playercontainers.md rename {documentation/static/en => docs}/page/guides/mod-api/callbacks.md (100%) rename {documentation/static/en => docs}/page/guides/mod-resources/materials.md (96%) rename {documentation/static/en => docs}/page/guides/player/abilities.md (95%) rename {documentation/static/en => docs}/page/guides/world/biomes.md (100%) rename {documentation/static/en => docs}/page/guides/world/dimensions.md (97%) rename {documentation/static/en => docs}/page/lib/BackpackAPI.md (67%) create mode 100644 docs/page/mod/IndustrialCraft2.md rename {documentation/static/en => docs}/page/other/contributing.md (67%) create mode 100644 docs/page/other/create-page.md create mode 100644 docs/ru/README.md create mode 100644 docs/ru/config/_404.md rename {documentation/static => docs}/ru/config/_navbar.md (100%) create mode 100644 docs/ru/config/_sidebar.md create mode 100644 docs/ru/page/apps/horizon/index.md create mode 100644 docs/ru/page/apps/horizon/pack-system.md create mode 100644 docs/ru/page/apps/horizon/packs.md create mode 100644 docs/ru/page/apps/innercore/changelog.md create mode 100644 docs/ru/page/apps/innercore/index.md create mode 100644 docs/ru/page/guides/blocks/liquids.md create mode 100644 docs/ru/page/guides/getting-started/config.md create mode 100644 docs/ru/page/guides/getting-started/setup-toolchain.md create mode 100644 docs/ru/page/guides/getting-started/toolchain-configuration.md create mode 100644 docs/ru/page/guides/items/enchantements.md create mode 100644 docs/ru/page/guides/minecraft/attributes.md create mode 100644 docs/ru/page/guides/minecraft/playercontainers.md create mode 100644 docs/ru/page/guides/mod-api/callbacks.md create mode 100644 docs/ru/page/guides/mod-resources/materials.md create mode 100644 docs/ru/page/guides/player/abilities.md create mode 100644 docs/ru/page/guides/world/biomes.md create mode 100644 docs/ru/page/guides/world/dimensions.md rename {documentation/static/en => docs/ru}/page/lib/DungeonUtility.md (52%) create mode 100644 docs/ru/page/other/contributing.md create mode 100644 docs/ru/page/other/create-page.md rename documentation/static/src/docsify-v4.js => docs/src/docsify.min.js (99%) create mode 100644 docs/src/syntax/prism-markdown.min.js rename documentation/static/src/themes/dark-light.css => docs/src/themes/docsify-darklight-theme.min.css (100%) create mode 100644 docs/src/themes/docsify-darklight-theme.min.js create mode 100644 docs/src/themes/prism-vsc-dark-plus.css create mode 100644 docs/src/themes/sun.svg delete mode 100644 documentation/static/.nojekyll delete mode 100644 documentation/static/en/README.md delete mode 100644 documentation/static/en/config/_sidebar.md delete mode 100644 documentation/static/en/page/apps/horizon/index.md delete mode 100644 documentation/static/en/page/apps/horizon/pack-system.md delete mode 100644 documentation/static/en/page/apps/horizon/packs.md delete mode 100644 documentation/static/en/page/apps/innercore/changelog.md delete mode 100644 documentation/static/en/page/guides/getting-started/config.md delete mode 100644 documentation/static/en/page/guides/minecraft/playercontainers.md delete mode 100644 documentation/static/en/page/mod/IndustrialCraft2.md delete mode 100644 documentation/static/en/page/other/create-page.md delete mode 100644 documentation/static/en/page/wiki/building-mods/mod_structure.md delete mode 100644 documentation/static/index.html delete mode 100644 documentation/static/ru/README.md delete mode 100644 documentation/static/ru/config/_sidebar.md delete mode 100644 documentation/static/ru/page/building-mods/basic-methods-and-variables-of-executable-files.md delete mode 100644 documentation/static/ru/page/building-mods/bytecode-compilation.md delete mode 100644 documentation/static/ru/page/building-mods/libraries.md delete mode 100644 documentation/static/ru/page/building-mods/mod-resources.md delete mode 100644 documentation/static/ru/page/building-mods/mod_structure.md delete mode 100644 documentation/static/ru/page/building-mods/standart-mod-template.md delete mode 100644 documentation/static/ru/page/coreengine-global-methods-and-variables.md delete mode 100644 documentation/static/src/config.js delete mode 100644 documentation/static/src/syntax/json.min.js delete mode 100644 documentation/static/src/themes/dark-light.js delete mode 100644 documentation/static/src/themes/fix.css delete mode 100644 documentation/static/src/themes/vue.css diff --git a/.docsifytopdfrc.json b/.docsifytopdfrc.json new file mode 100644 index 000000000..862af52aa --- /dev/null +++ b/.docsifytopdfrc.json @@ -0,0 +1,5 @@ +{ + "contents": [ "docs/ru/config/_sidebar.md" ], + "pathToPublic": "docs.pdf", + "emulateMedia": "screen" +} diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 16cde41e6..575c32f9d 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -1,36 +1,31 @@ -name: Build docs & Deploy +name: Deploy + on: push: branches: - master + jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v2 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 with: node-version: '14' - - name: Cache - uses: actions/cache@v1 + - uses: actions/cache@v1 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - - name: Setup grunt - run: npm install -g grunt-cli - - name: Setup other dependencies - run: npm install --safe-dev - - name: Build docs - run: grunt docs_api - - name: Deploy - uses: JamesIves/github-pages-deploy-action@4.1.6 + - run: npm install -g grunt-cli + - run: npm install --safe-dev + - run: grunt docs_api + - uses: JamesIves/github-pages-deploy-action@4.1.6 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BASE_BRANCH: master BRANCH: gh-pages - FOLDER: out - single-commit: true \ No newline at end of file + FOLDER: docs + single-commit: true diff --git a/.gitignore b/.gitignore index 24f5fc641..3e0e43f8b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /documentation/core-engine/headers/core-engine.d.ts /package-lock.json -/node_modules -/OLD -/out \ No newline at end of file +/node_modules/ +/docs/README.md +/docs/headers/ +/docs/api/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 25377a046..f8f9198f4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,8 @@ }, "spellright.language": [ "en", - "uk" + "uk", + "ru" ], "spellright.documentTypes": [ "markdown", @@ -14,4 +15,4 @@ "markdown.extension.tableFormatter.normalizeIndentation": true, "markdown.extension.list.indentationSize": "inherit", "markdown.extension.toc.orderedList": true -} \ No newline at end of file +} diff --git a/.vscode/spellright.dict b/.vscode/spellright.dict index 9a192c569..477ed6bed 100644 --- a/.vscode/spellright.dict +++ b/.vscode/spellright.dict @@ -5,3 +5,8 @@ minecraft Superflat Params perlin +шейдеры +шейдер +Майнкрафт +суперплоскость +калбек diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 21ab53717..31a52cfbd 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "Run typedoc", "type": "shell", - "command": "grunt typedoc", + "command": "npm run build", "group": { "kind": "build", "isDefault": true @@ -15,11 +15,11 @@ { "label": "Initialize Environment", "type": "shell", - "command": "npm run preinstall && npm install --save-dev", + "command": "npm install --save-dev", "group": { "kind": "build", "isDefault": true } } ] -} \ No newline at end of file +} diff --git a/README.md b/README.md index 4650d4360..bdef875e9 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,6 @@ npm install -g grunt-cli Documentation repository is located at [GitHub](https://github.com/mineprogramming/innercore-docs). -To build this repository locally, open this folder in Visual Studio Code and run (_Ctrl+Shift+B_) **Initialize Environment** task. This will install all required npm dependencies locally. To build typedoc documentation and headers, run **Run Typedoc** task. +To build this repository locally, open this folder in Visual Studio Code and run (_Ctrl+Shift+B_) **Initialize Environment** task. This will install all required npm dependencies locally. To build typedoc documentation and headers, run **Run Typedoc** task. Use npm package manager to perform another scripts, such as `npm run build-serve` or `npm run serve`. [Goto Docs](/) diff --git a/docs/config/_404.md b/docs/config/_404.md new file mode 100644 index 000000000..1f5580686 --- /dev/null +++ b/docs/config/_404.md @@ -0,0 +1,24 @@ +# Oops... Not found! + +## [Diving back into documentation...](https://docs.mineprogramming.org/#/) + + diff --git a/documentation/static/en/config/_navbar.md b/docs/config/_navbar.md similarity index 63% rename from documentation/static/en/config/_navbar.md rename to docs/config/_navbar.md index f4eb3e581..b14fc2510 100644 --- a/documentation/static/en/config/_navbar.md +++ b/docs/config/_navbar.md @@ -1,3 +1,3 @@ - Language - - [:uk: English](/en/) + - [:us: English](/) - [:ru: Русский](/ru/) diff --git a/docs/config/_sidebar.md b/docs/config/_sidebar.md new file mode 100644 index 000000000..29ba93ba7 --- /dev/null +++ b/docs/config/_sidebar.md @@ -0,0 +1,38 @@ +- [Horizon](/page/apps/horizon/index.md) + - [Packs](/page/apps/horizon/pack-system.md) + - [What is in pack](/page/apps/horizon/packs.md) + +- [Inner Core](/page/apps/innercore/index.md) + - [Core Engine API](/api/modules.html ':ignore :target=_self') + - [Changelog](/page/apps/innercore/changelog.md) + + Getting Started + - [Inner Core Mod Toolchain](/page/guides/getting-started/setup-toolchain.md) + - [Configure your toolchain](/page/guides/getting-started/toolchain-configuration.md) + - [Mod Configuration Files](/page/guides/getting-started/config.md) + + Minecraft + - [Attributes](/page/guides/minecraft/attributes.md) + - [Player Containers](/page/guides/minecraft/playercontainers.md) + + Mod API + - [Callbacks](/page/guides/mod-api/callbacks.md) + + Mod Resources + - [Materials](/page/guides/mod-resources/materials.md) + + Player + - [Abilities](/page/guides/player/abilities.md) + + World + - [Biomes](/page/guides/world/biomes.md) + - [Dimensions](/page/guides/world/dimensions.md) + +- [Contributing](/page/other/contributing.md) + - [Creating new pages](/page/other/create-page.md) + +- Libraries + - [BackpackAPI](/page/lib/BackpackAPI.md) + +- Mods + - [IndustrialCraft](/page/mod/IndustrialCraft2.md) diff --git a/documentation/static/images/dimensions-1.jpg b/docs/images/dimensions-1.jpg similarity index 100% rename from documentation/static/images/dimensions-1.jpg rename to docs/images/dimensions-1.jpg diff --git a/documentation/static/images/dimensions-2.jpg b/docs/images/dimensions-2.jpg similarity index 100% rename from documentation/static/images/dimensions-2.jpg rename to docs/images/dimensions-2.jpg diff --git a/documentation/static/images/dimensions-3.jpg b/docs/images/dimensions-3.jpg similarity index 100% rename from documentation/static/images/dimensions-3.jpg rename to docs/images/dimensions-3.jpg diff --git a/documentation/static/images/dimensions-4.jpg b/docs/images/dimensions-4.jpg similarity index 100% rename from documentation/static/images/dimensions-4.jpg rename to docs/images/dimensions-4.jpg diff --git a/documentation/static/images/dimensions-5.jpg b/docs/images/dimensions-5.jpg similarity index 100% rename from documentation/static/images/dimensions-5.jpg rename to docs/images/dimensions-5.jpg diff --git a/documentation/static/images/dimensions-6.jpg b/docs/images/dimensions-6.jpg similarity index 100% rename from documentation/static/images/dimensions-6.jpg rename to docs/images/dimensions-6.jpg diff --git a/documentation/static/images/dimensions-7.jpg b/docs/images/dimensions-7.jpg similarity index 100% rename from documentation/static/images/dimensions-7.jpg rename to docs/images/dimensions-7.jpg diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..506cb11f1 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,142 @@ + + + + Inner Core Docs + + + + + + + + +
Inner Core Docs
+ + + + + + + + + + + + diff --git a/docs/page/apps/horizon/index.md b/docs/page/apps/horizon/index.md new file mode 100644 index 000000000..14fcc4b43 --- /dev/null +++ b/docs/page/apps/horizon/index.md @@ -0,0 +1,30 @@ +## What is Horizon Modding Kernel (HMK)? + +Horizon is a universal platform for launching mobile games with mods. At the moment, it supports only Inner Core, which contains Minecraft: Bedrock Edition 1.11.4 and 1.16.201. Horizon allows you to create and store several independent Inner Core packages, which in turn allows you to divide different mod packs and worlds with these packages. Development can take place in JavaScript, Java, C++ and not only. + +## Structure of the HMK pack + +1. The game on which the launcher is based +2. The launcher on which the user will play +3. The browser of mods that the user can apply to the game + +## Native mods + +Mods are written in C++ and applied to game directly. +They have full access to game and can use all its functions. + +## Useful links + +[Horizon Modding Kernel](https://play.google.com/store/apps/details?id=com.zheka.horizon) + +[Group in VK](https://vk.com/core_engine) + +[Inner Core Mod Toolchain — develop and build modifications](https://github.com/zheka2304/innercore-mod-toolchain) + +[Setup up Inner Core Mod Toolchain on YouTube](https://www.youtube.com/watch?v=ofwKkRYh97k) + +[Tools for development of mods](https://icmods.mineprogramming.org/dev) + +[Discussion in VK for sending messages about bugs](https://vk.com/topic-134044100_41523503) + +[Documentation for development of mods](https://docs.mineprogramming.org) diff --git a/docs/page/apps/horizon/pack-system.md b/docs/page/apps/horizon/pack-system.md new file mode 100644 index 000000000..5e8d42074 --- /dev/null +++ b/docs/page/apps/horizon/pack-system.md @@ -0,0 +1,37 @@ +Packs are fully independent instances of games with mods (with separate saves and mods). Mods can be installed manually or using internal mod managers. + +All installed packs will be showed on main screen, to select and open a pack just click on it. After pack is selected it will be opened automatically during next launches. To exit from pack menu to pack selection press back on navigation panel. + +## How to install / remove a pack? + +To install the pack, click the large **+** button and select the pack you are interested in. + +To delete an already downloaded / not installed pack, you need to hold on the pack and a context menu will open, which has the following content below. + +## Clonning packs + +Cloning packs allows you to create full copy of pack and all its mods and saves, that will be fully independent from original pack. To clone a pack long-click on it and press clone. + +## Deleting packs + +If you want to free storage space, used by some pack, just long-click and press delete, but notice, that it will delete all its saves. Packs will not be deleted if app is uninstalled in case if it installed externally. + +## Pack context menu + +- Add to favorites — mark this pack as a favorite, it will be shown under another installed +- Clone — duplicates the pack completely with all worlds and mods +- Re-install — completely reinstalls the package from the cache with the data saved, it will be cleaned by default +- Show info — opens a dialog box with information about the package, such as: + - Title — the full name of the pack + - Pack Description + - Game — what game was created for + - Version — the version of the current pack and the latest available version + - State — pack installation status + - INSTALLED — pack is already installed + - PENDING — expected download and installation + - CORRUPT — something went wrong during installation, if it doesn't, remove *.installation_started* file in your directory pack manually + - NOT_INSTALLED — not downloaded and not installed + - Local directory — path to the pack from */sdcard/games/horizon/packs* or */sdcard/Android/data/com.zheka.horizon/files/horizon/packs* + - External UUID — UUID of pack + - Changelog — opens the full changelog for this pack +- Delete — completely deletes all pack data, including worlds, resource packs, mods, etc. diff --git a/docs/page/apps/horizon/packs.md b/docs/page/apps/horizon/packs.md new file mode 100644 index 000000000..55c0eed82 --- /dev/null +++ b/docs/page/apps/horizon/packs.md @@ -0,0 +1,29 @@ +In main menu of Inner Core pack there are 5 buttons: + +1. **Play** — button to start the game +2. **Native mods** — button on the right side of the screen to open the native mods menu +3. **Mod browser** — integrated mod browser + 1. Download mods — a tab where you can download any mods for the game + 2. My mods — a tab where you can manage your installed mods + 3. Modpacks — ready-made builds of mods that are created by developers + 4. Updates — list of mods that are available for update + 5. Visit website — opens a full-fledged mods site for the game +4. **Preferences and links** + 1. Pack settings + 1. **Disable the loading screen** — displaying the loading screen of mods, when turned on on some devices, it may speed up the download. + 2. **Developer Mode** — useful for mod creators, includes debugging mode in supported mods. + 3. **Limitation of updates by version** — the number of updates of mods in the tick will be limited by the execution time, otherwise by the number of updated objects. Simply put, how many calls to the tick can mods make. + 4. **Maximum updates per tick** — adjustment of the _time limit_. + 5. **Advanced thread priority settings** — a higher priority of the server thread stabilizes the number of ticks per second of TPS (this means more stable operation and response time), however, this can cause freezes and frame drawdown per second of FPS. + 6. **Server thread priority** — adjustment of the _expanded thread priority setting_. + 7. **Threshold FPS** — as long as FPS is below this threshold, the server thread will work at the lower priority, otherwise the upper priority will be set. + 8. **Number of additional threads** — additional threads are an experimental setup. On powerful devices, it can improve performance under heavy load. + 9. **Priority of additional threads** — adjustment of _the number of additional threads_. + 10. **Auto-save** — allows you to save the world and mods data if the game may abruptly shut down or incorrectly. + 11. **Autosave period** — time in seconds between autosave launches. + 12. **Enable Socket Server** — allows players on a local network to connect to your world using sockets. + 13. **Use the native protocol** — connect using the native protocol (by default, the protocol based on _sockets_ has a higher priority). + 14. **Force the Local Native Protocol** - _**for developers!**_ — use the native protocol for communication between the local client and the server. This setting is only needed for debugging mods and the engine, **do not use it for production!** + 2. Guides and links — a tab with links and guides + 3. Thanks — a tab with credits of the developers, testers, mod developers + 4. About app diff --git a/docs/page/apps/innercore/changelog.md b/docs/page/apps/innercore/changelog.md new file mode 100644 index 000000000..652d0e85f --- /dev/null +++ b/docs/page/apps/innercore/changelog.md @@ -0,0 +1,611 @@ +## 2.2.1b105 + +- Added experimental API for creating custom enchants: +- Minor optimization for C++ to Java calls +- Minor fixes for icons in UI + +## 2.2.1b104 + +- Fixed last item in hend was not spending +- Fixed animated liquid textures +- Fixed endless custom buckets in survival +- Now changing items in ItemUse callback are handled correctly when not prevented +- Added Block.registerClickFunction\[ForID\](nameId/id, (coords, item, block, player) => void) +- Fixed position, passed dispense callback, added slot parameter (4th argument) + +## 2.2.1b103 + +- When creating liquids you can now automatically create buckets with full functionality (see docs) +- Added isRenewable parameter for custom liquids +- Fixed bucket interaction with custom liquids + +## 2.2.1b102 + +- Added methods for creating liquid blocks, docs: +- Fixed some mod manager issues and crashes, added ability to search mod by its id +- Added Entity.hasEffect(entity, effectId) and Entity.getEffect(entity, effectId) +- Added BlockSource.setDestroyParticlesEnabled(boolean) method +- Fixed Item.invokeItemUseOn not using given entity block source +- Fixed vanilla swords tool data +- Fixed destroying attachables was causing crash +- Fixed creating block states by block id +- Fixed BlockState.addStates was not accepting JS object +- Other minor fixes + +## 2.2.1b101 + +- Fixed some fence blocks were not displayed correctly in world + +## 2.2.1b100 + +- Added Block.getMaterial(blockId) +- Added PlayerActor methods: getItemUseDuration(), getItemUseIntervalProgress(), getItemUseStartupProgress() +- Fixed multiplayer mod list was built with incorrect mod info +- Fixed BlockSource.listAllEntitiesInAABB was not returning player, when passed no filter parameters + +## 2.2.1b99 + +- Fixed syncing runtime ids in multiplayer could fail +- Fixed multiplayer mod list check was not working +- Fixed startup crash on old android versions on some devices + +## 2.2.1b98 + +- Fixed Commands.exec +- Fixed Entity.getNameTag + +## 2.2.1b97 + +- Now when connecting to remote world, additional synchronization is done, to assure block runtime ids will match even in case of different mods. + +## 2.2.1b96 + +- Added methods Recipes.getAllWorkbenchRecipes() and Recipes.getAllFurnaceRecipes() +- Added method BlockSource.getBiomeDownfallAt(x, y, z) +- Added slot element properties: iconScale and disablePixelPerfect +- Added methods for UI.Window: updateScrollDimensions() and updateWindowPositionAndSize() +- Added new text alignment type: 3 - ALIGN_CENTER_HORIZONTAL +- Added functon runOnClientThread(function), works as runOnMainThread, but for client ticking thread +- Fixed some item ids compatibility and related recipes - nether start, melon, records, horse armor, fireball, fireworks +- Fixed chestplate model for modded armor + +## 2.2.1b95 + +- Added BlockSource methods setExtraBlock(x, y, z, BlockState/\[id, data\]) and getExtraBlock(x, y, z) -> BlockState to access and modify extra blocks, such as liquids in other blocks +- Added block description parameters "can_contain_liquid" and "can_be_extra_block" +- Added methods Block.canContainLiquid(id) and Block.canBeExtraBlock(id) +- Fixed settings changes were not applied on first launch after change +- Fixed crashes in mod config +- Fixed language settings were not loaded correctly +- Added developer option to output block state info dump + +## 2.2.1b94 + +- Fixed new modpack selecting bug from 2.2.1b93 +- Fixed Item.isValid(id), added IDRegistry.getStringIdAndTypeForIntegerId(id), IDRegistry.getTypeForIntegerId(id), IDRegistry.getStringIdForIntegerId(id) +- Fixed getEnchantName from ItemExtraData + +## 2.2.1b93 + +- Fixed modded food +- Restored basic functionality of PathNavigation +- Added API to override underwater fog parameters and fixed underwater fog in custom dimensions +- Added EntityAddedLocal and EntityRemovedLocal callbacks - client side variants of EntityAdded and EntityRemoved +- Fixed Entity.setOffhandItem +- Added Dimensions.getAllRegisteredCustomBiomes() method, returning map of all custom biomes +- Various possible in-game chashes fixed +- Fixed some mod manager crashes & minor redesign +- Fixed wrong modpack can be loaded, when multiple modpacks are installed +- Improved Chinese support + +## 2.2.1b92 + +- Errors in updatables (for example machines) now will not shutdown all mods until world reload. Instead it will disable only updatable, causing error. +- Crash fixes + +## 2.2.1b90-91 + +- Previous version hotfix + +## 2.2.1b89 + +- Fixed bug when block ids were not synced in multiplayer +- Added vanilla block states API +- Fixed workbench for connected players +- Fixed generation callbacks errors +- Improved saves stability +- Fixed links and guides page +- Fixed excess items were added to creative + +## 2.2.1b88 + +- Added callback EntityPickUpDrop(entity, dropEntity, dropStack, count), it is called, when entity picks up dropped item, right now works only for players +- Updated guides and links page, added links to mod and modpack development guides +- Minor fixes for ItemModel and other crashes and errors + +## 2.2.1b87 + +- Fixed modpack system and mod manager issues +- Fixed missing or invalid workbench recipes and item icons +- Added useful links to preferences and links menu + +## 2.2.1b86 + +- Global engine optimization will increase overall modded performance +- Fixed lags in creative inventory, when items with extra data are present +- Minor optimization for creative search + +## 2.2.1b85 + +- Massive update to mod manager with alot of new features, fixes and improvements +- Added modpack support, including installation, modification and creating your own +- Block models are now loading faster and consume less RAM +- BlockSource.breakBlock/ForJsResult methods now also invoke DestroyBlock callback, if actor is passed as a parameter and exists in BlockSource's dimension (and it was not prevented by BreakBlock callback) + +## 2.2.0b84 + +- Added PreProcessChunk and PostProcessChunk callbacks - universal world generation callbacks. First one called before vanilla structures generation and second one after it. All others callbacks are called after vanilla generation but before PostProcessChunk +- Fixed missing bed and chest recipes +- Fixed using mesh in ActorRenderer +- Fixed rare crashes when entering and leaving the world +- Fixed transparency was not working for far blocks +- Fixed config.json interaction with .redirect +- Added slot element binding selection_forced + +## 2.2.0b83 + +- Rework for block drop system +- Added callback BreakBlock (BlockSource, position, block, isDropAllowed, player, item) - called when block is destroyed, unlike DestroyBlock can be called not only when block is destroyed by player, but also by new BlockSource methods. This callback is used for block drops, player destroy logic must remain in DestroyBlock +- Drop functions now using BreakBlock +- Added blocksource methods BlockSource: breakBlock(x, y, z, isDropAllowed\[, actor\]\[, item\]) - destroys block, calls BreakBlock, breakBlockForJsResult(x, y, z\[, actor\]\[, item\]) - same as breakBlock, but instead of dropping items and exp orbs, returns: {experience:, items: \[{id:, count:, data:, extra:}, ...\]} + +## 2.2.0b82 + +- Added ItemContainer methods setSlotSavingEnabled(name, enabled), setGlobalSlotSavingEnabled(enabled), they are used to control, which slots are saved +- Added parameter to destroy method of tile entity, that indicates, if it was destroyed in DestroyBlock callback +- Optimized inventory editing methods for player +- Fixed editing player abilities, including flying +- Fixed server open listener in ItemContainer was called before open packet is sent +- Fixed some furnace recipes +- Fixed loading bug on older android versions +- Fixed breaking ice + +## 2.2.0b79-81 + +- Added missing and fixed existing workbench recipes +- Fixed constant startup crashes on some devices (new bug since 1.16.201) +- Fixed frequend startup crashes on some devices (old bug since 1.11.4) + +## 2.2.0b78 + +- Continued fixing worldgen + +## 2.2.0b77 + +- Fixed modded world generation was called multiple times per chunk. It will significantly reduce lag. +- Modded world generation now called AFTER vanilla worldgen. +- Another attemt to fix loading mods on some devices +- Added log methods: Logger.debug(tag, message), Logger.info(tag, message), Logger.error(tag, message\[, error\]); + +## 2.2.0b76 + +- Fixed loading mods with resource packs +- Fixed saves errors +- Fixed loading mods on some devices +- Added parameter "category" in Item.createItem + +## 2.2.0b75 + +- Updated for Minecraft 1.16.201 +- Multiplayer might experience some issues with ID sync, if it happens, try swapping host and client +- Added API for armor and attachable renderer +- Major refactor for mod loader +- Major refactor for saves system and some other engine modules +- Started working on ECS and Java API + +## 2.1.0b72 + +- Now, when connecting to host with some blocks or items, missing on client, placeholders will be created to prevent crash +- Native protocol tested on extremely high load, possible lags and crashes fixed + +## 2.1.0b71 + +- Saving previously logged in Xbox account (experimental) +- Minor fixes + +## 2.1.0b70 + +- Added multiplayer FAQ in Xbox login window. +- Increased initialization packet timeout up to 90 seconds. +- Fixes for network entities +- Other minor fixes + +## 2.1.0b69 + +- Nice, we have reached this point +- Fixed items with extra data were sometimes invisible in vanilla UI +- Added getLightLevel(x, y, z) to BlockSource + +## 2.1.0b68 + +- Minor improvements to native protocol (Xbox multiplayer). + +## 2.1.0b65-67 + +- Made Xbox login functional on most devices. + +## 2.1.0b64 + +- Added experimental custom xbox login feature. You can connect to your friends from xbox account with same mods as yours (with multiplayer support). Xbox connection will use only native protocol, that was added in 2.1.0b63. + +## 2.1.0b63 + +- Added ability to use multiplayer with native minecraft protocol. This option can be turned on in engine config. Native protocol might reduce ping, but could be less stable. +- Minor fixes + +## 2.1.0b61-62 + +- Fixes for ItemContainer and BlockSource +- Other fixes + +## 2.1.0b60 + +- Added method exists() to animations +- Minor fixes + +## 2.1.0b59 + +- Added methods BlockRenderer.setCustomRaycastShape(id, data, collisionShape), BlockRenderer.setCustomCollisionAndRaycastShape(id, data, collisionShape) +- Added methods BlockRenderer.mapCollisionModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapRaycastModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapCollisionAndRaycastModelAtCoords(dimensionId, x, y, z, model), for collision and raycast shape mapping, passing null model will unmap it, mapping works on any block including air +- Added BlockSource method getBlock(x, y, z), returning object, that contains both id and data +- Clearing mapped render models (not collision ones) on local player dimension change as well as animations +- Other minor fixes + +## 2.1.0b58 + +- Minor fixes + +## 2.1.0b57 + +- Added method Network.inRemoteWorld() - returns true, if player connected to remote world +- Added callback ItemUseLocal(coords, item, block, player) for client side item use +- Added callback ConnectingToHost(host, minecraftPort, moddedPort) +- Improvements for NetworkConnectedClientList +- Added method BlockSource.getCurrentClientRegion() +- Other minor fixes + +## 2.1.0b56 + +- New item caching system, that caches every complex icon, not only custom models and allows creating of model cache groups +- Call ItemModel.setCurrentCacheGroup("groupName", "version") at the start of your mod to create cache group, it will be applied to all models, created at the root of your mod (including default ones). If specified version does not match cache version, whole group will be re-created. +- Fixed ItemContainer interaction with items with extra data. + +## 2.1.0b55 + +- Fixed compatibility with Recipe Viewer +- Added block special type parameter color_source, can be one of "none", "leaves", "grass", "water" +- Sped up loading of item models and made it less RAM consuming +- Minor improvements + +## 2.1.0b48-54 + +Following updates contain fixes for multiplayer update. + +## 2.1.0b47 + +This update adds experimental LAN multiplayer support, allowing players on same Wi-Fi and same set of mods play together. + +**ALL MODS NEED TO BE UPDATED TO SUPPORT MULTIPLAYER.** Playing with mods without multiplayer support (warning will appear) might cause undefined behaviour or even crash, so do it at your own risk. + +Alot of new API modules, callbacks and functions were introduced in this update, but backwards compatibility remains. There will be a migration guide for mod developers. + +## 2.0.5b46 + +- Fixed 2.0.5b45 bug, which caused icon problems of items with extra data +- Fixed mod manager didnt show redirected mods + +## 2.0.5b45 + +- Added item model method setModelOverrideCallback(function(item) {...}), acts like itemOverrideFunctions, but returns ItemModel instance, instead of icon +- Added method ItemModel.newStandalone(), creates empty ItemModel instance, not linked to any item, this models should be used in setModelOverrideCallback +- Item override function now receives extra data +- Fixed crash, caused by calling toScriptable() method of NBT tags +- D8 dexer, instead of old DX is now used to build dex files from java + +## 2.0.5b44 + +- Mods now can access and modify NBT of entities, tile entities and items. Docs are located at the bottom. +- Added functions: Entity.getCompoundTag(entity), Entity.setCompoundTag(entity, tag) +- Added methods to vanilla TileEntity, returned by World.getContainer(): getCompoundTag(), setCompoundTag(tag) +- Added methods to ItemExtraData: getCompoundTag(), setCompoundTag(tag) +- Mod UI now supports modded animated item icons +- Icon override functions now receives second parameter - isModUi +- Added function Debug.big, acts like Debug.m, but outputs dialog with selectable text and pretty JSON +- TileEntity function click now receives additional parameter - click coords +- Fixed rare addon-related crash + +NBT.CompoundTag (map, string keys): + +- constructor() - creates empty tag +- constructor(NBT.CompoundTag) - creates tag copy +- toScriptable() - returns javascript object, that represents contents +- getAllKeys() - returns java array with all keys +- contains(key) - checks tag contains key +- containsValueOfType(key, type) - checks tag contains key and value is desired type +- getValueType(key) - returns value type by key (type is integer) +- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key) - value getters +- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key, value) - value setters +- remove(key) - deletes value by key +- clear() - deletes all values + +NBT.ListTag (list, non-negative integer indices): + +- constructor() - creates empty list +- constructor(NBT.ListTag) - creates list copy +- toScriptable() - returns javascript object, that represents contents +- length() - returns list length +- getValueType(index) - returns value type by index (type is integer) +- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index) - returns value by index +- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index, value) - set value by index, if index >= length, adds to the end, if index < 0 adds to beginning, else replaces +- clear() - deletes all values + +## 2.0.4b43 + +- Automatically deleting resource and behavior packs from uninstalled mods upon world load +- RenderMesh now can receive not only absolute file path, but also resource path and name of file in models/ dir in resources. +- Deprecated slot element parameters isTransparentBackground and needClean, now slot supports transparent background by default +- Added container method setOnOpenListener(function(container, window) {...}) +- Removed shared objects, built for x86 ABI to reduce overall weight +- Fixed error, that occurred after second WRAP_JAVA call on same class + +## 2.0.4b42 + +- Callback.addCallback now has third optional parameter - priority (integer, default value is 0). Callbacks with higher priority will be called earlier +- UI slots now support animated background (texture name array must be passed instead of single name). For other textures in UI this feature was already present. +- UI slots now has text parameter, also container.setText work on them. If this parameter is not null, it value will be shown instead of count +- World.clip now works on actors, but only on certain mode parameter values. +- Fixed block icon generation for ICRender models. + +## 2.0.4b41 + +- Attemt to fix blurry UI on some devices + +## 2.0.4b40 + +- Optimized mod UI, making it a bit faster and consume less RAM +- Added new mode for standard window, making all contents appear in separate window instead of background one. To use it in a new mode, use UI.StandardWindow instead of misspelled UI.StandartWindow +- Resource and behavior packs are now injected inside each world upon enter +- Animations (static models) are now cleaned up on dimension change +- Animations are now garbage collected after they are destroyed in world +- Added Updatable.addAnimator(updatable_object), which adds updatable, that ticks on client thread and never saves + +## 2.0.4b39 + +- Minor fixes for previous version + +## 2.0.4b38 + +- Added TagRegistry module. Docs will be available after some tests and maybe rework. +- Added particle type properties framesX and framesY, which define frame grid size. +- Added particle type property rebuildDelay, which defines time in ticks between particle mesh updates +- Added particle type properties color2 and animators.color, which allow animation of particle color +- Fixed slabs drop +- Fixed some textures in ui + +## 2.0.4b37 + +- Custom dimension generator got heavy optimizations by decreasing noise level of detail. However, custom level of detail now can be set to individual noise generators. +- ItemModel got new methods, that can set custom bitmap as icon in mod ui +- Added DimensionLoaded(currentId, lastId) and DimensionUnloaded(unloadedId) callbacks + +## 2.0.4b36 + +More minor fixes + +## 2.0.4b34-35 + +- Inner Core preferences menu was majorly improved and new settings were added +- Fixed critical error, that could cause server thread to stop +- Fixed OutOfMemory crashes, that could occur during startup +- Alot of minor fixes from GP statistics +- After installing mod you can now install all its dependencies +- Saving system improved: overall stability increased, saves backup is created and all saves errors, if occured, are now displayed in one window instead of one window per error +- Main menu is slightly redesigned +- Added function Entity.getAllInsideBox(coords1, coords2\[, type, flag\]) +- Added function Entity.getDimension(entity) +- Added function Item.setAllowedInOffhand(id, allowed) +- Added function Game.simulateBackPressed() +- PathNavigation is majorly fixed and improved +- Fixed Entity.setCarriedItem/setOffhandItem/setArmor were not sending data to client on non-player entities +- Fixed some crashes, that could occur while transferring between dimensions +- Fixed rotation of animations +- Fixed error, that caused mod behavior packs to be ignored on first launch +- Fixed duplication mod behavior packs in world folder +- Fixed Entity.spawn was working incorrectly with addon entities +- Fixed Translation module doing English to English translations +- Increased item name caching capacity +- Fixed window method setTouchable not working for game overlays +- Other minor stability-related fixes + +## 2.0.3b33 + +- Added support for custom shader uniforms, that can be passed for individual models (more documentation will be released soon) +- Added support for controlled entity navigation via Entity.getPathNavigation(entity) +- Added function Entity.getAttribute(entity, name) to access and modify entity attributes +- Added functions: Player.setAbility(name, value), Player.getFloatAbility(name), Player.getBooleanAbility(name) +- Added uniform vec3 VIEW_POS to shaders on world models (animations) + +## 2.0.3b32 + +- Fixed vanilla particles and mod models with blending drawing behing alpha-tested blocks and clouds + +## 2.0.3b31 + +- Minor fixes, including custom dimensions and block meshes in hand render + +## 2.0.3b30 + +- All changes applied to main version +- Fixed item icons with metadata + +## 2.0.2b29 + +- Better TileEntity system: now unloaded TileEntities, or ones without tick function will not be counted, when checking updatable limit. Added TileEntity functions load(), unload() and onCheckerTick(isInitialized, isLoaded, wasLoaded) +- Fixed crash with mob custom models +- Other minor fixes + +## 2.0.2b28 + +- Added option disable_loading_screen, that disables loading screen and loads mods on main thread +- Fixed World.clip, RenderMesh.clone, Block.setupAsRedstone\[Receiver/Emitter\] +- Fixed some crashes from item models + +## 2.0.2b27 + +- Fixed issue with spending items when tapping on block with UI +- Added functions to World module: clip(x1, y1, z1, x2, y2, z2), doesVanillaTileHasUI(id), setBlockUpdateAllowed(true, false), setBlockUpdateType(type) +- Fixed functions for player experience work +- Fixed meshes after app was minimized + +## 2.0.2b26 + +- Added server thread priority to Inner Core config +- Added Block.registerNeighbourChangeFunction\[ForID\](id, function(coords, block, changeCoords){}) +- Added Block.registerEntityInsideFunction\[ForID\](id, function(coords, block, entity){}) +- Added Block.registerEntityStepOnFunction\[ForID\](id, function(coords, block, entity){}) +- Added RenderMesh methods rotate(x, y, z, rx, ry, rz), fitIn(x1, y1, z1, x2, y2, z2\[, keepRatio\]), clone() +- Fixed colors and mesh position in item models + +## 2.0.2b25 + +- Added block description property - sound, sets one of standard block sound types +- Added RenderMesh method setLightPos(x, y, z) - set relative position for block lighting +- Added RenderMesh method parameter setFoliageTinted(leavesType) +- Fixed ItemModel.occupy() method not preventing setting ICRender models + +## 2.0.2b24 + +- Fixed crash from massive amount of blocks with RenderMesh +- Added methods to RenderMesh - setNoTint(), setGrassTinted(), setFoliageTinted(), setWaterTinted() +- Added preloader scipt methods - Resources.getAllMatchingResources("regex"), Resources.getResourcePath("local path"), Resources.getAllResourceDirectoriesPaths() + +## 2.0.2b23 + +- UI and world item models engine was fully rewritten: + - Mod UI support custom item models (non-meshes for now) + - Item animations now based on RenderMesh and support custom item models and materials + - Generating item models moved to new loading phase + - Item model caching will make their generation much faster after first launch + - ItemModel API module is massively improved and allows access to all model-related stuff + - Additional materials can be passed to handle glint on item models + - Block rendertype parameter is fixed and will affect block item model +- Other improvements: + - Added condition ICRender.RANDOM(value, max\[, seed\]) - for given block position generates random number from 0 to max - 1, and returns, if it is equal to value. Has method setAxisEnabled(0-2, enabled) to ignore some axises. + - Added functions Block.setupAsRedstoneReceiver(nameID, connectToRedstone), Block.setupAsRedstoneEmitter(nameID, connectToRedstone, Block.setupAsNonRedstoneTile(nameID) + - RenderMesh: added method addMesh(mesh\[, x, y, z\[, scaleX, scaleY, scaleZ\]\]), alpha value now can be passed to setColor + - Added block description property - mapcolor, sets 0xRRGGBB map color to block + +## 2.0.2b22 + +- Minor fixes and improvements + +## 2.0.2b21 + +- (Experimental) Global optimization, attempting to increase FPS by using dynamic thread priority +- (Experimental) World generation optimized +- Minor fixes for item models + +## 2.0.2b20 + +This update adds alot and might be unstable. + +- Added ability to create custom materials and shaders (more info will be provided soon) +- Added UI and in-hand item models, to access use ItemModel.getFor(id, data) +- Added new animation mode - direct mesh render with material, to enter this mode call method describe({mesh: RenderMesh, skin: "texture name", material: "material name"}) +- Blocks with ICRender will automatically gain inventory models +- Added custom dimension methods: setFogDistance(close, far), resetFogDistance() +- Other minor fixes + +## 2.0.1b18 + +- Added directories innercore/resource_packs, innercore/behaviour_packs for adding resource and behaviour packs +- Local world resource and behaviour packs are now automatically forced for this world +- Added module AddonEntityRegistry and functions to work with addon-added mobs +- Minor fixes + +## 2.0.1b17 + +- Added GenerationUtils.generateOreCustom(x, y, z, id, data, amount, mode, listOfIds\[, seed\]), also added optional seed parameter to GenerationUtils.generateOre +- Fixed drops from World.destroyBlock +- Fixed Player.setHunger, Player.setSaturation, Player.setExhaustion +- Fixed some block drops + +## 2.0.1b16 + +- Added machine place sound +- Fixed some block drops +- Minor fixes for custom dimensions + +## 2.0.1b15 + +- Attempt to optimize biome map + +## 2.0.1b14 + +- Temporary disabled biome maps + +## 2.0.1b13 + +- Minor fixed and optimizations + +## 2.0.1b12 + +- Added better API for new custom dimensions +- Fixed empty and non ASCII base item name crash (Mods like Divine RPG) + +## 2.0.1b11 + +- Added API for custom biomes +- Added callback GenerateBiomeMap, that uses World.get/setBiomeMap to build chunk biome map before any generation +- Added new parameters to generation callbacks: (chunkX, chunkZ, random, dimensionId, chunkSeed, worldSeed, dimensionSeed) +- Added GenerationUtils.getPerlinNoise(x, y, z, seed, scale, numOctaves) +- Added World.addGenerationCallback(callbackName, callback\[, hashString\]), that uniquely modifies chunk seed before calling callback + +## 2.0.1b10 + +- Added mod loading UI +- Mods are now loading in separate thread +- Fixed UI hangs after fast-clicking on block or item with UI +- Fixed some errors with drops and tools +- Fixed fatal error tip message randomly appearing during world load + +## 2.0.0b9 + +- Completed classic mod UI and workbench UI +- Now mod UI will close when back is pressed or app is minimized +- Fixed possible crashes from render mapping and Item.getName +- Now when all mods are stopped in case of an fatal error it is displayed as tip message +- Applied stability fixes from build 8 + +## 2.0.0b8 + +- Another attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required), after all this attempts best solution from builds 6-8 will be selected +- Fixed new workbench + +## 2.0.0b7 + +- Another attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required) + +## 2.0.0b6 + +- More stability fixes (report any new or more frequent crashes) +- Classic-styled workbench +- Started migrating mod UI to classic style + +## 2.0.0b5 + +- Fixes for system versions lower than Android 9 + +## 2.0.0b4 + +- Some UI fixes, mostly for devices with cutout diff --git a/documentation/static/en/page/apps/innercore/index.md b/docs/page/apps/innercore/index.md similarity index 93% rename from documentation/static/en/page/apps/innercore/index.md rename to docs/page/apps/innercore/index.md index 26d9c78b7..3ec68d9ee 100644 --- a/documentation/static/en/page/apps/innercore/index.md +++ b/docs/page/apps/innercore/index.md @@ -1,4 +1,4 @@ -Inner Core was created on the basis of pure MCBE 1.0.3/1.11.4/1.16.201 and is a full-fledged environment for creating and playing with mods, giving opportunities much greater than CoreEngine & BlockLauncher. +Inner Core was created on the basis of pure Minecraft: Bedrock Edition 1.11.4 and 1.16.201 and is a full-fledged environment for creating and playing with mods, giving opportunities much greater than CoreEngine & BlockLauncher. The native part, written from scratch, made it possible to solve the absolute majority of problems associated with modding based on BlockLauncher and make the API much more efficient. @@ -6,7 +6,7 @@ The native part, written from scratch, made it possible to solve the absolute ma | Library | Author / Official source | Short description | | :--------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [AchievementsAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Mods/AchievementsAPI) | [DDCompany](https://vk.com/club149493963) | Library for creating achievements | +| [AchievementsAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Mods/AchievementsAPI) | [DDCompany](https://vk.com/club149493963) | Library for creating achievements. | | [EnergyLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/EnergyLib) | [Inner Core](https://vk.com/club129680450) | A library for creating and working with various types of energy, wires, generators and consumers. | | [EnergyNet](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/EnergyNet) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | A more advanced version of the previous library, which allows you to transfer energy in packets and set a limit on the transmission of energy to wires. | | [ToolLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/ToolLib) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | A library that provides universal types of tools and adds several auxiliary methods. | @@ -23,7 +23,9 @@ The native part, written from scratch, made it possible to solve the absolute ma | [RecipeTELib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/RecipeTELib) | [WolfTeam](https://vk.com/club80513593) | A library that simplifies the creation of workbenches and furnaces. | | [ShootLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/ShootLib) | [WolfTeam](https://vk.com/club80513593) | A library for creating weapons. | | [SoundAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/SoundAPI) | [WolfTeam](https://vk.com/club80513593) | Library for working with sound. | -| [StructuresAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/StructuresAPI) | [WolfTeam](https://vk.com/club80513593) | A library that simplifies working with structures | +| [StructuresAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/StructuresAPI) | [WolfTeam](https://vk.com/club80513593) | A library that simplifies working with structures. | | [Timer](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/Timer) | [TooManyMods](https://vk.com/club150408457) | A library that simplifies working with tick time. | -| [BowLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/BowLib) | [TooManyMods](https://vk.com/club150408457) | A library that makes it easier to create your own bow | -| [VanillaRecipe](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/VanillaRecipe) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | A library that simplifies the implementation of crafting recipes in Minecraft in JSON format | +| [BowLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/BowLib) | [TooManyMods](https://vk.com/club150408457) | A library that makes it easier to create your own bow. | +| [VanillaRecipe](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/VanillaRecipe) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | A library that simplifies the implementation of crafting recipes in Minecraft in JSON format. | + +> Most of them are deprecated, please be sure in that before usage. diff --git a/docs/page/guides/getting-started/config.md b/docs/page/guides/getting-started/config.md new file mode 100644 index 000000000..00223b07d --- /dev/null +++ b/docs/page/guides/getting-started/config.md @@ -0,0 +1,67 @@ +Mod on Inner Core is a directory with build.config file, also can be several additional files, such as description file and default configuration file. Last one will be created automatically. + +## config.json + +To make the behavior of your mod dependent on some user-defined settings, use mod configuration file. Configuration file is a JSON file stored in the mod's root directory and called _config.json_. To access this configuration file from your code, use [[__config__]] global variable. + +The only option that should always be present in your mod is _enabled_. If it is not in the mod configuration file, it will be added automatically. + +An example of mod configuration file: + +```json +{ + "enabled": true, + "topLevelSetting": 12, + "someSettingsGroup": { + "key1": "value1", + "key2": true + } +} +``` + +As you can see, some of the settings may be nested, so that you can group them accordingly. It is generally not recommended to use more then two layers of nested settings, since when displaying in mods manager they are flattened to a two-layer structure. + +## config.info.json + +All the settings of the mod can be changed from Inner Core's Mods Manager module. By default, Mods Manager uses text inputs for numbers and strings and switches for boolean values. It also generates readable setting names from property names, e.g. `some_sample_setting` gets transformed into __"Some sample setting"__. Thus, in most cases, the settings are visualized correctly. However, you might want to change the controls' look, localize settings names or supply descriptions. To customize the way your settings are displayed, you can place a JSON file called _config.info.json_ in the mod's root directory. A simple example of such a file is given below: + +```json +{ + "description": "This is a global config description", + "properties": { + "topLevelSetting": { + "name": "Some setting", + "type": "SeekBar", + "min": 10, + "max": 120 + }, + "someSettingsGroup": { + "name": "I will appear when mod enabled", + "collapsible": false, + "displayIf": "enabled" + }, + "someSettingsGroup.key1": { + "name": { + "en": "Some setting", + "ru": "Некая настройка" + }, + "description": { + "en": "Some setting allows to do something cool", + "ru": "Некая настройка для создания нечто классного" + } + } + } +} +``` + +- __description__ option allows to specify the description of the whole config file that will be displayed at the top of config view +- __properties__ option is an object containing option names (dot-separated for nested settings) as keys and their properties objects as values. All available properties of options are listed below: + - _name_ specifies the actual name of the setting. Can be either a string or an object containing language codes as keys and localized strings as values. In the second case, English (_"en"_) localization is required + - _description_ specifies the description that will be displayed above the setting. Can be either string or an object like in the _name_ property + - _collapsible_ can be applied only to settings group. If false, the group is expanded by default and cannot be collapsed. Defaults to true + - _display_ allows to hide settings by specifying as false. Defaults to true + - _displayIf_ allows to display settings only if some boolean setting is either true or false. Use `"displayIf": "propertyName"` to display the setting if the appropriate property is true and `"displayIf": "!propertyName"` to display the setting if the appropriate property is false + - _index_ is used to specify the order of settings in the config view. The settings with specified indexes go first, then the settings with no indexes in the order they appear in the _config.json_ file. Note that the indexes work only on the single layer of nested settings, so that you can rearrange settings inside the group + - _type_ allows for some additional setting appearance modification. The only currently supported explicit setting type is a _"SeekBar"_. It creates a slider for numeric values rather then just a text input + - _min_ specifies the minimum value for the _SeekBar_ settings + - _max_ specifies the maximum value for the _SeekBar_ settings diff --git a/docs/page/guides/getting-started/setup-toolchain.md b/docs/page/guides/getting-started/setup-toolchain.md new file mode 100644 index 000000000..d3075e2af --- /dev/null +++ b/docs/page/guides/getting-started/setup-toolchain.md @@ -0,0 +1 @@ +[Inner Core Mod Toolchain](https://raw.githubusercontent.com/zheka2304/innercore-mod-toolchain/master/README.md ':include') diff --git a/docs/page/guides/getting-started/toolchain-configuration.md b/docs/page/guides/getting-started/toolchain-configuration.md new file mode 100644 index 000000000..0fa161cdd --- /dev/null +++ b/docs/page/guides/getting-started/toolchain-configuration.md @@ -0,0 +1 @@ +[Inner Core Mod Toolchain — Configuration](https://raw.githubusercontent.com/zheka2304/innercore-mod-toolchain/master/CONFIG.md ':include') diff --git a/documentation/static/en/page/guides/minecraft/attributes.md b/docs/page/guides/minecraft/attributes.md similarity index 100% rename from documentation/static/en/page/guides/minecraft/attributes.md rename to docs/page/guides/minecraft/attributes.md diff --git a/docs/page/guides/minecraft/playercontainers.md b/docs/page/guides/minecraft/playercontainers.md new file mode 100644 index 000000000..31f94b49d --- /dev/null +++ b/docs/page/guides/minecraft/playercontainers.md @@ -0,0 +1,126 @@ +Containers allows to store items in interface containers, such as player screens (e.g. workbench, inventory, etc.). + +- ContainerCategory — maybe type of container +- ContainerEnumName — maybe unique id of container or id of name + +## Known containers in inventory + +### armor_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 6 + +### combined_hotbar_and_inventory_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 12 + +### hotbar_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 27 + +### inventory_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 28 + +### offhand_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 33 + +### crafting_input_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 2 \ + ContainerEnumName = 13 + +### cursor_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 2 \ + ContainerEnumName = 58 + +### crafting_output_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 14 + +### recipe_construction + +Stores items in Construction tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 15 + +### recipe_nature + +Stores items in Nature tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 16 + +### recipe_items + +Stores items in Items tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 17 + +### recipe_search + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 18 + +### recipe_equimpent + +Stores items in Equimpent tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 20 + +### creative_output_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 59 diff --git a/documentation/static/en/page/guides/mod-api/callbacks.md b/docs/page/guides/mod-api/callbacks.md similarity index 100% rename from documentation/static/en/page/guides/mod-api/callbacks.md rename to docs/page/guides/mod-api/callbacks.md diff --git a/documentation/static/en/page/guides/mod-resources/materials.md b/docs/page/guides/mod-resources/materials.md similarity index 96% rename from documentation/static/en/page/guides/mod-resources/materials.md rename to docs/page/guides/mod-resources/materials.md index 3f6c43c77..951d9ccff 100644 --- a/documentation/static/en/page/guides/mod-resources/materials.md +++ b/docs/page/guides/mod-resources/materials.md @@ -53,6 +53,6 @@ You can inherit an existing material using _material_name:material_parent_ synta You can add custom shaders to your mod by locating them in the _custom-shaders_ directory or in child directories. -Custom shaders for Minecraft: Bedrock Edition use GLSL language. You can find some of the examples of shaders in Minecraft's vanilla resource pack. We recommend using _entity.vertex_ / _entity.fragment_ as a scratch. +Custom shaders for Minecraft: Bedrock Edition use GLSL language. You can find some of the examples of shaders in Minecraft's vanilla resource pack. We recommend using _entity.vertex_/_entity.fragment_ as a scratch. If you locate your shader in one of the subdirectories, you should use relative path in your material declaration. diff --git a/documentation/static/en/page/guides/player/abilities.md b/docs/page/guides/player/abilities.md similarity index 95% rename from documentation/static/en/page/guides/player/abilities.md rename to docs/page/guides/player/abilities.md index 74af9ef7a..cb61c20c2 100644 --- a/documentation/static/en/page/guides/player/abilities.md +++ b/docs/page/guides/player/abilities.md @@ -1,11 +1,11 @@ -Abilities is a mechanism that allows to set some flags (allow/disallow actions) or values (fly speed, walk speed) for the player. InnerCore provides an interface to the underlying Abilities implementation. Not all of the abilities are well tested, some may not work at all. +Abilities is a mechanism that allows to set some flags (allow/disallow actions) or values (fly speed, walk speed) for the player. Inner Core provides an interface to the underlying Abilities implementation. Not all of the abilities are well tested, some may not work at all. Abilities may be of two types: _boolean_ and _float_. The appropriate setter is invoked automatically when you call [[Player.setAbility]] function. To keep types consistent, two functions, [[Player.getFloatAbility]] and [[Player.getBooleanAbility]] are used to retrieve value in the required form. -You can find the list of all the abilities with their default values available in Minecraft 1.11.4 below. If you find out more information about some of the abilities, feel free to contribute (See {@page Contributing}). - ## Abilities List +You can find the list of all the abilities with their default values available in Minecraft 1.11.4 below. If you find out more information about some of the abilities, feel free to contribute (See {@page Contributing}). + ### ATTACK_MOBS Whether the player can attack mobs diff --git a/documentation/static/en/page/guides/world/biomes.md b/docs/page/guides/world/biomes.md similarity index 100% rename from documentation/static/en/page/guides/world/biomes.md rename to docs/page/guides/world/biomes.md diff --git a/documentation/static/en/page/guides/world/dimensions.md b/docs/page/guides/world/dimensions.md similarity index 97% rename from documentation/static/en/page/guides/world/dimensions.md rename to docs/page/guides/world/dimensions.md index c70ecdadc..09cfe6af8 100644 --- a/documentation/static/en/page/guides/world/dimensions.md +++ b/docs/page/guides/world/dimensions.md @@ -100,8 +100,6 @@ octaves: { `yConversion` is a function that transforms the landscape in the Y direction. Basically, it is the density of landscape at the specified Y position. It is specified as a set of points (x, y), and the values between these points get interpolated. X values generally should be between 0 and 1, and y values between -0.5 and 0.5. -To better understand how this function works, let's take a couple of examples (you can use [Inner Core Dimension Editor](https://editor.p5js.org/zheka2304/present/kJmbShOU2) to visualize results quickly). - ```js yConversion: [ [0, 0.5], diff --git a/documentation/static/en/page/lib/BackpackAPI.md b/docs/page/lib/BackpackAPI.md similarity index 67% rename from documentation/static/en/page/lib/BackpackAPI.md rename to docs/page/lib/BackpackAPI.md index be65f7fc4..c5d2dce04 100644 --- a/documentation/static/en/page/lib/BackpackAPI.md +++ b/docs/page/lib/BackpackAPI.md @@ -1,6 +1,4 @@ -## Description - -**BackpackAPI** - a library that allows you to create backpacks. +**BackpackAPI** — a library that allows you to create backpacks. ## Downloads @@ -10,7 +8,7 @@ | [v9](https://github.com/DDCompany/ICLibraries/releases/tag/backpack-api-v9) | | 16.10.20 | | [v8](https://github.com/DDCompany/ICLibraries/releases/tag/backpack-api-v9) | | 15.05.20 | | [v7](https://github.com/DDCompany/ICLibraries/releases/tag/backpack-api-v9) | | 24.04.20 | -| [v6](https://yadi.sk/d/J94TU-NAg0DfaQ) | Added suppurt for store id of container inside extra data of item | 21.04.20 | +| [v6](https://yadi.sk/d/J94TU-NAg0DfaQ) | Added support for store id of container inside extra data of item | 21.04.20 | | [v5](https://yadi.sk/d/3UwUF1QpD7-T5g) | Fixed bugs, code optimization | 16.10.19 | | [v4](https://yadi.sk/d/fGqQqOp9UmF_qQ) | Fixed bugs | 11.09.19 | | [v3](https://yadi.sk/d/zNFKHFwWtygALw) | New properties - items, title | 10.09.19 | @@ -18,9 +16,9 @@ ## Terms of Use -- You are not allowed to distribute this library on any other sites without a link to the official community -- You are not allowed to change the code of the library -- You are not allowed to copy the code in other libraries or mods +- You are not allowed to distribute this library on any other sites without a link to the official community +- You are not allowed to change the code of the library +- You are not allowed to copy the code in other libraries or mods By using this library, you automatically agree to these rules @@ -32,27 +30,33 @@ For registering backpack use method *register* from **BackpackRegistry**, import IMPORT("BackpackAPI"); IDRegistry.genItemID("backpackTest"); -Item.createItem("backpackTest", "Test Backpack", {name: "backpackMiners", meta: 0}, {stack: 1}); +Item.createItem("backpackTest", "Test Backpack", { + name: "backpackMiners", meta: 0 +}, { stack: 1 }); -BackpackRegistry.register(ItemID.backpackTest, { title: "My Backpack", slots: 80, slotsCenter: true, inRow: 10,   items: [ "^ore.+",   "^ingot.+",   1   {id: 345, data: "^[1-3]$"}   ] }); +BackpackRegistry.register(ItemID.backpackTest, { + title: "My Backpack", + slots: 80, + slotsCenter: true, + inRow: 10, + items: ["^ore.+", "^ingot.+", 1, { + id: 345, data: "^[1-3]$" + }] +}); ``` First argument - item **id**, when clicked will open the backpack interface for item with this **id** -- **title** - title of the backpack window -- **slots** - number of slots in the backpack -- **inRow** - number of slots in a row -- **slotsCenter** - center the slots in the width -- **kind** - defines the way to store the unique backpack id. Can have values `BackpackKind.EXTRA` and `BackpackKind.META`. If the first value is set, the id will be stored in the `__backpack_id` extra, the second - in the item metadata -- **items** - array of items that can be placed in the backpack. The regular expressions are described, the item id or object with id and data (both can be specified by regular expression) +- **title** — title of the backpack window +- **slots** — number of slots in the backpack +- **inRow** — number of slots in a row +- **slotsCenter** — center the slots in the width +- **kind** — defines the way to store the unique backpack id. Can have values `BackpackKind.EXTRA` and `BackpackKind.META`. If the first value is set, the id will be stored in the `__backpack_id` extra, the second - in the item metadata +- **items** — array of items that can be placed in the backpack. The regular expressions are described, the item id or object with id and data (both can be specified by regular expression) -In object you can call method `isValidItem` - -```js -isValidItem(id, data, count); -``` +In object you can call method `isValidItem(id, data, count);` -If returned true, the item will be placed in the slot. If it is not, the standard will be set, which allows to move all items described in `items` array, except other backpacks. In this example, you can place only stone: +If it returned true, the item will be placed in the slot. If it is not, the standard will be set, which allows to move all items described in `items` array, except other backpacks. In this example, you can place only stone: ```js BackpackRegistry.register(ItemID.backpackTest, { @@ -63,7 +67,7 @@ BackpackRegistry.register(ItemID.backpackTest, { }); ``` -For backapcks yoc can set custom interfaces, but in this case all fields described above will be ignored. +For backpacks you can set custom interfaces, but in this case all fields described above will be ignored. ```js let gui = new UI.StandartWindow({ @@ -85,7 +89,9 @@ let gui = new UI.StandartWindow({ }); IDRegistry.genItemID('backpackTest'); -Item.createItem('backpackTest', 'Test Backpack', { name: 'backpackMiners', meta: 0 }, { stack: 1 }); +Item.createItem('backpackTest', 'Test Backpack', { + name: 'backpackMiners', meta: 0 +}, { stack: 1 }); BackpackRegistry.register(ItemID.backpackTest, { gui: gui, diff --git a/docs/page/mod/IndustrialCraft2.md b/docs/page/mod/IndustrialCraft2.md new file mode 100644 index 000000000..f50906d92 --- /dev/null +++ b/docs/page/mod/IndustrialCraft2.md @@ -0,0 +1 @@ +[IndustrialCraft](https://raw.githubusercontent.com/MineExplorer/IndustrialCraft_2/master/README.md ':include') diff --git a/documentation/static/en/page/other/contributing.md b/docs/page/other/contributing.md similarity index 67% rename from documentation/static/en/page/other/contributing.md rename to docs/page/other/contributing.md index 97d4301c7..e36e255d6 100644 --- a/documentation/static/en/page/other/contributing.md +++ b/docs/page/other/contributing.md @@ -1,11 +1,10 @@ +If you wish to help us improve articles and documentation, fork the documentation's [GitHub repository](https://github.com/mineprogramming/innercore-docs). +All the required information about how to build the documentation can be found in repository's README.md file. + ## Minor Fixes + If you found any minor mistake, you can notify me via: + + E-mail: Ih01@i.ua + VK: [@igormelikhov](https://vk.com/igormelikhov) + Telegram: [@ichzerowan](https://t.me/ichzerowan) - -## Contribution - -If you wish to help us improve articles and documentation, fork the -documentation's [GitHub repository](https://github.com/mineprogramming/innercore-docs). -All the required information about how to build the documentation can be found in repository's README.md file. \ No newline at end of file diff --git a/docs/page/other/create-page.md b/docs/page/other/create-page.md new file mode 100644 index 000000000..17c78df8f --- /dev/null +++ b/docs/page/other/create-page.md @@ -0,0 +1,83 @@ +Before we start writing your mod page, we need to learn about Markdown format. +You can goto [this article](https://www.markdownguide.org/getting-started/) to learn what is Markdown. +And [this article](https://www.markdownguide.org/basic-syntax/) to learn basic markdown syntax. + +After learning about Markdown format, you can start writing your pages. + +## Where we are + +Before do anything determine what page will be created and which language(s) must included. + +Every page at documentation described in markdown at *documentation/static/\* folder. + +```txt + +├─ README.md (index of current language, or nothing) +├─ page (most interesting thing, markdown content) +│ ├─ apps (layout, e.g. Horizon and Inner Core) +│ ├─ guides (here placed everything about our game, e.g. attributes) +│ ├─ lib (your (as developer) libraries) +│ ├─ mod (your (as developer) template mods) +│ └─ other (such as contributing guides, exclusive to maintainers) +└─ config (routing for your pages, docsify configuration) + ├─ _sidebar.md (sidebar to left of content, navigation) + └─ _navbar.md (e.g. switching between languages) +``` + +> Required folder that will be used to documentation doesn't appears here? Contact with maintainers to submit new location. + +## Writing new content + +Just create new markdown at *documentation/static/\/page/\/\.md* and here we set. + +```md +Library — is the most common part of modding, it usage is very simple and sweet. + +## IMPORT + +How to `IMPORT` actually does work? +Dependencies will be resolved, repository with them automatically appears in your code. +Include .d.ts into your *declarations/* and everything is set! +``` + +Additionally or otherwise, you can simply include existing external guide. It may be more handly than updating your guide every time. + +```md +[REPOSITORY](https://raw.githubusercontent.com/AUTHOR/REPOSITORY/master/README.md ':include') +``` + +Some attentions before anything will be pull-requested: + +1. Corresponding markdown must be categorized by [description above](#where-we-are). +2. Do not use directly route to external content, links must be appeared only on page. +3. Mod template / library page may exists only once, few occupants is not allowed. +4. Use `:include` in markdown only when you need include relative content or describe your mod template / library. Guides must be remain in this repository, to just build and use locally as documentation. + +## Creating routes for your pages + +Configuration will be performed with corresponding *documentation/static/\/config/_sidebar.md* markdown. Do not change existing pathes, it already used as url location and can be accessed from another site. + +You can just use already created template below, or copy-paste existing markdown entry. + +### Inner Core or Minecraft Guide + +```md + Category + - [Guide 1](/en/page/guides/category/guide.md) + - [Advanced Guide 2](/en/page/guides/category/complex-guide.md) + +- [Category Page](/en/page/guides/new-category/index.md) + - [Another Guide](/en/page/guides/new-category/another-guide.md) +``` + +### Library page + +```md + - [BackpackAPI](/en/page/lib/BackpackAPI.md) +``` + +### Mod template + +```md + - [IndustrialCraft](/en/page/mod/IndustrialCraft2.md) +``` diff --git a/docs/ru/README.md b/docs/ru/README.md new file mode 100644 index 000000000..8d9e70480 --- /dev/null +++ b/docs/ru/README.md @@ -0,0 +1,19 @@ +# Предварительные требования + +- Visual Studio Code +- node.js & npm +- пакет grunt-cli, установленный глобально с помощью npm + +Для установки grunt-cli, запустите следующую команду в вашем терминале: + +```bat +npm install -g grunt-cli +``` + +## Сборка документации и деклараций + +Репозиторий с документацией расположен на [GitHub](https://github.com/mineprogramming/innercore-docs). + +Для сборки этого репозитория локально, откройте эту папку в Visual Studio Code и запустите (_Ctrl+Shift+B_) **Initialize Environment** таск. Это установит все необходимые библиотеки локально. Для сборки сайта с документацией typedoc и деклараций, запустите **Run Typedoc** таск. Используйте менеджер пакетов npm для остальных операций, таких как `npm run build-serve` или `npm run serve-out` и `npm run serve-docs`. + +[Перейти в документацию](/) diff --git a/docs/ru/config/_404.md b/docs/ru/config/_404.md new file mode 100644 index 000000000..2864441b7 --- /dev/null +++ b/docs/ru/config/_404.md @@ -0,0 +1,24 @@ +# Упс... Здесь ничего нет! + +## [Погружаемся обратно в документацию...](https://docs.mineprogramming.org/#/ru/) + + diff --git a/documentation/static/ru/config/_navbar.md b/docs/ru/config/_navbar.md similarity index 100% rename from documentation/static/ru/config/_navbar.md rename to docs/ru/config/_navbar.md diff --git a/docs/ru/config/_sidebar.md b/docs/ru/config/_sidebar.md new file mode 100644 index 000000000..1ebc94633 --- /dev/null +++ b/docs/ru/config/_sidebar.md @@ -0,0 +1,41 @@ +- [Horizon](/ru/page/apps/horizon/index.md) + - [Паки](/ru/page/apps/horizon/pack-system.md) + - [Что включено в пак](/ru/page/apps/horizon/packs.md) + +- [Inner Core](/ru/page/apps/innercore/index.md) + - [Core Engine API](/api/modules.html ':ignore :target=_self') + - [Список изменений](/ru/page/apps/innercore/changelog.md) + + Начало пути + - [Inner Core Mod Toolchain](/ru/page/guides/getting-started/setup-toolchain.md) + - [Настройка вашего тулчейна](/ru/page/guides/getting-started/toolchain-configuration.md) + - [Конфигурация мода](/ru/page/guides/getting-started/config.md) + + Возможности модов + - [События](/ru/page/guides/mod-api/callbacks.md) + + Предметы + - [Зачарования](/ru/page/guides/items/enchantements) + + Блоки + - [Жидкости](/ru/page/guides/blocks/liquids) + + Майнкрафт + - [Атрибуты](/ru/page/guides/minecraft/attributes.md) + - [Игровые контейнеры](/ru/page/guides/minecraft/playercontainers.md) + + Ресурсы мода + - [Материалы](/ru/page/guides/mod-resources/materials.md) + + Игрок + - [Способности](/ru/page/guides/player/abilities.md) + + Взаимодействие с миром + - [Биомы](/ru/page/guides/world/biomes.md) + - [Измерения](/ru/page/guides/world/dimensions.md) + +- [Внесение вклада](/ru/page/other/contributing.md) + - [Создание новых страниц](/ru/page/other/create-page.md) + +- Библиотеки + - [Dungeon Utility](/ru/page/lib/DungeonUtility.md) diff --git a/docs/ru/page/apps/horizon/index.md b/docs/ru/page/apps/horizon/index.md new file mode 100644 index 000000000..bfb60a53a --- /dev/null +++ b/docs/ru/page/apps/horizon/index.md @@ -0,0 +1,30 @@ +## Что такое Horizon Modding Kernel (HMK)? + +Хорайзон это универсальная платформа для запуска мобильных игр с модами. На текущий момент он реализует лишь Inner Core, содержащий в себе Майнкрафт 1.11.4 и 1.16.201. Хорайзон позволяет вам создавать и хранить несколько независимых пакетов Inner Core, благодаря чему вы можете разделить различные модпаки и миры друг от друга. Разработка осуществляется на JavaScript, Java, C++ и не только. + +## Структура HMK пака + +1. Игра на которой основан лаунчер +2. Лаунчер на основе того во что пользователь будет играть +3. Браузер с модами которые пользователь применит к игре + +## Нативные моды + +Моды, написанные на C++ и применяющиеся к игре напрямую. +Они имеют полный контроль над игрой и могут использовать все ее функции. + +## Полезные ссылки + +[Horizon Modding Kernel](https://play.google.com/store/apps/details?id=com.zheka.horizon) + +[Группа во ВКонтакте](https://vk.com/core_engine) + +[Inner Core Mod Toolchain — разработка и сборка модификаций](https://github.com/zheka2304/innercore-mod-toolchain) + +[Установка Inner Core Mod Toolchain на YouTube](https://www.youtube.com/watch?v=ofwKkRYh97k) + +[Средства для разработки модов](https://icmods.mineprogramming.org/dev) + +[Обсуждение во ВКонтакте для отправки сообщений о проблемах](https://vk.com/topic-134044100_41523503) + +[Документация по разработке модов](https://docs.mineprogramming.org) diff --git a/docs/ru/page/apps/horizon/pack-system.md b/docs/ru/page/apps/horizon/pack-system.md new file mode 100644 index 000000000..a88537e87 --- /dev/null +++ b/docs/ru/page/apps/horizon/pack-system.md @@ -0,0 +1,37 @@ +Паки это полностью независимые друг от друга установки игры с модами (с раздельными сохранениями и модами). Моды могут быть установлены вручную или используя встроенный менеджер модов. + +Все установленные паки появляются на основном экране, для выбора и открытия пака просто нажмите на него. После того как пак был выбран, он будет автоматически открыт со следующим запуском. Для выхода из пака обратно в меню выборки, используйте назад на панели навигации. + +## Как установить / удалить пак? + +Для установки пака, нажмите на большую кнопку **+** и выберите пак в котором вы заинтересованы. + +Для удаления уже загруженного / не установленного пака, вам нужно удерживать пак до появления контекстного меню, которое содержит следующий контент ниже. + +## Клонирование паков + +Клонирование паков позволяет вам создать полную копию со всеми модами и сохранениями, которая будет полностью независима от оригинального пака. Для клонирования пака удерживайте его и нажмите клонировать. + +## Удаление паков + +Если вы хотите освободить место, используемое неким паком, просто удерживайте его и нажмите удалить, однако учтите, что это удалит и все его сохранения. Паки не будут удалены если приложение было удалено в том случае если они установлены как внешние. + +## Контекстное меню пака + +- Добавить в закладки — отмечает пак как закладку, он будет показан над всеми остальными +- Клонировать — создает полный дубликат со всеми мирами и модами +- Переустановить — полностью переустанавливает пакет из кеша, очищается по умолчанию +- Показать подробности — открывает диалоговое окно с подробной информации о пакете, таких как: + - Заголовок — полное имя пака + - Его описание + - Игра — для которой он был создан + - Версия — текущая и последнего доступного обновления + - Статус — статус установки пака + - INSTALLED — пак уже установлен + - PENDING — ожидается загрузка и установка + - CORRUPT — что-то произошло во время установки, если это не так, удалите файл *.installation_started* из папки вашего пака вручную + - NOT_INSTALLED — не загружен или установлен + - Абсолютный путь — до пака в */sdcard/games/horizon/packs* или */sdcard/Android/data/com.zheka.horizon/files/horizon/packs* + - Внешний идентификатор — UUID пака + - Список изменений — открывает весь список изменений этого пака +- Удалить — навсегда удаляет все данные пака, включая миры, пакеты ресурсов, моды и т.п. diff --git a/docs/ru/page/apps/horizon/packs.md b/docs/ru/page/apps/horizon/packs.md new file mode 100644 index 000000000..39c5e6d89 --- /dev/null +++ b/docs/ru/page/apps/horizon/packs.md @@ -0,0 +1,29 @@ +В основном меню пака Inner Core находится 5 кнопок: + +1. **Играть** — кнопка для начала игры +2. **Нативные моды** — кнопка в правой части экрана для открытия меню с ними +3. **Браузер модов** — встроенный браузер модов + 1. Загрузить моды — вкладка где вы можете загрузить любые моды для игры + 2. Мои моды — вкладка где вы можете управлять установленными модами + 3. Модпаки — готовые сборки модов, созданные разработчиками + 4. Обновления — список модов, для которых есть доступные обновления + 5. Посетить сайт — открывает проработанный для игры сайт с модами +4. **Настройки и ссылки** + 1. Настройки пака + 1. **Отключить экран загрузки** — отображение экрана загрузки модов, когда включено, на некоторых устройствах это ускорит запуск. + 2. **Режим разработчика** — удобство для создателей модов, включает режим отладки в поддерживаемых модах. + 3. **Лимит обновлений исходя из версии** — количество обновлений модов за тик будет ограничено временем выполнения, в противном случае количеством обновленных объектов. Просто устанавливает, сколько раз моды могут обратиться к тику. + 4. **Максимальное количество обновлений за тик** — установка _лимита времени_. + 5. **Продвинутые настройки приоритета потоков** — больший приоритет серверного потока стабилизирует количество тиков в секунду или TPS (это означает более стабильную работу и отклик), однако, это может стать причиной фризов и падением количества кадров или FPS. + 6. **Приоритет серверного потока** — установка _раскрытого списка приоритета потоков_. + 7. **Предел кадров в секунду** — как только количество кадров или FPS будет ниже этого предела, приоритет потока сервера будет понижен, в противном случае будет установлен более высокий приоритет. + 8. **Количество дополнительных потоков** — дополнительные потоки это экспериментальная настройка. На мощных устройствах это может улучшить производительность при больших нагрузках. + 9. **Приоритет дополнительных потоков** — установка _количества дополнительных потоков_. + 10. **Автосохранение** — позволяет вам сохранять данные мира и модов в игре на случай если она внезапно будет прервана. + 11. **Время между сохранениями** — время в секундах между запусками автосохранений. + 12. **Включить сокет-сервер** — позволяет игрокам в вашей сети подключаться к вашему миру с помощью сокетов. + 13. **Использовать нативный протокол** — подключаться с помощью нативного протокола (по умолчанию, подключения через _сокеты_ имеют больший приоритет). + 14. **Обязательно использовать нативный протокол** - _**для разработчиков!**_ — использовать нативный протокол для взаимодействия клиента и сервера. Эта настройка актуальна лишь для разработки модов и движка, **не используйте ее в публичных релизах!** + 2. Документация и ссылки — вкладка с ссылками и документацией + 3. Благодарности — вкладка с участниками проекта, т.е. разработчиками, тестерами и создателями модов + 4. О приложении diff --git a/docs/ru/page/apps/innercore/changelog.md b/docs/ru/page/apps/innercore/changelog.md new file mode 100644 index 000000000..652d0e85f --- /dev/null +++ b/docs/ru/page/apps/innercore/changelog.md @@ -0,0 +1,611 @@ +## 2.2.1b105 + +- Added experimental API for creating custom enchants: +- Minor optimization for C++ to Java calls +- Minor fixes for icons in UI + +## 2.2.1b104 + +- Fixed last item in hend was not spending +- Fixed animated liquid textures +- Fixed endless custom buckets in survival +- Now changing items in ItemUse callback are handled correctly when not prevented +- Added Block.registerClickFunction\[ForID\](nameId/id, (coords, item, block, player) => void) +- Fixed position, passed dispense callback, added slot parameter (4th argument) + +## 2.2.1b103 + +- When creating liquids you can now automatically create buckets with full functionality (see docs) +- Added isRenewable parameter for custom liquids +- Fixed bucket interaction with custom liquids + +## 2.2.1b102 + +- Added methods for creating liquid blocks, docs: +- Fixed some mod manager issues and crashes, added ability to search mod by its id +- Added Entity.hasEffect(entity, effectId) and Entity.getEffect(entity, effectId) +- Added BlockSource.setDestroyParticlesEnabled(boolean) method +- Fixed Item.invokeItemUseOn not using given entity block source +- Fixed vanilla swords tool data +- Fixed destroying attachables was causing crash +- Fixed creating block states by block id +- Fixed BlockState.addStates was not accepting JS object +- Other minor fixes + +## 2.2.1b101 + +- Fixed some fence blocks were not displayed correctly in world + +## 2.2.1b100 + +- Added Block.getMaterial(blockId) +- Added PlayerActor methods: getItemUseDuration(), getItemUseIntervalProgress(), getItemUseStartupProgress() +- Fixed multiplayer mod list was built with incorrect mod info +- Fixed BlockSource.listAllEntitiesInAABB was not returning player, when passed no filter parameters + +## 2.2.1b99 + +- Fixed syncing runtime ids in multiplayer could fail +- Fixed multiplayer mod list check was not working +- Fixed startup crash on old android versions on some devices + +## 2.2.1b98 + +- Fixed Commands.exec +- Fixed Entity.getNameTag + +## 2.2.1b97 + +- Now when connecting to remote world, additional synchronization is done, to assure block runtime ids will match even in case of different mods. + +## 2.2.1b96 + +- Added methods Recipes.getAllWorkbenchRecipes() and Recipes.getAllFurnaceRecipes() +- Added method BlockSource.getBiomeDownfallAt(x, y, z) +- Added slot element properties: iconScale and disablePixelPerfect +- Added methods for UI.Window: updateScrollDimensions() and updateWindowPositionAndSize() +- Added new text alignment type: 3 - ALIGN_CENTER_HORIZONTAL +- Added functon runOnClientThread(function), works as runOnMainThread, but for client ticking thread +- Fixed some item ids compatibility and related recipes - nether start, melon, records, horse armor, fireball, fireworks +- Fixed chestplate model for modded armor + +## 2.2.1b95 + +- Added BlockSource methods setExtraBlock(x, y, z, BlockState/\[id, data\]) and getExtraBlock(x, y, z) -> BlockState to access and modify extra blocks, such as liquids in other blocks +- Added block description parameters "can_contain_liquid" and "can_be_extra_block" +- Added methods Block.canContainLiquid(id) and Block.canBeExtraBlock(id) +- Fixed settings changes were not applied on first launch after change +- Fixed crashes in mod config +- Fixed language settings were not loaded correctly +- Added developer option to output block state info dump + +## 2.2.1b94 + +- Fixed new modpack selecting bug from 2.2.1b93 +- Fixed Item.isValid(id), added IDRegistry.getStringIdAndTypeForIntegerId(id), IDRegistry.getTypeForIntegerId(id), IDRegistry.getStringIdForIntegerId(id) +- Fixed getEnchantName from ItemExtraData + +## 2.2.1b93 + +- Fixed modded food +- Restored basic functionality of PathNavigation +- Added API to override underwater fog parameters and fixed underwater fog in custom dimensions +- Added EntityAddedLocal and EntityRemovedLocal callbacks - client side variants of EntityAdded and EntityRemoved +- Fixed Entity.setOffhandItem +- Added Dimensions.getAllRegisteredCustomBiomes() method, returning map of all custom biomes +- Various possible in-game chashes fixed +- Fixed some mod manager crashes & minor redesign +- Fixed wrong modpack can be loaded, when multiple modpacks are installed +- Improved Chinese support + +## 2.2.1b92 + +- Errors in updatables (for example machines) now will not shutdown all mods until world reload. Instead it will disable only updatable, causing error. +- Crash fixes + +## 2.2.1b90-91 + +- Previous version hotfix + +## 2.2.1b89 + +- Fixed bug when block ids were not synced in multiplayer +- Added vanilla block states API +- Fixed workbench for connected players +- Fixed generation callbacks errors +- Improved saves stability +- Fixed links and guides page +- Fixed excess items were added to creative + +## 2.2.1b88 + +- Added callback EntityPickUpDrop(entity, dropEntity, dropStack, count), it is called, when entity picks up dropped item, right now works only for players +- Updated guides and links page, added links to mod and modpack development guides +- Minor fixes for ItemModel and other crashes and errors + +## 2.2.1b87 + +- Fixed modpack system and mod manager issues +- Fixed missing or invalid workbench recipes and item icons +- Added useful links to preferences and links menu + +## 2.2.1b86 + +- Global engine optimization will increase overall modded performance +- Fixed lags in creative inventory, when items with extra data are present +- Minor optimization for creative search + +## 2.2.1b85 + +- Massive update to mod manager with alot of new features, fixes and improvements +- Added modpack support, including installation, modification and creating your own +- Block models are now loading faster and consume less RAM +- BlockSource.breakBlock/ForJsResult methods now also invoke DestroyBlock callback, if actor is passed as a parameter and exists in BlockSource's dimension (and it was not prevented by BreakBlock callback) + +## 2.2.0b84 + +- Added PreProcessChunk and PostProcessChunk callbacks - universal world generation callbacks. First one called before vanilla structures generation and second one after it. All others callbacks are called after vanilla generation but before PostProcessChunk +- Fixed missing bed and chest recipes +- Fixed using mesh in ActorRenderer +- Fixed rare crashes when entering and leaving the world +- Fixed transparency was not working for far blocks +- Fixed config.json interaction with .redirect +- Added slot element binding selection_forced + +## 2.2.0b83 + +- Rework for block drop system +- Added callback BreakBlock (BlockSource, position, block, isDropAllowed, player, item) - called when block is destroyed, unlike DestroyBlock can be called not only when block is destroyed by player, but also by new BlockSource methods. This callback is used for block drops, player destroy logic must remain in DestroyBlock +- Drop functions now using BreakBlock +- Added blocksource methods BlockSource: breakBlock(x, y, z, isDropAllowed\[, actor\]\[, item\]) - destroys block, calls BreakBlock, breakBlockForJsResult(x, y, z\[, actor\]\[, item\]) - same as breakBlock, but instead of dropping items and exp orbs, returns: {experience:, items: \[{id:, count:, data:, extra:}, ...\]} + +## 2.2.0b82 + +- Added ItemContainer methods setSlotSavingEnabled(name, enabled), setGlobalSlotSavingEnabled(enabled), they are used to control, which slots are saved +- Added parameter to destroy method of tile entity, that indicates, if it was destroyed in DestroyBlock callback +- Optimized inventory editing methods for player +- Fixed editing player abilities, including flying +- Fixed server open listener in ItemContainer was called before open packet is sent +- Fixed some furnace recipes +- Fixed loading bug on older android versions +- Fixed breaking ice + +## 2.2.0b79-81 + +- Added missing and fixed existing workbench recipes +- Fixed constant startup crashes on some devices (new bug since 1.16.201) +- Fixed frequend startup crashes on some devices (old bug since 1.11.4) + +## 2.2.0b78 + +- Continued fixing worldgen + +## 2.2.0b77 + +- Fixed modded world generation was called multiple times per chunk. It will significantly reduce lag. +- Modded world generation now called AFTER vanilla worldgen. +- Another attemt to fix loading mods on some devices +- Added log methods: Logger.debug(tag, message), Logger.info(tag, message), Logger.error(tag, message\[, error\]); + +## 2.2.0b76 + +- Fixed loading mods with resource packs +- Fixed saves errors +- Fixed loading mods on some devices +- Added parameter "category" in Item.createItem + +## 2.2.0b75 + +- Updated for Minecraft 1.16.201 +- Multiplayer might experience some issues with ID sync, if it happens, try swapping host and client +- Added API for armor and attachable renderer +- Major refactor for mod loader +- Major refactor for saves system and some other engine modules +- Started working on ECS and Java API + +## 2.1.0b72 + +- Now, when connecting to host with some blocks or items, missing on client, placeholders will be created to prevent crash +- Native protocol tested on extremely high load, possible lags and crashes fixed + +## 2.1.0b71 + +- Saving previously logged in Xbox account (experimental) +- Minor fixes + +## 2.1.0b70 + +- Added multiplayer FAQ in Xbox login window. +- Increased initialization packet timeout up to 90 seconds. +- Fixes for network entities +- Other minor fixes + +## 2.1.0b69 + +- Nice, we have reached this point +- Fixed items with extra data were sometimes invisible in vanilla UI +- Added getLightLevel(x, y, z) to BlockSource + +## 2.1.0b68 + +- Minor improvements to native protocol (Xbox multiplayer). + +## 2.1.0b65-67 + +- Made Xbox login functional on most devices. + +## 2.1.0b64 + +- Added experimental custom xbox login feature. You can connect to your friends from xbox account with same mods as yours (with multiplayer support). Xbox connection will use only native protocol, that was added in 2.1.0b63. + +## 2.1.0b63 + +- Added ability to use multiplayer with native minecraft protocol. This option can be turned on in engine config. Native protocol might reduce ping, but could be less stable. +- Minor fixes + +## 2.1.0b61-62 + +- Fixes for ItemContainer and BlockSource +- Other fixes + +## 2.1.0b60 + +- Added method exists() to animations +- Minor fixes + +## 2.1.0b59 + +- Added methods BlockRenderer.setCustomRaycastShape(id, data, collisionShape), BlockRenderer.setCustomCollisionAndRaycastShape(id, data, collisionShape) +- Added methods BlockRenderer.mapCollisionModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapRaycastModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapCollisionAndRaycastModelAtCoords(dimensionId, x, y, z, model), for collision and raycast shape mapping, passing null model will unmap it, mapping works on any block including air +- Added BlockSource method getBlock(x, y, z), returning object, that contains both id and data +- Clearing mapped render models (not collision ones) on local player dimension change as well as animations +- Other minor fixes + +## 2.1.0b58 + +- Minor fixes + +## 2.1.0b57 + +- Added method Network.inRemoteWorld() - returns true, if player connected to remote world +- Added callback ItemUseLocal(coords, item, block, player) for client side item use +- Added callback ConnectingToHost(host, minecraftPort, moddedPort) +- Improvements for NetworkConnectedClientList +- Added method BlockSource.getCurrentClientRegion() +- Other minor fixes + +## 2.1.0b56 + +- New item caching system, that caches every complex icon, not only custom models and allows creating of model cache groups +- Call ItemModel.setCurrentCacheGroup("groupName", "version") at the start of your mod to create cache group, it will be applied to all models, created at the root of your mod (including default ones). If specified version does not match cache version, whole group will be re-created. +- Fixed ItemContainer interaction with items with extra data. + +## 2.1.0b55 + +- Fixed compatibility with Recipe Viewer +- Added block special type parameter color_source, can be one of "none", "leaves", "grass", "water" +- Sped up loading of item models and made it less RAM consuming +- Minor improvements + +## 2.1.0b48-54 + +Following updates contain fixes for multiplayer update. + +## 2.1.0b47 + +This update adds experimental LAN multiplayer support, allowing players on same Wi-Fi and same set of mods play together. + +**ALL MODS NEED TO BE UPDATED TO SUPPORT MULTIPLAYER.** Playing with mods without multiplayer support (warning will appear) might cause undefined behaviour or even crash, so do it at your own risk. + +Alot of new API modules, callbacks and functions were introduced in this update, but backwards compatibility remains. There will be a migration guide for mod developers. + +## 2.0.5b46 + +- Fixed 2.0.5b45 bug, which caused icon problems of items with extra data +- Fixed mod manager didnt show redirected mods + +## 2.0.5b45 + +- Added item model method setModelOverrideCallback(function(item) {...}), acts like itemOverrideFunctions, but returns ItemModel instance, instead of icon +- Added method ItemModel.newStandalone(), creates empty ItemModel instance, not linked to any item, this models should be used in setModelOverrideCallback +- Item override function now receives extra data +- Fixed crash, caused by calling toScriptable() method of NBT tags +- D8 dexer, instead of old DX is now used to build dex files from java + +## 2.0.5b44 + +- Mods now can access and modify NBT of entities, tile entities and items. Docs are located at the bottom. +- Added functions: Entity.getCompoundTag(entity), Entity.setCompoundTag(entity, tag) +- Added methods to vanilla TileEntity, returned by World.getContainer(): getCompoundTag(), setCompoundTag(tag) +- Added methods to ItemExtraData: getCompoundTag(), setCompoundTag(tag) +- Mod UI now supports modded animated item icons +- Icon override functions now receives second parameter - isModUi +- Added function Debug.big, acts like Debug.m, but outputs dialog with selectable text and pretty JSON +- TileEntity function click now receives additional parameter - click coords +- Fixed rare addon-related crash + +NBT.CompoundTag (map, string keys): + +- constructor() - creates empty tag +- constructor(NBT.CompoundTag) - creates tag copy +- toScriptable() - returns javascript object, that represents contents +- getAllKeys() - returns java array with all keys +- contains(key) - checks tag contains key +- containsValueOfType(key, type) - checks tag contains key and value is desired type +- getValueType(key) - returns value type by key (type is integer) +- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key) - value getters +- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key, value) - value setters +- remove(key) - deletes value by key +- clear() - deletes all values + +NBT.ListTag (list, non-negative integer indices): + +- constructor() - creates empty list +- constructor(NBT.ListTag) - creates list copy +- toScriptable() - returns javascript object, that represents contents +- length() - returns list length +- getValueType(index) - returns value type by index (type is integer) +- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index) - returns value by index +- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index, value) - set value by index, if index >= length, adds to the end, if index < 0 adds to beginning, else replaces +- clear() - deletes all values + +## 2.0.4b43 + +- Automatically deleting resource and behavior packs from uninstalled mods upon world load +- RenderMesh now can receive not only absolute file path, but also resource path and name of file in models/ dir in resources. +- Deprecated slot element parameters isTransparentBackground and needClean, now slot supports transparent background by default +- Added container method setOnOpenListener(function(container, window) {...}) +- Removed shared objects, built for x86 ABI to reduce overall weight +- Fixed error, that occurred after second WRAP_JAVA call on same class + +## 2.0.4b42 + +- Callback.addCallback now has third optional parameter - priority (integer, default value is 0). Callbacks with higher priority will be called earlier +- UI slots now support animated background (texture name array must be passed instead of single name). For other textures in UI this feature was already present. +- UI slots now has text parameter, also container.setText work on them. If this parameter is not null, it value will be shown instead of count +- World.clip now works on actors, but only on certain mode parameter values. +- Fixed block icon generation for ICRender models. + +## 2.0.4b41 + +- Attemt to fix blurry UI on some devices + +## 2.0.4b40 + +- Optimized mod UI, making it a bit faster and consume less RAM +- Added new mode for standard window, making all contents appear in separate window instead of background one. To use it in a new mode, use UI.StandardWindow instead of misspelled UI.StandartWindow +- Resource and behavior packs are now injected inside each world upon enter +- Animations (static models) are now cleaned up on dimension change +- Animations are now garbage collected after they are destroyed in world +- Added Updatable.addAnimator(updatable_object), which adds updatable, that ticks on client thread and never saves + +## 2.0.4b39 + +- Minor fixes for previous version + +## 2.0.4b38 + +- Added TagRegistry module. Docs will be available after some tests and maybe rework. +- Added particle type properties framesX and framesY, which define frame grid size. +- Added particle type property rebuildDelay, which defines time in ticks between particle mesh updates +- Added particle type properties color2 and animators.color, which allow animation of particle color +- Fixed slabs drop +- Fixed some textures in ui + +## 2.0.4b37 + +- Custom dimension generator got heavy optimizations by decreasing noise level of detail. However, custom level of detail now can be set to individual noise generators. +- ItemModel got new methods, that can set custom bitmap as icon in mod ui +- Added DimensionLoaded(currentId, lastId) and DimensionUnloaded(unloadedId) callbacks + +## 2.0.4b36 + +More minor fixes + +## 2.0.4b34-35 + +- Inner Core preferences menu was majorly improved and new settings were added +- Fixed critical error, that could cause server thread to stop +- Fixed OutOfMemory crashes, that could occur during startup +- Alot of minor fixes from GP statistics +- After installing mod you can now install all its dependencies +- Saving system improved: overall stability increased, saves backup is created and all saves errors, if occured, are now displayed in one window instead of one window per error +- Main menu is slightly redesigned +- Added function Entity.getAllInsideBox(coords1, coords2\[, type, flag\]) +- Added function Entity.getDimension(entity) +- Added function Item.setAllowedInOffhand(id, allowed) +- Added function Game.simulateBackPressed() +- PathNavigation is majorly fixed and improved +- Fixed Entity.setCarriedItem/setOffhandItem/setArmor were not sending data to client on non-player entities +- Fixed some crashes, that could occur while transferring between dimensions +- Fixed rotation of animations +- Fixed error, that caused mod behavior packs to be ignored on first launch +- Fixed duplication mod behavior packs in world folder +- Fixed Entity.spawn was working incorrectly with addon entities +- Fixed Translation module doing English to English translations +- Increased item name caching capacity +- Fixed window method setTouchable not working for game overlays +- Other minor stability-related fixes + +## 2.0.3b33 + +- Added support for custom shader uniforms, that can be passed for individual models (more documentation will be released soon) +- Added support for controlled entity navigation via Entity.getPathNavigation(entity) +- Added function Entity.getAttribute(entity, name) to access and modify entity attributes +- Added functions: Player.setAbility(name, value), Player.getFloatAbility(name), Player.getBooleanAbility(name) +- Added uniform vec3 VIEW_POS to shaders on world models (animations) + +## 2.0.3b32 + +- Fixed vanilla particles and mod models with blending drawing behing alpha-tested blocks and clouds + +## 2.0.3b31 + +- Minor fixes, including custom dimensions and block meshes in hand render + +## 2.0.3b30 + +- All changes applied to main version +- Fixed item icons with metadata + +## 2.0.2b29 + +- Better TileEntity system: now unloaded TileEntities, or ones without tick function will not be counted, when checking updatable limit. Added TileEntity functions load(), unload() and onCheckerTick(isInitialized, isLoaded, wasLoaded) +- Fixed crash with mob custom models +- Other minor fixes + +## 2.0.2b28 + +- Added option disable_loading_screen, that disables loading screen and loads mods on main thread +- Fixed World.clip, RenderMesh.clone, Block.setupAsRedstone\[Receiver/Emitter\] +- Fixed some crashes from item models + +## 2.0.2b27 + +- Fixed issue with spending items when tapping on block with UI +- Added functions to World module: clip(x1, y1, z1, x2, y2, z2), doesVanillaTileHasUI(id), setBlockUpdateAllowed(true, false), setBlockUpdateType(type) +- Fixed functions for player experience work +- Fixed meshes after app was minimized + +## 2.0.2b26 + +- Added server thread priority to Inner Core config +- Added Block.registerNeighbourChangeFunction\[ForID\](id, function(coords, block, changeCoords){}) +- Added Block.registerEntityInsideFunction\[ForID\](id, function(coords, block, entity){}) +- Added Block.registerEntityStepOnFunction\[ForID\](id, function(coords, block, entity){}) +- Added RenderMesh methods rotate(x, y, z, rx, ry, rz), fitIn(x1, y1, z1, x2, y2, z2\[, keepRatio\]), clone() +- Fixed colors and mesh position in item models + +## 2.0.2b25 + +- Added block description property - sound, sets one of standard block sound types +- Added RenderMesh method setLightPos(x, y, z) - set relative position for block lighting +- Added RenderMesh method parameter setFoliageTinted(leavesType) +- Fixed ItemModel.occupy() method not preventing setting ICRender models + +## 2.0.2b24 + +- Fixed crash from massive amount of blocks with RenderMesh +- Added methods to RenderMesh - setNoTint(), setGrassTinted(), setFoliageTinted(), setWaterTinted() +- Added preloader scipt methods - Resources.getAllMatchingResources("regex"), Resources.getResourcePath("local path"), Resources.getAllResourceDirectoriesPaths() + +## 2.0.2b23 + +- UI and world item models engine was fully rewritten: + - Mod UI support custom item models (non-meshes for now) + - Item animations now based on RenderMesh and support custom item models and materials + - Generating item models moved to new loading phase + - Item model caching will make their generation much faster after first launch + - ItemModel API module is massively improved and allows access to all model-related stuff + - Additional materials can be passed to handle glint on item models + - Block rendertype parameter is fixed and will affect block item model +- Other improvements: + - Added condition ICRender.RANDOM(value, max\[, seed\]) - for given block position generates random number from 0 to max - 1, and returns, if it is equal to value. Has method setAxisEnabled(0-2, enabled) to ignore some axises. + - Added functions Block.setupAsRedstoneReceiver(nameID, connectToRedstone), Block.setupAsRedstoneEmitter(nameID, connectToRedstone, Block.setupAsNonRedstoneTile(nameID) + - RenderMesh: added method addMesh(mesh\[, x, y, z\[, scaleX, scaleY, scaleZ\]\]), alpha value now can be passed to setColor + - Added block description property - mapcolor, sets 0xRRGGBB map color to block + +## 2.0.2b22 + +- Minor fixes and improvements + +## 2.0.2b21 + +- (Experimental) Global optimization, attempting to increase FPS by using dynamic thread priority +- (Experimental) World generation optimized +- Minor fixes for item models + +## 2.0.2b20 + +This update adds alot and might be unstable. + +- Added ability to create custom materials and shaders (more info will be provided soon) +- Added UI and in-hand item models, to access use ItemModel.getFor(id, data) +- Added new animation mode - direct mesh render with material, to enter this mode call method describe({mesh: RenderMesh, skin: "texture name", material: "material name"}) +- Blocks with ICRender will automatically gain inventory models +- Added custom dimension methods: setFogDistance(close, far), resetFogDistance() +- Other minor fixes + +## 2.0.1b18 + +- Added directories innercore/resource_packs, innercore/behaviour_packs for adding resource and behaviour packs +- Local world resource and behaviour packs are now automatically forced for this world +- Added module AddonEntityRegistry and functions to work with addon-added mobs +- Minor fixes + +## 2.0.1b17 + +- Added GenerationUtils.generateOreCustom(x, y, z, id, data, amount, mode, listOfIds\[, seed\]), also added optional seed parameter to GenerationUtils.generateOre +- Fixed drops from World.destroyBlock +- Fixed Player.setHunger, Player.setSaturation, Player.setExhaustion +- Fixed some block drops + +## 2.0.1b16 + +- Added machine place sound +- Fixed some block drops +- Minor fixes for custom dimensions + +## 2.0.1b15 + +- Attempt to optimize biome map + +## 2.0.1b14 + +- Temporary disabled biome maps + +## 2.0.1b13 + +- Minor fixed and optimizations + +## 2.0.1b12 + +- Added better API for new custom dimensions +- Fixed empty and non ASCII base item name crash (Mods like Divine RPG) + +## 2.0.1b11 + +- Added API for custom biomes +- Added callback GenerateBiomeMap, that uses World.get/setBiomeMap to build chunk biome map before any generation +- Added new parameters to generation callbacks: (chunkX, chunkZ, random, dimensionId, chunkSeed, worldSeed, dimensionSeed) +- Added GenerationUtils.getPerlinNoise(x, y, z, seed, scale, numOctaves) +- Added World.addGenerationCallback(callbackName, callback\[, hashString\]), that uniquely modifies chunk seed before calling callback + +## 2.0.1b10 + +- Added mod loading UI +- Mods are now loading in separate thread +- Fixed UI hangs after fast-clicking on block or item with UI +- Fixed some errors with drops and tools +- Fixed fatal error tip message randomly appearing during world load + +## 2.0.0b9 + +- Completed classic mod UI and workbench UI +- Now mod UI will close when back is pressed or app is minimized +- Fixed possible crashes from render mapping and Item.getName +- Now when all mods are stopped in case of an fatal error it is displayed as tip message +- Applied stability fixes from build 8 + +## 2.0.0b8 + +- Another attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required), after all this attempts best solution from builds 6-8 will be selected +- Fixed new workbench + +## 2.0.0b7 + +- Another attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required) + +## 2.0.0b6 + +- More stability fixes (report any new or more frequent crashes) +- Classic-styled workbench +- Started migrating mod UI to classic style + +## 2.0.0b5 + +- Fixes for system versions lower than Android 9 + +## 2.0.0b4 + +- Some UI fixes, mostly for devices with cutout diff --git a/docs/ru/page/apps/innercore/index.md b/docs/ru/page/apps/innercore/index.md new file mode 100644 index 000000000..fb46b2cf9 --- /dev/null +++ b/docs/ru/page/apps/innercore/index.md @@ -0,0 +1,31 @@ +Inner Core создан на основе базиса Майнкрафта 1.11.4 и 1.16.201, а также является полномасштабно расширяемой средой для создания и игры с модами, давая куда большие возможности чем CoreEngine & BlockLauncher. + +Нативная часть, написанная с чистого листа, сделала возможным решить большинство возникающих проблем моддинга в BlockLauncher и расширила возможности в куда более эффективном ключе. + +## Список библиотек для модов + +| Библиотека | Автор / Источник | Краткое описание | +| :--------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [AchievementsAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Mods/AchievementsAPI) | [DDCompany](https://vk.com/club149493963) | Библиотека для добавления достижений. | +| [EnergyLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/EnergyLib) | [Inner Core](https://vk.com/club129680450) | Библиотека для создания и работы с различными типами энергии, проводами, генераторами и потребителями. | +| [EnergyNet](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/EnergyNet) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | Более продвинутая версия прошлой библиотеки, позволяющая передавать энергию через пакеты и ограничить передачу по проводам. | +| [ToolLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/ToolLib) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | Библиотека, предоставляющая универсальные типы инструментов и добавляющая несколько упрощающих методов. | +| [StorageInterface](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/StorageInterface) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | Библиотека для передачи объектов и жидкостей, позволяющая задать конфигурацию для интерфейсов контейнеров. | +| [Dimensions](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/Dimensions) | [Zheka_Smirnov](https://vk.com/zheka_smirnov) | Библиотека, упрощающая создание измерений. | +| [#modpacker](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/modpacker) | [#mineprogramming](https://vk.com/club134044100) | Библиотека для создания и загрузки сборок модов. | +| [EntityState](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/EntityState) | [#mineprogramming](https://vk.com/club134044100) | Библиотека для уточнения текущего действия игрока (его движений). | +| [ScalesRPG](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/ScalesRPG) | [#mineprogramming](https://vk.com/club134044100) | Библиотека для регистрации различных шкал в дополнении к уже существующим (голод, жизни, броня...). | +| [SettingsManager](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/SettingsManager) | [#mineprogramming](https://vk.com/club134044100) | Библиотека для упрощения работы с игровыми настройками. | +| [BackpackAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/BackpackAPI) | [DDCompany](https://vk.com/club149493963) | Библиотека для регистрации рюкзаков. | +| [Baubles](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/Baubles) | [DDCompany](https://vk.com/club149493963) | Библиотека для создания фенечек. | +| [AdvancedAI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/AdvancedAI) | [TrashboxBobylev](https://vk.com/trashboxbobylev) | Библиотека, содержащая новые типы интеллекта мобов. | +| [MobLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/MobLib) | [WolfTeam](https://vk.com/club80513593) | Библиотека для создания мобов. | +| [RecipeTELib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/RecipeTELib) | [WolfTeam](https://vk.com/club80513593) | Библиотека, упрощающая создание верстаков и печек. | +| [ShootLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/ShootLib) | [WolfTeam](https://vk.com/club80513593) | Библиотека для создания оружия. | +| [SoundAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/SoundAPI) | [WolfTeam](https://vk.com/club80513593) | Библиотека для работы со звуком. | +| [StructuresAPI](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/StructuresAPI) | [WolfTeam](https://vk.com/club80513593) | Библиотека, упрощающая работу со структурами. | +| [Timer](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/Timer) | [TooManyMods](https://vk.com/club150408457) | Библиотека, упрощающая работу со временем тика. | +| [BowLib](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/BowLib) | [TooManyMods](https://vk.com/club150408457) | Библиотека, делающая еще более простым создание вашего собственного лука. | +| [VanillaRecipe](https://wiki.mineprogramming.org/index.php/InnerCore/Libs/VanillaRecipe) | [MineExplorer](https://icmods.mineprogramming.org/search?author=19) | Библиотека для упрощения создания рецептов крафтов Майнкрафта прямо в JSON. | + +> Большинство из них устарели, пожалуйста убедитесь в этом перед использованием. diff --git a/docs/ru/page/guides/blocks/liquids.md b/docs/ru/page/guides/blocks/liquids.md new file mode 100644 index 000000000..5964c7a15 --- /dev/null +++ b/docs/ru/page/guides/blocks/liquids.md @@ -0,0 +1,44 @@ +Жидкости создаются как пара блоков: стоячая и текучая. Текучие блоки обновляются как и все стандартные жидкости, в то же время стоячие становятся текучими после обновления соседних к ним блоков. Помимо этого, текучие блоки начинают растекаться сразу после установки, стоячие нет. + +Нельзя ничего сделать для определения отдельных "источников" и "потоков" жидкости, оба блока с метой = 0 станут источником жидкости, а с метой > 0 — потоком жидкости. Это истинно как для внутреигровых, так и новых жидкостей. + +Создание новых жидкостей +Для создания блоков жидкостей, используйте [[Block.createLiquidBlock]]: + +Translation.addTranslation("Ink", { + en: "Ink", + ru: "Чернила" +}); +Translation.addTranslation("Bucket of Ink", { + en: "Bucket of Ink", + ru: "Ведро чернил" +}); + +Block.createLiquidBlock("ink", { + name: "Ink", + tickDelay: 30, + still: { + texture: ["ink", 0] + }, + flowing: { + texture: ["ink", 0] + }, + bucket: { + texture: { name: "bucket_ink", meta: 0 } + }, + uiTextures: ["liquid_ink"] +}); +Это создаст текучий и стоячий блоки жидкостей, а также добавит полнофункциональное ведро для использования игроком и разлитием с помощью раздатчиков. Для последнего задействованы функции [[ItemRegistry.setLiquidClip]] и [[ItemRegistry.registerDispenseFunction]]. + +Текстуры для текучих жидкостей должны быть добавлены с особым названием: ink.liquid.png без меты (она в любом случае будет 0), задействуется все та же папка terrain-atlas. Для стоячих вариаций используются стандартные текстуры блоков. Анимации могут быть добавлены для обоих вариантов, в случае стоячих это будет ink.anim.png и текучих ink.liquid.anim.png. Изучите использование анимаций атласа если это необходимо. + +Привязка к событиям +Помимо добавления жидкостей, возможно вы захотите взаимодействовать с ними. + +Используйте [[LiquidRegistry.getLiquidByBlock]] для получения строкового идентификатора для заданного блока, null вернется в случае если блок не является жидкостью. + +Используйте [[LiquidRegistry.getBlockByLiquid]] для получения идентификатора текучего, или, если второй аргумент true, стоячего, блоков для заданной жидкости, 0 вернется если жидкость с этим идентификатором не существует. + +Используйте [[LiquidRegistry.getLiquidByBlock]] для получения строкового идентификатора для заданного блока, `null` вернется в случае если блок не является жидкостью. + +Используйте [[LiquidRegistry.getBlockByLiquid]] для получения идентификатора текучего, или, если второй аргумент `true`, стоячего, блоков для заданной жидкости, `0` вернется если жидкость с этим идентификатором не существует. diff --git a/docs/ru/page/guides/getting-started/config.md b/docs/ru/page/guides/getting-started/config.md new file mode 100644 index 000000000..00223b07d --- /dev/null +++ b/docs/ru/page/guides/getting-started/config.md @@ -0,0 +1,67 @@ +Mod on Inner Core is a directory with build.config file, also can be several additional files, such as description file and default configuration file. Last one will be created automatically. + +## config.json + +To make the behavior of your mod dependent on some user-defined settings, use mod configuration file. Configuration file is a JSON file stored in the mod's root directory and called _config.json_. To access this configuration file from your code, use [[__config__]] global variable. + +The only option that should always be present in your mod is _enabled_. If it is not in the mod configuration file, it will be added automatically. + +An example of mod configuration file: + +```json +{ + "enabled": true, + "topLevelSetting": 12, + "someSettingsGroup": { + "key1": "value1", + "key2": true + } +} +``` + +As you can see, some of the settings may be nested, so that you can group them accordingly. It is generally not recommended to use more then two layers of nested settings, since when displaying in mods manager they are flattened to a two-layer structure. + +## config.info.json + +All the settings of the mod can be changed from Inner Core's Mods Manager module. By default, Mods Manager uses text inputs for numbers and strings and switches for boolean values. It also generates readable setting names from property names, e.g. `some_sample_setting` gets transformed into __"Some sample setting"__. Thus, in most cases, the settings are visualized correctly. However, you might want to change the controls' look, localize settings names or supply descriptions. To customize the way your settings are displayed, you can place a JSON file called _config.info.json_ in the mod's root directory. A simple example of such a file is given below: + +```json +{ + "description": "This is a global config description", + "properties": { + "topLevelSetting": { + "name": "Some setting", + "type": "SeekBar", + "min": 10, + "max": 120 + }, + "someSettingsGroup": { + "name": "I will appear when mod enabled", + "collapsible": false, + "displayIf": "enabled" + }, + "someSettingsGroup.key1": { + "name": { + "en": "Some setting", + "ru": "Некая настройка" + }, + "description": { + "en": "Some setting allows to do something cool", + "ru": "Некая настройка для создания нечто классного" + } + } + } +} +``` + +- __description__ option allows to specify the description of the whole config file that will be displayed at the top of config view +- __properties__ option is an object containing option names (dot-separated for nested settings) as keys and their properties objects as values. All available properties of options are listed below: + - _name_ specifies the actual name of the setting. Can be either a string or an object containing language codes as keys and localized strings as values. In the second case, English (_"en"_) localization is required + - _description_ specifies the description that will be displayed above the setting. Can be either string or an object like in the _name_ property + - _collapsible_ can be applied only to settings group. If false, the group is expanded by default and cannot be collapsed. Defaults to true + - _display_ allows to hide settings by specifying as false. Defaults to true + - _displayIf_ allows to display settings only if some boolean setting is either true or false. Use `"displayIf": "propertyName"` to display the setting if the appropriate property is true and `"displayIf": "!propertyName"` to display the setting if the appropriate property is false + - _index_ is used to specify the order of settings in the config view. The settings with specified indexes go first, then the settings with no indexes in the order they appear in the _config.json_ file. Note that the indexes work only on the single layer of nested settings, so that you can rearrange settings inside the group + - _type_ allows for some additional setting appearance modification. The only currently supported explicit setting type is a _"SeekBar"_. It creates a slider for numeric values rather then just a text input + - _min_ specifies the minimum value for the _SeekBar_ settings + - _max_ specifies the maximum value for the _SeekBar_ settings diff --git a/docs/ru/page/guides/getting-started/setup-toolchain.md b/docs/ru/page/guides/getting-started/setup-toolchain.md new file mode 100644 index 000000000..7eb2f6223 --- /dev/null +++ b/docs/ru/page/guides/getting-started/setup-toolchain.md @@ -0,0 +1 @@ +[Inner Core Mod Toolchain](https://raw.githubusercontent.com/zheka2304/innercore-mod-toolchain/master/README-ru.md ':include') diff --git a/docs/ru/page/guides/getting-started/toolchain-configuration.md b/docs/ru/page/guides/getting-started/toolchain-configuration.md new file mode 100644 index 000000000..42a2dbcdf --- /dev/null +++ b/docs/ru/page/guides/getting-started/toolchain-configuration.md @@ -0,0 +1 @@ +[Inner Core Mod Toolchain — Конфигурация](https://raw.githubusercontent.com/zheka2304/innercore-mod-toolchain/master/CONFIG-ru.md ':include') diff --git a/docs/ru/page/guides/items/enchantements.md b/docs/ru/page/guides/items/enchantements.md new file mode 100644 index 000000000..094be6e7c --- /dev/null +++ b/docs/ru/page/guides/items/enchantements.md @@ -0,0 +1,107 @@ +Зачарования позволяют задать предмету дополнительные свойства, реализовать новую механику или увеличить количество путей развития. В любом из случаев, Inner Core позволяет использовать зачарования во всех вариантах. + +## Применение к предмету + +Изначально любой предмет создается без возможности к зачарованию, естественно, в том случае, если это не реализует библиотека. + +Самые базовые вещи, которые вы можете сделать для добавления чар к вашему инструменту, броне или чему бы то ни было, это: + +```js +Item.setEnchantType(ItemID.multi_tool, EEnchantType.HOE, 0); +Item.setEnchantType(ItemID.multi_tool, EEnchantType.SHOVEL, 1); +Item.setEnchantType(ItemID.multi_tool, EEnchantType.PICKAXE, 2); +Item.setEnchantType(ItemID.multi_tool, EEnchantType.AXE, 4); +``` + +В данном случае мы определяем возможность зачарования сразу для нескольких типов зачарования [[EEnchantType]], давая возможность наложить чары характерные лишь для конкретного инструмента. Например, стандартными чарами являются починка и прочность, а уникальными чарами топора остается острота. Соответственно, теперь предмет может быть зачарован на столе зачарований или наковальне, используя любые из указанных уникальных чар. + +Последняя цифра функции [[Item.setEnchantType]] определяет "качество" зачарования, у алмазной кирки оно выше чем, например, железной. Информацию о качестве можно найти [здесь](TODO). + +Давайте сделаем что-то поинтереснее, например, будем добавлять уровень для существующего зачарования при разрушении блоков, а при определенных условиях увеличим шанс на это, т.е. добавим навыки: + +```js +Callback.addCallback("DestroyBlock", function (coords, block, actorUid) { + var item = Entity.getCarriedItem(actorUid); + + // ничего не делаем в случае если у предмета нет экстры или он не зачарован + if (item.extra == null || !item.extra.isEnchanted()) { + return; + } + + // проверяем есть ли зачарование удачи на нашем предмете + var enchantLevel = item.extra.getEnchantLevel(EEnchantment.FORTUNE); + if (enchantLevel > 0 && enchantLevel < 3) { + // меняем шанс повышения уровня в зависимости от условий + var chance = 0.0025; // 1/4% повышения уровня от разрушения блока + if (block.id == VanillaBlockID.diamond_ore) { + chance *= 2; + } else if (block.id == VanillaBlockID.diamond_block) { + chance *= 8; + } + if (Math.random() < chance) { + // дристаем партикли на месте разрушенного блока и повышаем уровень + Particles.addParticle(Native.ParticleType.enchantmenttable, coords.x - 0.25, coords.y, coords.z - 0.25, 0, 0, 0); + Particles.addParticle(Native.ParticleType.enchantmenttable, coords.x + 0.25, coords.y, coords.z - 0.25, 0, 0, 0); + Particles.addParticle(Native.ParticleType.enchantmenttable, coords.x - 0.25, coords.y, coords.z + 0.25, 0, 0, 0); + Particles.addParticle(Native.ParticleType.enchantmenttable, coords.x + 0.25, coords.y, coords.z + 0.25, 0, 0, 0); + item.extra.addEnchant(EEnchantment.FORTUNE, enchantLevel + 1); + } + } +}); +``` + +Теперь при использовании удачи для разрушения блоков ее уровень со временем будет повышаться. Экстра имеет некоторые методы для взаимодействия с чарами, откройте [[com.zhekasmirnov.innercore.api.NativeItemInstanceExtra]] для получения деталей. + +## Создание новых зачарований + +Помимо стандартного применения зачарований к вашим предметам, существует возможность создания своих собственных. Созданные таким способом зачарования могут быть применены на столе зачарований или найдены как сокровища. + +Для создания новых зачарований, используйте конструктор [[CustomEnchant.newEnchant]]: + +```js +Translation.addTranslation("Prism", { + en: "Prism", + ru: "Призма" +}); + +const PRISM_ENCHANT = CustomEnchant.newEnchant("prism", "Prism"); +PRISM_ENCHANT.setMinMaxLevel(1, 3); +PRISM_ENCHANT.setIsDiscoverable(false) + .setIsTreasure(true); +PRISM_ENCHANT.setIsLootable(false); +``` + +Это создаст зачарование с уровнем от 1 до 3, которое можно будет выловить с помощью удочки и нельзя зачаровать на столе зачарований. Так как маска не задана, оно применимо к любому предмету. Что такое маска? Это типы предметов, на которые может быть применено зачарование, то есть [[EEnchantType]]. Если мы хотим применять зачарование лишь к броне, используйте что-то вроде: + +```js +PRISM_ENCHANT.setMask(EEnchantType.HELMET + | EEnchantType.LEGGINGS + | EEnchantType.BOOTS + | EEnchantType.CHESTPLATE); +``` + +Однако в случае выше, маска не задействована, а зачарование может быть получено лишь в следствии рыбалки. Давайте исправим это, убрав `PRISM_ENCHANT.setIsLootable(false);`, так мы добьемся добавления зачарования в сундуки структур. Это производит сама игра, в противном случае зачарованные вещи и книги с вашим зачарованием могут быть найдены в сундуках для сокровищ, так работает починка, она не может быть зачарована на столе зачарования, зато может быть выловлена удочкой или найдена в сундуках энда. Изучите [библиотеку NativeStructure](/ru/lib/NativeStructure) для получения подробностей о создании новых карт лута для сундуков и новых структур с ними. + +Если вам понадобится получить идентификатор зачарования, используйте `PRISM_ENCHANT.id`, он не изменится после первой генерации как это происходит с блоками и предметами. + +## События и свойства зачарований + +Функции в событиях вызываются при каждом взаимодействии с зачарованным предметом и значения в них могут динамично обновляться в зависимости от внешних условий. Они все еще остаются экспериментальной возможностью и могут работать нестабильно, однако возможно этот функционал необходим именно для вашего мода. + +```ts +PRISM_ENCHANT.setAttackDamageBonusProvider((damage: int, entityId: number) => float); +``` + +```ts +PRISM_ENCHANT.setPostAttackCallback((item: ItemStack, damage: int, entityId1: number, entityId2: number) => void); +``` + +```ts +PRISM_ENCHANT.setProtectionBonusProvider((damage: int, damageType: int, entityId: number) => float); +``` + +```ts +PRISM_ENCHANT.setPostHurtCallback((item: ItemStack, damage: int, entityId1: number, entityId2: number) => void); +``` + +Проводники нужны для возвращения дополнительных (бонусных) очков значения. В этих случаях урон при атаке с зачарованием будет повышен (или понижен если угодно) на заданное количество полусердец, а при использовании зачарования на броне, ее защита соответственно будет повышена. diff --git a/docs/ru/page/guides/minecraft/attributes.md b/docs/ru/page/guides/minecraft/attributes.md new file mode 100644 index 000000000..d2e4b7eed --- /dev/null +++ b/docs/ru/page/guides/minecraft/attributes.md @@ -0,0 +1,57 @@ +Attributes is a mechanism that allows to set some floating-point attributes for any entity (including player). Those values include health, speed, attack damage and many others. + +Some of the attributes belong to players only, other ones are shared between all the actors. Currently known attributes with descriptions are listed below. + +## Known Attributes List + +### minecraft:health + +How much health the mob starts with. Units are in # of half hearts. + +### minecraft:follow_range + +How far away the mob will stay from a target, in blocks, that it is following (usually the owner). + +### minecraft:knockback_resistance + +How much resistance is there against knockback effects. 0 mean no resistance, 1 means fully immune. + +### minecraft:movement + +How fast the mob moves in the world. Units are blocks per tick, 20 ticks in a second. This means that a mob with 0.25 movement speed will run 5 blocks every second (20 ticks \* 0.25 blocks per tick). + +### minecraft:underwater_movement + +How fast the mob moves in the world. Units are blocks per tick, 20 ticks in a second. This means that a mob with 0.25 movement speed will run 5 blocks every second (20 ticks \* 0.25 blocks per tick). + +### minecraft:attack_damage + +How much damage the entity inflicts. + +### minecraft:absorption + +### minecraft:luck + +### minecraft:fall_damage + +### minecraft:horse.jump_strength + +### minecraft:player.hunger + +Player's hunger level + +### minecraft:player.saturation + +Player's saturation level + +### minecraft:player.exhaustion + +Player's exhaustion level + +### minecraft:player.level + +Player's level + +### minecraft:player.experience + +Player's experience level diff --git a/docs/ru/page/guides/minecraft/playercontainers.md b/docs/ru/page/guides/minecraft/playercontainers.md new file mode 100644 index 000000000..31f94b49d --- /dev/null +++ b/docs/ru/page/guides/minecraft/playercontainers.md @@ -0,0 +1,126 @@ +Containers allows to store items in interface containers, such as player screens (e.g. workbench, inventory, etc.). + +- ContainerCategory — maybe type of container +- ContainerEnumName — maybe unique id of container or id of name + +## Known containers in inventory + +### armor_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 6 + +### combined_hotbar_and_inventory_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 12 + +### hotbar_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 27 + +### inventory_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 28 + +### offhand_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 1 \ + ContainerEnumName = 33 + +### crafting_input_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 2 \ + ContainerEnumName = 13 + +### cursor_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 2 \ + ContainerEnumName = 58 + +### crafting_output_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 14 + +### recipe_construction + +Stores items in Construction tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 15 + +### recipe_nature + +Stores items in Nature tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 16 + +### recipe_items + +Stores items in Items tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 17 + +### recipe_search + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 18 + +### recipe_equimpent + +Stores items in Equimpent tab. + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 20 + +### creative_output_items + +- ContainerModel + + FilteredContainerModel \ + ContainerCategory = 3 \ + ContainerEnumName = 59 diff --git a/docs/ru/page/guides/mod-api/callbacks.md b/docs/ru/page/guides/mod-api/callbacks.md new file mode 100644 index 000000000..7878be52a --- /dev/null +++ b/docs/ru/page/guides/mod-api/callbacks.md @@ -0,0 +1,271 @@ +Callbacks is a mechanism that allows to handle and prevent some of the in-game events as well as user-invoked events. When some native event Occurs, all callback functions registered for this event are called. To add a callback to some event, use [[Callback.addCallback]] function. To invoke a custom event, use [[Callback.invokeCallback]]. To prevent the default flow of the event, use [[Game.prevent]]. + +All pre-defined (in-game) callbacks with their functions interfaces are listed below. If no function interface is provided, use a function with no params and return value: + +## UI callbacks + +### ContainerOpened + +Occurs when user opens some container. See [[ContainerOpenedFunction]] for details + +### ContainerClosed + +Occurs when some container is closed. See [[ContainerClosedFunction]] for details + +### CustomWindowOpened + +Occurs when every single window is opened. Called for every window and subwindow. Examples of subwindows include standard inventory, window title, main window, etc. See [[CustomWindowOpenedFunction]] for details + +### CustomWindowClosed + +Occurs when every single window is closed. See [[CustomWindowClosedFunction]] for details + +## Workbench callbacks + +### CraftRecipePreProvided + +Occurs before crafting is performed. See [[CraftRecipePreProvidedFunction]] for details + +### CraftRecipeProvided + +Occurs after crafting recipe result is determined. See [[CraftRecipeProvidedFunction]] for details + +### VanillaWorkbenchCraft + +Occurs just before adding crafting recipe result to player's inventory. See [[VanillaWorkbenchCraftFunction]] for details + +### VanillaWorkbenchPostCraft + +Occurs after adding crafting recipe result to player's inventory. See [[VanillaWorkbenchCraftFunction]] for details + +### VanillaWorkbenchRecipeSelected + +Occurs when player selects recipe in the workbench. See [[VanillaWorkbenchRecipeSelectedFunction]] for details + +## Inner Core and Core Engine callbacks + +### CoreConfigured + +Occurs when Inner Core default configuration file is loaded. See [[CoreConfiguredFunction]] for details + +### PreLoaded + +Occurs directly after "CoreConfigured" callback + +### APILoaded + +Occurs directly after "PreLoaded" callback + +### ModsLoaded + +Occurs directly after "APILoaded" callback + +### PostLoaded + +Occurs directly after "ModsLoaded" callback. Last of the loading callbacks + +### AppSuspended + +Occurs when Minecraft application is paused + +### NativeGuiChanged + +Occurs when vanilla screen changes. See [[NativeGuiChangedFunction]] for details + +### ReadSaves + +Occurs when reading saves from global scope. See [[SavesFunction]] for details + +### WriteSaves + +Occurs when writing saves to global scope. See [[SavesFunction]] for details + +## Worlds and dimensions callbacks + +### tick + +Is main game tick. This callback is called 20 times per second and is used to define all dynamic events in the game. Avoid overloading tick functions and use [[Updatable]]s and [[TileEntity]]s when possible + +### LevelSelected + +Occurs when the level is selected and will be loaded. See [[LevelSelectedFunction]] for details + +### LevelCreated + +Occurs when level is created in the memory of the device + +### LevelDisplayed + +Occurs when level is displayed to the player + +### LevelPreLoaded + +Occurs before some level initialization + +### LevelLoaded + +Occurs when level is completely loaded and is ready to be displayed to the player + +### DimensionLoaded + +Occurs when vanilla or custom dimension is loaded. See [[DimensionLoadedFunction]] for details + +### LevelPreLeft + +Occurs when player starts leaving world + +### LevelLeft + +Occurs when player completes leaving world + +### PreBlocksDefined + +Occurs before saving block data while loading world + +### BlocksDefined + +Occurs after saving block data while loading world + +## Player actions callbacks + +### DestroyBlock + +Occurs when player breaks block. See [[DestroyBlockFunction]] for details + +### DestroyBlockStart + +Occurs when player starts breaking block. Has the same parameters as "DestroyBlock" callback, see [[DestroyBlockFunction]] for details + +### DestroyBlockContinue + +Occurs when player continues breaking block. Occurs several times during one block breaking. See [[DestroyBlockContinueFunction]] for details + +### BuildBlock + +Occurs when player places block somewhere in the world. See [[BuildBlockFunction]] for details + +### BlockChanged + +Occurs when block changes in the world. To capture this event you should register blocks that you need to watch using [[World.setBlockChangeCallbackEnabled]] method. All block changes that are related to the registered blocks trigger this event. See [[BlockChangedFunction]] for details + +### ItemUse + +Occurs when player uses item on some block. Doesn't work if vanilla container is opened (e.g. chest, workbench, etc.). Use "ItemUseLocalServer" to track such events instead. See [[ItemUseFunction]] for details + +### ItemUseLocalServer + +Occurs when player uses some item on the local server. Can be used to prevent vanilla container from opening. See [[ItemUseFunction]] for details + +### FoodEaten + +Occurs when player eats food. See [[FoodEatenFunction]] for details + +### ExpAdd + +Occurs when player gains some experience. See [[ExpAddFunction]] for details + +### ExpLevelAdd + +Occurs when player gains some experience levels. See [[ExpLevelAddFunction]] for details + +### NativeCommand + +Occurs when player enters some command. See [[NativeCommandFunction]] for details + +### PlayerAttack + +Occurs when player attacks some entity. See [[PlayerAttackFunction]] for details + +### EntityInteract + +Occurs when player longclick some entity (interacts with it). See [[EntityInteractFunction]] for details + +### ItemUseNoTarget + +Occurs when an item is used in the air. See [[ItemUseNoTargetFunction]] for details + +### ItemUsingReleased + +Occurs when player doesn't complete using item that has maximum use time set with [[Item.setMaxUseDuration]] function. See [[ItemUsingReleasedFunction]] for details + +### ItemUsingComplete + +When player completes using item that has maximum use time set with [[Item.setMaxUseDuration]] function. See [[ItemUsingCompleteFunction]] for details + +## Entities and environment callbacks + +### Explosion + +Occurs when something is exploded in the world. See [[ExplosionFunction]] for details + +### EntityAdded + +Occurs when an entity is added in the world. See [[EntityAddedFunction]] for details + +### EntityRemoved + +Occurs when an entity is removed from the world. See [[EntityRemovedFunction]] for details + +### EntityDeath + +Occurs when an entity dies. See [[EntityDeathFunction]] for details + +### EntityHurt + +Occurs when an entity is hurt. See [[EntityHurtFunction]] for details + +### ProjectileHit + +Occurs when a projectile entity hits entity or block. See [[ProjectileHitFunction]] for details + +## Items and blocks callbacks + +### RedstoneSignal + +Occurs when redstone signal changes on the specified coordinates. To register block as redstone consumer, use [[Block.setRedstoneTile]] function. See [[RedstoneSignalFunction]] for details + +### PopBlockResources + +Occurs when block is destroyed somehow (not by player). See [[PopBlockResourcesFunction]] for details + +### CustomBlockTessellation + +Occurs when custom block rendering needs to be performed. See [[CustomBlockTessellationFunction]] for details + +### ItemIconOverride + +Occurs when displaying item somewhere to override item's icon. You can use it to change item's icon depending on some item state. See [[ItemIconOverrideFunction]] for details + +### ItemNameOverride + +Occurs when displaying item name to override it. You can use it to display item charge, status, etc. See [[ItemNameOverrideFunction]] for details + +### ItemDispensed + +Occurs when an item is dispensed using dispenser. See [ItemDispensedFunction]] for details + +## Generation callbacks + +### GenerateChunk + +Occurs when generating chunk in overworld. Should be used for all generation process. See [[GenerateChunkFunction]] for details + +### GenerateChunkUnderground + +Occurs when generating chunk's underground in overworld. Can be used for all underground generation process (though it is OK to use "GenerateChunk" for it as well). See [[GenerateChunkFunction]] for details + +### GenerateNetherChunk + +Occurs when generating chunk in neather world. See [[GenerateChunkFunction]] for details + +### GenerateEndChunk + +Occurs when generating chunk in end world. See [[GenerateChunkFunction]] for details + +### GenerateChunkUniversal + +Occurs when any chunk is generated. See [[GenerateChunkFunction]] for details + +### GenerateBiomeMap + +Occurs after generating vanilla biome map so that we can modify it before the covers generation. See {@page Biomes} for the biomes generation information. See [[GenerateChunkFunction]] for details diff --git a/docs/ru/page/guides/mod-resources/materials.md b/docs/ru/page/guides/mod-resources/materials.md new file mode 100644 index 000000000..951d9ccff --- /dev/null +++ b/docs/ru/page/guides/mod-resources/materials.md @@ -0,0 +1,58 @@ +Inner Core allows you to add new materials and attach shaders to them to use for items in the inventory and 3d models. + +**Material** is a set of OpenGL properties, vertex and fragment shaders that is used for an in-game object. + +## Adding custom materials + +Custom materials files should be located in the resource pack in the _custom-materials_ directory. Each file should have _.material_ extension and can contain one or multiple material descriptions. An example of such a file for vanilla barrel material is listed below: + +```json +{ + "materials": { + "version": "1.0.0", + + "barrier": { + "+defines": ["ALPHA_TEST", "TEXEL_AA", "ATLAS_TEXTURE"], + "+states": ["DisableAlphaWrite"], + + "vertexFields": [{ "field": "Position" }, { "field": "UV1" }, { "field": "Color" }, { "field": "UV0" }], + + "vertexShader": "shaders/barrier.vertex", + "vrGeometryShader": "shaders/uv.geometry", + "fragmentShader": "shaders/renderchunk.fragment", + + "msaaSupport": "Both", + + "depthFunc": "LessEqual", + + "blendSrc": "SourceAlpha", + "blendDst": "OneMinusSrcAlpha", + + "+samplerStates": [ + { + "samplerIndex": 0, + "textureFilter": "TexelAA" + }, + { + "samplerIndex": 1, + "textureFilter": "Bilinear" + } + ] + } + } +} +``` + +Full documentation of _.material_ file format is currently unavailable. + +You can inherit an existing material using _material_name:material_parent_ syntax in your material declaration. + +> _Note that Minecraft doesn't display any materials or shaders compilation errors and doesn't display an object with invalid materials or shaders at all._ + +## Using custom shaders + +You can add custom shaders to your mod by locating them in the _custom-shaders_ directory or in child directories. + +Custom shaders for Minecraft: Bedrock Edition use GLSL language. You can find some of the examples of shaders in Minecraft's vanilla resource pack. We recommend using _entity.vertex_/_entity.fragment_ as a scratch. + +If you locate your shader in one of the subdirectories, you should use relative path in your material declaration. diff --git a/docs/ru/page/guides/player/abilities.md b/docs/ru/page/guides/player/abilities.md new file mode 100644 index 000000000..cb61c20c2 --- /dev/null +++ b/docs/ru/page/guides/player/abilities.md @@ -0,0 +1,151 @@ +Abilities is a mechanism that allows to set some flags (allow/disallow actions) or values (fly speed, walk speed) for the player. Inner Core provides an interface to the underlying Abilities implementation. Not all of the abilities are well tested, some may not work at all. + +Abilities may be of two types: _boolean_ and _float_. The appropriate setter is invoked automatically when you call [[Player.setAbility]] function. To keep types consistent, two functions, [[Player.getFloatAbility]] and [[Player.getBooleanAbility]] are used to retrieve value in the required form. + +## Abilities List + +You can find the list of all the abilities with their default values available in Minecraft 1.11.4 below. If you find out more information about some of the abilities, feel free to contribute (See {@page Contributing}). + +### ATTACK_MOBS + +Whether the player can attack mobs + +```js +Native.PlayerAbility.ATTACK_MOBS = true; +``` + +### ATTACK_PLAYERS + +Whether the player can attack other players + +```js +Native.PlayerAbility.ATTACK_PLAYERS = true; +``` + +### BUILD + +Whether the player can place blocks + +```js +Native.PlayerAbility.BUILD = true; +``` + +### DOORS_AND_SWITCHES + +Whether the player can operate doors, levers, etc. + +```js +Native.PlayerAbility.DOORS_AND_SWITCHES = true; +``` + +### FLYING + +Specifies whether the player is flying at the moment or not + +```js +Native.PlayerAbility.FLYING = false; +``` + +### FLYSPEED + +The speed at which the player flies in Creative + +```js +Native.PlayerAbility.FLYSPEED = 0.1; +``` + +### INSTABUILD + +Whether the player can break blocks instantly. Normally only true in Creative. + +```js +Native.PlayerAbility.INSTABUILD = false; +``` + +### INVULNERABLE + +True if the player is immune to all damage and harmful effects except for void damage. (damage caused by the /kill command is void damage) + +```js +Native.PlayerAbility.INVULNERABLE = false; +``` + +### LIGHTNING + +Whether lightning appears in thunderstorms + +```js +Native.PlayerAbility.LIGHTNING = false; +``` + +### MAYFLY + +Specifies whether the player has the ability to fly or not + +```js +Native.PlayerAbility.MAYFLY = false; +``` + +### MINE + +Whether the player can destroy blocks + +```js +Native.PlayerAbility.MINE = true; +``` + +### MUTED + +If true, disables chat so that you cannot send messages + +```js +Native.PlayerAbility.MUTED = false; +``` + +### NOCLIP + +If true, player can pass through the walls + +```js +Native.PlayerAbility.NOCLIP = false; +``` + +### OPEN_CONTAINERS + +Whether the player can interact with chests and other containers + +```js +Native.PlayerAbility.OPEN_CONTAINERS = true; +``` + +### OPERATOR_COMMANDS + +Whether the player can use operator commands + +```js +Native.PlayerAbility.OPERATOR_COMMANDS = true; +``` + +### TELEPORT + +Whether the player can use teleportation commands + +```js +Native.PlayerAbility.TELEPORT = true; +``` + +### WALKSPEED + +The speed at which the player walks + +```js +Native.PlayerAbility.WALKSPEED = 0.05; +``` + +### WORLDBUILDER + +True, if player can use worldbuilder command (education edition only) + +```js +Native.PlayerAbility.WORLDBUILDER = false; +``` diff --git a/docs/ru/page/guides/world/biomes.md b/docs/ru/page/guides/world/biomes.md new file mode 100644 index 000000000..5f770e0c0 --- /dev/null +++ b/docs/ru/page/guides/world/biomes.md @@ -0,0 +1,47 @@ +## Biome Map + +Biome map is a way Minecraft generates biomes. In fact, biome map is a two-dimensional array of biome ids inside every chunk. + +To be able to change this map, _GenerateBiomeMap_ callback is called after the landscape generation is performed and before cover and decorations generation. See {@page Callbacks} for details. Inside this callback you should call [[World.setBiomeMap]] to set biome on the coordinates and [[World.getBiomeMap]] to retrieve one. Note that these methods are available only inside _GenerateBiomeMap_ callback. Also, you should pass coordinates inside the specified chunk. The coordinates should be inside these bounds: + +```js +var minX = chunkX * 16; +var minZ = chunkZ * 16; +var maxX = (chunkX + 1) * 16 - 1; +var maxZ = (chunkZ + 1) * 16 - 1; +``` + +## Using Perlin Noise for biome generation + +To generate biome map, use [[GenerationUtils.getPerlinNoise]] method. Let's take a closer look at the example of biome generation: + +```js +Callback.addCallback('GenerateBiomeMap', function (chunkX, chunkZ, random, dimensionId, chunkSeed, worldSeed, dimensionSeed) { + // Generate only in the overworld + if (dimensionId != 0) { + return; + } + + // Verify if we can skip this biome + if (GenerationUtils.getPerlinNoise(chunkX * 16 + 8, 0, chunkZ * 16 + 8, dimensionSeed, 1 / 128, 2) < 0.7 - 12 / 128) { + return; + } + + // Change biome map according to current perlin noise + for (var x = chunkX * 16; x < (chunkX + 1) * 16; x++) { + for (var z = chunkZ * 16; z < (chunkZ + 1) * 16; z++) { + if (GenerationUtils.getPerlinNoise(x, 0, z, dimensionSeed, 1 / 128, 2) > 0.7) { + World.setBiomeMap(x, z, myCustomBiome.id); + } + } + } +}); +``` + +For each block of the biome we verify that the value of Perlin noise is larger then some constant value (we call it _generation threshold_). If the condition is evaluated to _true_, we set the biome on the specified coordinates to our biome's id. + +We use 2-octave Perlin noise for this generation with octave size of 128. It is the most convenient way to generate cool vanilla-like biomes. If you use more octaves, the edges of the biome will be more torn, otherwise more smooth. Changing octaves size will increase or decrease biome size. To control biome density, change generation threshold. + +An optimization is also performed before going to the time-consuming loop. We take a block from the center of the chunk and verify if Perlin noise value at the point it is larger then `T - 12/size` where T is biome generation threshold and size is the scale of the larger octave. + +You can add any additional conditions to your code, e.g. generating only inside existing Minecraft biome. Then you'll need to add an additional check inside your code. diff --git a/docs/ru/page/guides/world/dimensions.md b/docs/ru/page/guides/world/dimensions.md new file mode 100644 index 000000000..09cfe6af8 --- /dev/null +++ b/docs/ru/page/guides/world/dimensions.md @@ -0,0 +1,252 @@ +To understand better the process of creating new dimensions with custom generation, let's look through a couple of examples. To simplify the task of creating dimension generator, take a look at [Inner Core Dimension Editor](https://editor.p5js.org/zheka2304/present/kJmbShOU2). + +## Creating a Custom Dimension + +```js +var dimension = new Dimensions.CustomDimension('CustomDimension', 33); +// Some additional dimension setup, +// e.g. setting some of the environment colors: +dimension.setSunsetColor(0.2, 1, 0.7); +``` + +Here we just create a new dimension. To teleport the player to your dimension, use the [[Dimensions.transfer]] method, e.g.: + +```js +Callback.addCallback('ItemUse', function (coords, item) { + // If player uses a stick + if (item.id == 280) { + Dimensions.transfer(Player.get(), Player.getDimension() == 0 ? dimension.id : 0); + } +}); +``` + +## Superflat Generation + +```js +var generator = Dimensions.newGenerator({ + layers: [ + { + minY: 0, + maxY: 64, + material: { + base: 1, + cover: 2, + surface: { + id: 3, + width: 5, + }, + }, + }, + ], +}); +dimension.setGenerator(generator); +``` + +In this minimalistic example we are creating a single generation layer between y = 0 and y = 64, using stone as the base material. We also use grass and dirt to build the upper part of the generation. Since we are not creating any noise explicitly, a default solid noise octave is created. To specify some of the properties of the octave, we should either explicitly create one in the `octaves` property or just specify the required properties in our layer's description object. + +## Single Layer Generation + +![Generation Example #1](../../../../images/dimensions-1.jpg) + +```js +var generator = Dimensions.newGenerator({ + layers: [ + { + minY: 0, + maxY: 128, + yConversion: [ + [0, 0.5], + [1, -0.5], + ], + material: { base: 1 }, + noise: { + octaves: { count: 4, scale: 40 }, + }, + }, + ], +}); +dimension.setGenerator(generator); +``` + +In this example we generate a layer between 0 and 128. `octaves` property contains an object that is treated as parameterized description of the octaves to be generated. See [[Dimensions.NoiseLayerParams]] for parameter details and default values. Every noise octave is generated using the following formulas: + +```js +// Pre-calculated parameter +var mul = (2 * ((1 << count) - 1)) / (1 << count); +var seed = 0; + +// For every of the count octaves +var octave = { + scale: { x: 1 / scale.x, y: 1 / scale.y, z: 1 / scale.z }, + weight: weight / mul, + seed, +}; +scale.x /= scale_factor.x; +scale.y /= scale_factor.y; +scale.z /= scale_factor.z; +mul *= weight_factor; +``` + +Thus, the `octaves: {count: 4, scale: 40}` gets transformed into: + +```js +octaves: { + { scale: 0.025, weight: 0.5333, seed: 0 }, + { scale: 0.05, weight: 0.2667, seed: 1 }, + { scale: 0.1, weight: 0.1333, seed: 2 }, + { scale: 0.2, weight: 0.0667, seed: 3 } +} +``` + +`yConversion` is a function that transforms the landscape in the Y direction. Basically, it is the density of landscape at the specified Y position. It is specified as a set of points (x, y), and the values between these points get interpolated. X values generally should be between 0 and 1, and y values between -0.5 and 0.5. + +```js +yConversion: [ + [0, 0.5], + [1, -0.5], +] +``` + +Creates a landscape where most of the blocks are concentrated in the bottom part of the layer: + +![Generation Example #2](../../../../images/dimensions-2.jpg) + +```js +yConversion: [ + [0, 0.5], + [0.5, -0.5], + [1, 0.5], +] +``` + +Creates a landscape where most of the blocks are concentrated in the bottom and the top parts of the layer, leaving the middle empty: + +![Generation Example #3](../../../../images/dimensions-3.jpg) + +```js +yConversion: [ + [0, 0.5], + [0.25, -0.3], + [0.5, 0.3], + [0.75, -0.3], + [1, 0.5], +] +``` + +Creates a more complex landscape like the one displayed on the image: + +![Generation Example #4](../../../../images/dimensions-4.jpg) + +## Dimension Materials + +![Generation Example #5](../../../../images/dimensions-5.jpg) + +```js +var generator = Dimensions.newGenerator({ + layers: [ + { + minY: 0, + maxY: 128, + yConversion: [ + [0, 1], + [0.6, -0.2], + [1, -1], + ], + noise: { octaves: { count: 4, scale: 50, weight: 0.5 } }, + debug: 'none', + heightmap: { + octaves: [ + { type: 'sine_xz', scale: 1 / 15, weight: 0.5 }, + { scale: 1 / 2, weight: 0.1 }, + { scale: 1 / 20, weight: 0.5 }, + ], + }, + material: { base: 1 }, + materials: [ + { + base: 3, + diffuse: 0.1, + noise: { + octaves: [ + { scale: 0.1, weight: 0.6 }, + { scale: 0.2, weight: 0.3 }, + ], + }, + }, + ], + }, + ], +}); +dimension.setGenerator(generator); +``` + +In this example there are two noticeable facts: non-perlin octave usage (see [[NoiseOctave.constructor]] for details) and using materials noise. + +Non-perlin octaves allow for creating some interesting landscapes, though you should be careful not to generate a poorly mathematical landscape that will repeat itself all the time. + +Materials noise can be used for single generation layer to consist of blocks of different types. In our example we use dirt as a second material and generate perlin noise to determine its propagation. + +## Multilayer Generation + +When you need a more complex generation, you can use multiple layers. Layers are generated in the order they were listed in the description object, so you should want to generate a water layer at first. Let's take a look at some example: + +![Generation Example #6](../../../../images/dimensions-6.jpg) + +```js +var generator = Dimensions.newGenerator({ + layers: [ + { + minY: 0, + maxY: 64, + material: { base: 8 }, + }, + { + minY: 0, + maxY: 128, + yConversion: [ + [0, 1], + [1, -1], + ], + material: { base: 2, cover: 2 }, + noise: { + octaves: { count: 5, scale: 150 }, + }, + }, + { + minY: 0, + maxY: 180, + yConversion: [ + [0, 0.5], + [0.6, -0.5], + [1, -1], + ], + material: { base: 1 }, + noise: { + octaves: { count: 2, scale: 70, seed: 100 }, + }, + heightmap: { + octaves: { count: 3, scale: 600 }, + conversion: [ + [0, 0.5], + [1, -0.5], + ], + }, + }, + ], +}); +dimension.setGenerator(generator); +``` + +In this example we have three layers of generation: + +- Solid water layer at the height of 64 +- Grass layer with cover, a base landscape +- Stone layer, a mountainous landscape with an additional heightmap + +Heightmap is a 2-dimensional (x, z) noise that is used to generate a general height scheme of the layer. In our example it is used to generate mountains only time to time. Note that we use 1 and -1 as values of `yConversion` function of grass layer to make the landscape more flat. + +To make mountains less rounded, we can change the count of octaves of the stone layer. Say, we had 6 octaves in the stone layer, the generation should look like this: + +![Generation Example #7](../../../../images/dimensions-7.jpg) + +However, you should always think twice before adding a lot of octaves and layers. Massive generation requires more time for calculations, so it is generally better to use layer conversions and heightmap of the existing layer then create multiple layers with more noise octaves. diff --git a/documentation/static/en/page/lib/DungeonUtility.md b/docs/ru/page/lib/DungeonUtility.md similarity index 52% rename from documentation/static/en/page/lib/DungeonUtility.md rename to docs/ru/page/lib/DungeonUtility.md index 60aef65cf..a818b6c02 100644 --- a/documentation/static/en/page/lib/DungeonUtility.md +++ b/docs/ru/page/lib/DungeonUtility.md @@ -1 +1 @@ -[DungeonUtility](https://raw.githubusercontent.com/Reider745/libs/main/mod_documentation_api/DungeonUtility.md ':include') \ No newline at end of file +[DungeonUtility](https://raw.githubusercontent.com/Reider745/libs/main/mod_documentation_api/DungeonUtility.md ':include') diff --git a/docs/ru/page/other/contributing.md b/docs/ru/page/other/contributing.md new file mode 100644 index 000000000..e36e255d6 --- /dev/null +++ b/docs/ru/page/other/contributing.md @@ -0,0 +1,10 @@ +If you wish to help us improve articles and documentation, fork the documentation's [GitHub repository](https://github.com/mineprogramming/innercore-docs). +All the required information about how to build the documentation can be found in repository's README.md file. + +## Minor Fixes + +If you found any minor mistake, you can notify me via: + ++ E-mail: Ih01@i.ua ++ VK: [@igormelikhov](https://vk.com/igormelikhov) ++ Telegram: [@ichzerowan](https://t.me/ichzerowan) diff --git a/docs/ru/page/other/create-page.md b/docs/ru/page/other/create-page.md new file mode 100644 index 000000000..17c78df8f --- /dev/null +++ b/docs/ru/page/other/create-page.md @@ -0,0 +1,83 @@ +Before we start writing your mod page, we need to learn about Markdown format. +You can goto [this article](https://www.markdownguide.org/getting-started/) to learn what is Markdown. +And [this article](https://www.markdownguide.org/basic-syntax/) to learn basic markdown syntax. + +After learning about Markdown format, you can start writing your pages. + +## Where we are + +Before do anything determine what page will be created and which language(s) must included. + +Every page at documentation described in markdown at *documentation/static/\* folder. + +```txt + +├─ README.md (index of current language, or nothing) +├─ page (most interesting thing, markdown content) +│ ├─ apps (layout, e.g. Horizon and Inner Core) +│ ├─ guides (here placed everything about our game, e.g. attributes) +│ ├─ lib (your (as developer) libraries) +│ ├─ mod (your (as developer) template mods) +│ └─ other (such as contributing guides, exclusive to maintainers) +└─ config (routing for your pages, docsify configuration) + ├─ _sidebar.md (sidebar to left of content, navigation) + └─ _navbar.md (e.g. switching between languages) +``` + +> Required folder that will be used to documentation doesn't appears here? Contact with maintainers to submit new location. + +## Writing new content + +Just create new markdown at *documentation/static/\/page/\/\.md* and here we set. + +```md +Library — is the most common part of modding, it usage is very simple and sweet. + +## IMPORT + +How to `IMPORT` actually does work? +Dependencies will be resolved, repository with them automatically appears in your code. +Include .d.ts into your *declarations/* and everything is set! +``` + +Additionally or otherwise, you can simply include existing external guide. It may be more handly than updating your guide every time. + +```md +[REPOSITORY](https://raw.githubusercontent.com/AUTHOR/REPOSITORY/master/README.md ':include') +``` + +Some attentions before anything will be pull-requested: + +1. Corresponding markdown must be categorized by [description above](#where-we-are). +2. Do not use directly route to external content, links must be appeared only on page. +3. Mod template / library page may exists only once, few occupants is not allowed. +4. Use `:include` in markdown only when you need include relative content or describe your mod template / library. Guides must be remain in this repository, to just build and use locally as documentation. + +## Creating routes for your pages + +Configuration will be performed with corresponding *documentation/static/\/config/_sidebar.md* markdown. Do not change existing pathes, it already used as url location and can be accessed from another site. + +You can just use already created template below, or copy-paste existing markdown entry. + +### Inner Core or Minecraft Guide + +```md + Category + - [Guide 1](/en/page/guides/category/guide.md) + - [Advanced Guide 2](/en/page/guides/category/complex-guide.md) + +- [Category Page](/en/page/guides/new-category/index.md) + - [Another Guide](/en/page/guides/new-category/another-guide.md) +``` + +### Library page + +```md + - [BackpackAPI](/en/page/lib/BackpackAPI.md) +``` + +### Mod template + +```md + - [IndustrialCraft](/en/page/mod/IndustrialCraft2.md) +``` diff --git a/documentation/static/src/docsify-v4.js b/docs/src/docsify.min.js similarity index 99% rename from documentation/static/src/docsify-v4.js rename to docs/src/docsify.min.js index e9b32ee76..eef06bd79 100644 --- a/documentation/static/src/docsify-v4.js +++ b/docs/src/docsify.min.js @@ -1 +1 @@ -!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]=n(e))}}var o=s(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),l=Object.prototype.hasOwnProperty,y=Object.assign||function(e){for(var t=arguments,n=1;n/gm),it=Q(/^data-[\-\w.\u00B7-\uFFFF]/),ot=Q(/^aria-[\-\w]+$/),at=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),st=Q(/^(?:\w+script|data):/i),lt=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ut(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t/i,t))xe(o,e);else{W&&(t=De(t,F," "),t=De(t,C," "));var l=e.nodeName.toLowerCase();if(Re(l,s,t))try{a?e.setAttributeNS(a,o,t):e.setAttribute(o,t),Le(c.removed)}catch(e){}}}Te("afterSanitizeAttributes",e,null)}}function $e(e){var t,n=Se(e);for(Te("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)Te("uponSanitizeShadowNode",t,null),Ee(t)||(t.content instanceof u&&$e(t.content),Oe(t));Te("afterSanitizeShadowDOM",e,null)}return c.sanitize=function(e,t){var n,r=void 0,i=void 0,o=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw He("toString is not a function");if("string"!=typeof(e=e.toString()))throw He("dirty is not a string, aborting")}if(!c.isSupported){if("object"===ct(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(Ae(e))return s.toStaticHTML(e.outerHTML)}return e}if(Y||O(t),c.removed=[],"string"==typeof e&&(re=!1),!re)if(e instanceof p)1===(t=(r=_e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?r=t:r.appendChild(t);else{if(!K&&!W&&!V&&-1===e.indexOf("<"))return k&&ee?k.createHTML(e):e;if(!(r=_e(e)))return K?null:w}r&&X&&we(r.firstChild);for(var a=Se(re?e:r);n=a.nextNode();)3===n.nodeType&&n===i||Ee(n)||(n.content instanceof u&&$e(n.content),Oe(n),i=n);if(i=null,re)return e;if(K){if(Q)for(o=S.call(r.ownerDocument);r.firstChild;)o.appendChild(r.firstChild);else o=r;return J&&(o=T.call(l,o,!0)),o}return e=V?r.outerHTML:r.innerHTML,W&&(e=De(e,F," "),e=De(e,C," ")),k&&ee?k.createHTML(e):e},c.setConfig=function(e){O(e),Y=!0},c.clearConfig=function(){ge=null,Y=!1},c.isValidAttribute=function(e,t,n){return ge||O({}),e=Ne(e),t=Ne(t),Re(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],ze(R[e],t))},c.removeHook=function(e){R[e]&&Le(R[e])},c.removeHooks=function(e){R[e]&&(R[e]=[])},c.removeAllHooks=function(){R={}},c}();function se(e){var t,n=e.loaded,r=e.total,i=e.step;ie||((e=v("div")).classList.add("progress"),a(g,e),ie=e),t=i?80<(t=parseInt(ie.style.width||0,10)+i)?80:t:Math.floor(n/r*100),ie.style.opacity=1,ie.style.width=95<=t?"100%":t+"%",95<=t&&(clearTimeout(oe),oe=setTimeout(function(e){ie.style.opacity=0,ie.style.width="0%"},200))}var le={};function ce(i,e,t){void 0===e&&(e=!1),void 0===t&&(t={});function o(){a.addEventListener.apply(a,arguments)}var n,a=new XMLHttpRequest,r=le[i];if(r)return{then:function(e){return e(r.content,r.opt)},abort:u};for(n in a.open("GET",i),t)l.call(t,n)&&a.setRequestHeader(n,t[n]);return a.send(),{then:function(t,n){var r;void 0===n&&(n=u),e&&(r=setInterval(function(e){return se({step:Math.floor(5*Math.random()+1)})},500),o("progress",se),o("loadend",function(e){se(e),clearInterval(r)})),o("error",n),o("load",function(e){e=e.target;400<=e.status?n(e):(e=le[i]={content:e.response,opt:{updatedAt:a.getResponseHeader("last-modified")}},t(e.content,e.opt))})},abort:function(e){return 4!==a.readyState&&a.abort()}}}function ue(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}var pe=f.title;function he(){var e,t=d("section.cover");t&&(e=t.getBoundingClientRect().height,window.pageYOffset>=e||t.classList.contains("hidden")?S(g,"add","sticky"):S(g,"remove","sticky"))}function de(e,t,r,n){var i=[];null!=(t=d(t))&&(i=k(t,"a"));var o,a=decodeURI(e.toURL(e.getCurrentPath()));return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=decodeURI(e.getAttribute("href")),n=r?e.parentNode:e;e.title=e.title||e.innerText,0!==a.indexOf(t)||o?S(n,"remove","active"):(o=e,S(n,"add","active"))}),n&&(f.title=o?o.title||o.innerText+" - "+pe:pe),o}function fe(e,t){for(var n=0;nthis.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}}]),be);function be(){var e=0l){t=t||p;break}t=p}!t||(n=xe[Re(e,t.getAttribute("data-id"))])&&n!==a&&(a&&a.classList.remove("active"),n.classList.add("active"),a=n,!_e&&g.classList.contains("sticky")&&(s=r.clientHeight,e=a.offsetTop+a.clientHeight+40,n=a.offsetTop>=o.scrollTop&&e<=o.scrollTop+s,a=+e"']/),yt=/[&<>"']/g,bt=/[<>"']|&(?!#?\w+;)/,kt=/[<>"']|&(?!#?\w+;)/g,wt={"&":"&","<":"<",">":">",'"':""","'":"'"};var xt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function _t(e){return e.replace(xt,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var St=/(^|[^\[])\^/g;var At=/[^\w:]/g,Tt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Et={},Rt=/^[^:]+:\/*[^/]*$/,Ot=/^([^:]+:)[\s\S]*$/,$t=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ft(e,t){Et[" "+e]||(Rt.test(e)?Et[" "+e]=e+"/":Et[" "+e]=Ct(e,"/",!0));var n=-1===(e=Et[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Ot,"$1")+t:"/"===t.charAt(0)?n?t:e.replace($t,"$1")+t:e+t}function Ct(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;it)n.splice(t);else for(;n.length>=1,e+=e;return n+e},jt=mt.defaults,Ht=Ct,qt=It,Ut=Lt,Bt=I;function Zt(e,t,n){var r=t.href,i=t.title?Ut(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:t}:{type:"image",raw:n,href:r,title:i,text:Ut(t)}}var Gt=function(){function e(e){this.options=e||jt}return e.prototype.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1=n.length?e.slice(n.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:e}}},e.prototype.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();return/#$/.test(n)&&(e=Ht(n,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(n=e.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:n}}},e.prototype.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var t={type:"table",header:qt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){for(var n=t.align.length,r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}},e.prototype.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var t,n,r,i,o,a=e[0],s=e[2],l=1d[1].length:r[1].length>d[0].length||3/i.test(e[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]}},e.prototype.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;e=Ht(n.slice(0,-1),"\\");if((n.length-e.length)%2==0)return}else{var r=Bt(t[2],"()");-1$/.test(n)?r.slice(1):r.slice(1,-1)),Zt(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},e.prototype.reflink=function(e,t){if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){e=(n[2]||n[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return Zt(n,e,n[0]);var n=n[0].charAt(0);return{type:"text",raw:n,text:n}}},e.prototype.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},e.prototype.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},e.prototype.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),e=/^ /.test(n)&&/ $/.test(n);return r&&e&&(n=n.substring(1,n.length-1)),n=Ut(n,!0),{type:"codespan",raw:t[0],text:n}}},e.prototype.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},e.prototype.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},e.prototype.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var n,t="@"===e[2]?"mailto:"+(n=Ut(this.options.mangle?t(e[1]):e[1])):n=Ut(e[1]);return{type:"link",raw:e[0],text:n,href:t,tokens:[{type:"text",raw:n,text:n}]}}},e.prototype.url=function(e,t){var n,r,i,o;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=Ut(this.options.mangle?t(n[0]):n[0]));else{for(;o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],o!==n[0];);r=Ut(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.prototype.inlineText=function(e,t,n){e=this.rules.inline.text.exec(e);if(e){n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]:Ut(this.options.smartypants?n(e[0]):e[0]);return{type:"text",raw:e[0],text:n}}},e}(),It=Dt,I=Nt,Dt=Pt,Nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:It,table:It,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Nt.def=I(Nt.def).replace("label",Nt._label).replace("title",Nt._title).getRegex(),Nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Nt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Nt.item=I(Nt.item,"gm").replace(/bull/g,Nt.bullet).getRegex(),Nt.listItemStart=I(/^( *)(bull)/).replace("bull",Nt.bullet).getRegex(),Nt.list=I(Nt.list).replace(/bull/g,Nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Nt.def.source+")").getRegex(),Nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nt._comment=/|$)/,Nt.html=I(Nt.html,"i").replace("comment",Nt._comment).replace("tag",Nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nt.paragraph=I(Nt._paragraph).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.blockquote=I(Nt.blockquote).replace("paragraph",Nt.paragraph).getRegex(),Nt.normal=Dt({},Nt),Nt.gfm=Dt({},Nt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Nt.gfm.nptable=I(Nt.gfm.nptable).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.gfm.table=I(Nt.gfm.table).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.pedantic=Dt({},Nt.normal,{html:I("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:It,paragraph:I(Nt.normal._paragraph).replace("hr",Nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});It={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:It,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:It,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};It.punctuation=I(It.punctuation).replace(/punctuation/g,It._punctuation).getRegex(),It._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",It._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",It._comment=I(Nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),It.em.start=I(It.em.start).replace(/punctuation/g,It._punctuation).getRegex(),It.em.middle=I(It.em.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.em.endAst=I(It.em.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.em.endUnd=I(It.em.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.start=I(It.strong.start).replace(/punctuation/g,It._punctuation).getRegex(),It.strong.middle=I(It.strong.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.strong.endAst=I(It.strong.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.endUnd=I(It.strong.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.blockSkip=I(It._blockSkip,"g").getRegex(),It.overlapSkip=I(It._overlapSkip,"g").getRegex(),It._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,It._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,It._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,It.autolink=I(It.autolink).replace("scheme",It._scheme).replace("email",It._email).getRegex(),It._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,It.tag=I(It.tag).replace("comment",It._comment).replace("attribute",It._attribute).getRegex(),It._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,It._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,It._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,It.link=I(It.link).replace("label",It._label).replace("href",It._href).replace("title",It._title).getRegex(),It.reflink=I(It.reflink).replace("label",It._label).getRegex(),It.reflinkSearch=I(It.reflinkSearch,"g").replace("reflink",It.reflink).replace("nolink",It.nolink).getRegex(),It.normal=Dt({},It),It.pedantic=Dt({},It.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",It._label).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It._label).getRegex()}),It.gfm=Dt({},It.normal,{escape:I(It.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\'+(n?e:nn(e,!0))+"\n":"
"+(n?e:nn(e,!0))+"
\n"},e.prototype.blockquote=function(e){return"
\n"+e+"
\n"},e.prototype.html=function(e){return e},e.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},e.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},e.prototype.checkbox=function(e){return" "},e.prototype.paragraph=function(e){return"

    "+e+"

    \n"},e.prototype.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},e.prototype.tablerow=function(e){return"\n"+e+"\n"},e.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},e.prototype.strong=function(e){return""+e+""},e.prototype.em=function(e){return""+e+""},e.prototype.codespan=function(e){return""+e+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(e){return""+e+""},e.prototype.link=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;e='"},e.prototype.image=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;n=''+n+'":">"},e.prototype.text=function(e){return e},e}(),on=function(){function e(){}return e.prototype.strong=function(e){return e},e.prototype.em=function(e){return e},e.prototype.codespan=function(e){return e},e.prototype.del=function(e){return e},e.prototype.html=function(e){return e},e.prototype.text=function(e){return e},e.prototype.link=function(e,t,n){return""+n},e.prototype.image=function(e,t,n){return""+n},e.prototype.br=function(){return""},e}(),an=function(){function e(){this.seen={}}return e.prototype.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.prototype.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},e.prototype.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),sn=mt.defaults,ln=zt,cn=function(){function n(e){this.options=e||sn,this.options.renderer=this.options.renderer||new rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new on,this.slugger=new an}return n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)},n.prototype.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,o,a,s,l,c,u,p,h,d,f,g,m,v="",y=e.length,b=0;bAn error occurred:

    "+hn(e.message+"",!0)+"
    ";throw e}}fn.options=fn.setOptions=function(e){return un(fn.defaults,e),dn(fn.defaults),fn},fn.getDefaults=Lt,fn.defaults=mt,fn.use=function(o){var t,e=un({},o);if(o.renderer){var n,a=fn.defaults.renderer||new rn;for(n in o.renderer)!function(r){var i=a[r];a[r]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.renderer[r].apply(a,e);return!1===n&&(n=i.apply(a,e)),n}}(n);e.renderer=a}if(o.tokenizer){var i,s=fn.defaults.tokenizer||new Gt;for(i in o.tokenizer)!function(){var r=s[i];s[i]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.tokenizer[i].apply(s,e);return!1===n&&(n=r.apply(s,e)),n}}();e.tokenizer=s}o.walkTokens&&(t=fn.defaults.walkTokens,e.walkTokens=function(e){o.walkTokens(e),t&&t(e)}),fn.setOptions(e)},fn.walkTokens=function(e,t){for(var n=0,r=e;nAn error occurred:

    "+hn(e.message+"",!0)+"
    ";throw e}},fn.Parser=cn,fn.parser=cn.parse,fn.Renderer=rn,fn.TextRenderer=on,fn.Lexer=Jt,fn.lexer=Jt.lex,fn.Tokenizer=Gt,fn.Slugger=an;var gn=fn.parse=fn;function mn(e,n){if(void 0===n&&(n='
      {inner}
    '),!e||!e.length)return"";var r="";return e.forEach(function(e){var t=e.title.replace(/(<([^>]+)>)/g,"");r+='
  • '+e.title+"
  • ",e.children&&(r+=mn(e.children,n))}),n.replace("{inner}",r)}function vn(e,t){return'

    '+t.slice(5).trim()+"

    "}function yn(e,r){var i=[],o={};return e.forEach(function(e){var t=e.level||1,n=t-1;r?@[\]^`{|}~]/g;function wn(e){return e.toLowerCase()}function xn(e){if("string"!=typeof e)return"";var t=e.trim().replace(/[A-Z]+/g,wn).replace(/<[^>]+>/g,"").replace(kn,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),e=bn[t],e=l.call(bn,t)?e+1:0;return(bn[t]=e)&&(t=t+"-"+e),t}function _n(e,t){return''+t+''}function Sn(e){void 0===e&&(e="");var r={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,t,n){return-1===t.indexOf(":")?(r[t]=n&&n.replace(/"/g,"")||!0,""):e}).trim(),config:r}}function An(e){return void 0===e&&(e=""),e.replace(/(<\/?a.*?>)/gi,"")}xn.clear=function(){bn={}};var Tn,En=ft(function(e){var a,s,l,c,u,r,t,i=function(l){var c=/\blang(?:uage)?-([\w-]+)\b/i,t=0,$={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof F?new F(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=a.reach);y+=v.value.length,v=v.next){var b=v.value;if(n.length>t.length)return;if(!(b instanceof F)){var k,w=1;if(f){if(!(k=C(m,y,t,d)))break;var x=k.index,_=k.index+k[0].length,S=y;for(S+=v.value.length;S<=x;)v=v.next,S+=v.value.length;if(S-=v.value.length,y=S,v.value instanceof F)continue;for(var A=v;A!==n.tail&&(S<_||"string"==typeof A.value);A=A.next)w++,S+=A.value.length;w--,b=t.slice(y,S),k.index-=y}else if(!(k=C(m,0,b,d)))continue;var x=k.index,T=k[0],E=b.slice(0,x),R=b.slice(x+T.length),O=y+b.length;a&&O>a.reach&&(a.reach=O);var b=v.prev;E&&(b=L(n,b,E),y+=E.length),z(n,b,w);var T=new F(s,h?$.tokenize(T,h):T,g,T);v=L(n,b,T),R&&L(n,v,R),1"+i.content+""},!l.document)return l.addEventListener&&($.disableWorkerMessageHandler||l.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,e=t.code,t=t.immediateClose;l.postMessage($.highlight(e,$.languages[n],n)),t&&l.close()},!1)),$;var e,n=$.util.currentScript();function r(){$.manual||$.highlightAll()}return n&&($.filename=n.src,n.hasAttribute("data-manual")&&($.manual=!0)),$.manual||("loading"===(e=document.readyState)||"interactive"===e&&n&&n.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),$}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});function p(e,t){var n=(n=e.className).replace(r," ")+" language-"+t;e.className=n.replace(/\s+/g," ").trim()}e.exports&&(e.exports=i),void 0!==dt&&(dt.Prism=i),i.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;n={"included-cdata":{pattern://i,inside:n}};n["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};t={};t[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},i.languages.insertBefore("markup","cdata",t)}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},t.tag))}(i),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),a=window.Prism,s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="pre[data-src]:not(["+(l="data-src-status")+'="loaded"]):not(['+l+'="'+(c="loading")+'"])',r=/\blang(?:uage)?-([\w-]+)\b/i,a.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),a.hooks.add("before-sanity-check",function(e){var t,n,r,i,o=e.element;o.matches(u)&&(e.code="",o.setAttribute(l,c),(t=o.appendChild(document.createElement("CODE"))).textContent="Loading…",n=o.getAttribute("data-src"),"none"===(e=e.language)&&(r=(/\.(\w+)$/.exec(n)||[,"none"])[1],e=s[r]||r),p(t,e),p(o,e),(r=a.plugins.autoloader)&&r.loadLanguages(e),(i=new XMLHttpRequest).open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(o.setAttribute(l,"loaded"),t.textContent=i.responseText,a.highlightElement(t)):(o.setAttribute(l,"failed"),400<=i.status?t.textContent="✖ Error "+i.status+" while fetching file: "+i.statusText:t.textContent="✖ Error: File does not exist or is empty"))},i.send(null))}),t=!(a.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(u),r=0;t=n[r++];)a.highlightElement(t)}}),a.fileHighlight=function(){t||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),t=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)})});function Rn(e,t){return"___"+e.toUpperCase()+t+"___"}Tn=Prism,Object.defineProperties(Tn.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,e,o){var a;r.language===i&&(a=r.tokenStack=[],r.code=r.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var t,n=a.length;-1!==r.code.indexOf(t=Rn(i,n));)++n;return a[n]=e,t}),r.grammar=Tn.languages.markup)}},tokenizePlaceholders:{value:function(c,u){var p,h;c.language===u&&c.tokenStack&&(c.grammar=Tn.languages[u],p=0,h=Object.keys(c.tokenStack),function e(t){for(var n=0;n=h.length);n++){var r,i,o,a,s,l=t[n];"string"==typeof l||l.content&&"string"==typeof l.content?(i=h[p],o=c.tokenStack[i],r="string"==typeof l?l:l.content,s=Rn(u,i),-1<(a=r.indexOf(s))&&(++p,i=r.substring(0,a),o=new Tn.Token(u,Tn.tokenize(o,c.grammar),"language-"+u,o),a=r.substring(a+s.length),s=[],i&&s.push.apply(s,e([i])),s.push(o),a&&s.push.apply(s,e([a])),"string"==typeof l?t.splice.apply(t,[n,1].concat(s)):l.content=s)):l.content&&e(l.content)}return t}(c.tokens))}}});function On(i,e){var o=this;this.config=i,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=i.externalLinkTarget||"_blank",this.linkRel="_blank"===this.linkTarget?i.externalLinkRel||"noopener":"",this.contentBase=e.getBasePath();var t=this._initRenderer();this.heading=t.heading;var a=r(e=i.markdown||{})?e(gn,t):(gn.setOptions(y(e,{renderer:y(t,e.renderer)})),gn);this._marked=a,this.compile=function(n){var r=!0,e=s(function(e){r=!1;var t="";return n?(t=c(n)?a(n):a.parser(n),t=i.noEmoji?t:t.replace(/:\+1:/g,":thumbsup:").replace(/:-1:/g,":thumbsdown:").replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||_n).replace(/__colon__/g,":"),xn.clear(),t):n})(n),t=o.router.parse().file;return r?o.toc=o.cacheTOC[t]:o.cacheTOC[t]=[].concat(o.toc),e}}var $n={},Fn={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,t){return{html:'"}},video:function(e,t){return{html:'"}},audio:function(e,t){return{html:'"}},code:function(e,t){var n=e.match(/\.(\w+)$/);return"md"===(n=t||n&&n[1])&&(n="markdown"),{url:e,lang:n}}};On.prototype.compileEmbed=function(e,t){var n,r,i=Sn(t),o=i.str,i=i.config;if(t=o,i.include)return O(e)||(e=N(this.contentBase,F(this.router.getCurrentPath()),e)),i.type&&(r=Fn[i.type])?(n=r.call(this,e,t)).type=i.type:(r="code",/\.(md|markdown)/.test(e)?r="markdown":/\.mmd/.test(e)?r="mermaid":/\.html?/.test(e)?r="iframe":/\.(mp4|ogg)/.test(e)?r="video":/\.mp3/.test(e)&&(r="audio"),(n=Fn[r].call(this,e,t)).type=r),n.fragment=i.fragment,n},On.prototype._matchNotCompileLink=function(e){for(var t=this.config.noCompileLinks||[],n=0;n/g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore} --\x3e",""),e.title=An(r),e.ignoreSubHeading=!0),/{docsify-ignore}/g.test(r)&&(r=r.replace("{docsify-ignore}",""),e.title=An(r),e.ignoreSubHeading=!0),//g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),e.title=An(r),e.ignoreAllSubs=!0),/{docsify-ignore-all}/g.test(r)&&(r=r.replace("{docsify-ignore-all}",""),e.title=An(r),e.ignoreAllSubs=!0);n=xn(i.id||r),i=o.toURL(o.getCurrentPath(),{id:n});return e.slug=i,h.toc.push(e),"'+r+""},i.code={renderer:e}.renderer.code=function(e,t){void 0===t&&(t="markup");var n=En.languages[t]||En.languages.markup;return'
    '+En.highlight(e.replace(/@DOCSIFY_QM@/g,"`"),n,t)+"
    "},i.link=(n=(t={renderer:e,router:o,linkTarget:t,linkRel:n,compilerClass:h}).renderer,a=t.router,s=t.linkTarget,l=t.linkRel,c=t.compilerClass,n.link=function(e,t,n){void 0===t&&(t="");var r=[],i=Sn(t),o=i.str,i=i.config;return s=i.target||s,l="_blank"===s?c.config.externalLinkRel||"noopener":"",t=o,O(e)||c._matchNotCompileLink(e)||i.ignore?(O(e)||"./"!==e.slice(0,2)||(e=document.URL.replace(/\/(?!.*\/).*/,"/").replace("#/./","")+e),r.push(0===e.indexOf("mailto:")?"":'target="'+s+'"'),r.push(0!==e.indexOf("mailto:")&&""!==l?' rel="'+l+'"':"")):(e===c.config.homepage&&(e="README"),e=a.toURL(e,null,a.getCurrentPath())),i.crossorgin&&"_self"===s&&"history"===c.config.routerMode&&-1===c.config.crossOriginLinks.indexOf(e)&&c.config.crossOriginLinks.push(e),i.disabled&&(r.push("disabled"),e="javascript:void(0)"),i.class&&r.push('class="'+i.class+'"'),i.id&&r.push('id="'+i.id+'"'),t&&r.push('title="'+t+'"'),'"+n+""}),i.paragraph={renderer:e}.renderer.paragraph=function(e){e=/^!>/.test(e)?vn("tip",e):/^\?>/.test(e)?vn("warn",e):"

    "+e+"

    ";return e},i.image=(r=(n={renderer:e,contentBase:r,router:o}).renderer,u=n.contentBase,p=n.router,r.image=function(e,t,n){var r=e,i=[],o=Sn(t),a=o.str,o=o.config;return t=a,o["no-zoom"]&&i.push("data-no-zoom"),t&&i.push('title="'+t+'"'),o.size&&(t=(a=o.size.split("x"))[0],(a=a[1])?i.push('width="'+t+'" height="'+a+'"'):i.push('width="'+t+'"')),o.class&&i.push('class="'+o.class+'"'),o.id&&i.push('id="'+o.id+'"'),O(e)||(r=N(u,F(p.getCurrentPath()),e)),0":''+n+'"}),i.list={renderer:e}.renderer.list=function(e,t,n){t=t?"ol":"ul";return"<"+t+" "+[/
  • /.test(e.split('class="task-list"')[0])?'class="task-list"':"",n&&1"+e+""},i.listitem={renderer:e}.renderer.listitem=function(e){return/^(]*>)/.test(e)?'
  • ":"
  • "+e+"
  • "},e.origin=i,e},On.prototype.sidebar=function(e,t){var n=this.toc,r=this.router.getCurrentPath(),i="";if(e)i=this.compile(e);else{for(var o=0;o{inner}");this.cacheTree[r]=t}return i},On.prototype.subSidebar=function(e){if(e){var t=this.router.getCurrentPath(),n=this.cacheTree,r=this.toc;r[0]&&r[0].ignoreAllSubs&&r.splice(0),r[0]&&1===r[0].level&&r.shift();for(var i=0;i\n'+e+"\n"}]).links={}:(t=[{type:"html",text:e}]).links={}),o({token:i,embedToken:t}),++l>=s&&o({})}}(t);t.embed.url?ce(t.embed.url).then(r):r(t.embed.html)}}({compile:n,embedTokens:s,fetch:t},function(e){var t,n=e.embedToken,e=e.token;e?(t=e.index,u.forEach(function(e){t>e.start&&(t+=e.length)}),y(c,n.links),a=a.slice(0,t).concat(n,a.slice(t+1)),u.push({start:t,length:n.length-1})):(zn[i]=a.concat(),a.links=zn[i].links=c,r(a))})}function Mn(e,t,n){var r,i,o,a;return t="function"==typeof n?n(t):"string"==typeof n?(o=[],a=0,(r=n).replace(B,function(t,e,n){o.push(r.substring(a,n-1)),a=n+=t.length+1,o.push(i&&i[t]||function(e){return("00"+("string"==typeof Z[t]?e[Z[t]]():Z[t](e))).slice(-t.length)})}),a!==r.length&&o.push(r.substring(a)),function(e){for(var t="",n=0,r=e||new Date;n404 - Not found","Vue"in window)for(var o=0,a=k(".markdown-section > *").filter(t);oscript").filter(function(e){return!/template/.test(e.type)})[0])||(e=e.innerText.trim())&&new Function(e)()),"Vue"in window){var l,c,u=[],p=Object.keys(n.vueComponents||{});2===i&&p.length&&p.forEach(function(e){window.Vue.options.components[e]||window.Vue.component(e,n.vueComponents[e])}),!Cn&&n.vueGlobalOptions&&"function"==typeof n.vueGlobalOptions.data&&(Cn=n.vueGlobalOptions.data()),u.push.apply(u,Object.keys(n.vueMounts||{}).map(function(e){return[b(r,e),n.vueMounts[e]]}).filter(function(e){var t=e[0];e[1];return t})),(n.vueGlobalOptions||p.length)&&(l=/{{2}[^{}]*}{2}/,c=/<[^>/]+\s([@:]|v-)[\w-:.[\]]+[=>\s]/,u.push.apply(u,k(".markdown-section > *").filter(function(n){return!u.some(function(e){var t=e[0];e[1];return t===n})}).filter(function(e){return e.tagName.toLowerCase()in(n.vueComponents||{})||e.querySelector(p.join(",")||null)||l.test(e.outerHTML)||c.test(e.outerHTML)}).map(function(e){var t=y({},n.vueGlobalOptions||{});return Cn&&(t.data=function(){return Cn}),[e,t]})));for(var h=0,d=u;h([^<]*?)

    $'))&&("color"===t[2]?r.style.background=t[1]+(t[3]||""):(e=t[1],S(r,"add","has-mask"),O(t[1])||(e=N(this.router.getBasePath(),t[1])),r.style.backgroundImage="url("+e+")",r.style.backgroundSize="cover",r.style.backgroundPosition="center center"),n=n.replace(t[0],"")),this._renderTo(".cover-main",n),he()):S(r,"remove","show")},t.prototype._updateRender=function(){var e,t,n,r;e=this,t=d(".app-name-link"),n=e.config.nameLink,r=e.route.path,t&&(c(e.config.nameLink)?t.setAttribute("href",n):"object"==typeof n&&(e=Object.keys(n).filter(function(e){return-1'):"")),e.coverpage&&(c+=(r=", 100%, 85%",'
    \x3c!--cover--\x3e
    ')),e.logo&&(r=/^data:image/.test(e.logo),t=/(?:http[s]?:)?\/\//.test(e.logo),n=/^\./.test(e.logo),r||t||n||(e.logo=N(this.router.getBasePath(),e.logo))),c+=(n=(t=e).name?t.name:"","
    "+('')+'
    \x3c!--main--\x3e
    '),this._renderTo(l,c,!0)):this.rendered=!0,e.mergeNavbar&&h?u=b(".sidebar"):(s.classList.add("app-nav"),e.repo||s.classList.add("no-badge")),e.loadNavbar&&w(u,s),e.themeColor&&(f.head.appendChild(v("div","").firstElementChild),o=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){if("STYLE"===e.nodeName)ue(e,o);else if("LINK"===e.nodeName){e=e.getAttribute("href");if(!/\.css$/.test(e))return;ce(e).then(function(e){e=v("style",e);m.appendChild(e),ue(e,o)})}}))),this._updateRender(),S(g,"ready")},t}(function(n){function e(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];n.apply(this,e),this.route={}}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),g.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var t=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&i?q:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){t.updateRender(),t._updateRender(),U.path!==t.route.path?(t.$fetch(u,t.$resetEvents.bind(t,e.source)),U=t.route):t.$resetEvents(e.source)})},e}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.initLifecycle=function(){var n=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var t=n._hooks[e]=[];n._lifecycle[e]=function(e){return t.push(e)}})},t.prototype.callHook=function(e,n,r){void 0===r&&(r=u);var i=this._hooks[e],o=function(t){var e=i[t];t>=i.length?r(n):"function"==typeof e?2===e.length?e(n,function(e){n=e,o(t+1)}):(e=e(n),n=void 0===e?n:e,o(t+1)):o(t+1)};o(0)},t}(Hn)))))));function Un(e,t,n){return jn&&jn.abort&&jn.abort(),jn=ce(e,!0,n)}window.Docsify={util:In,dom:t,get:ce,slugify:xn,version:"4.12.2"},window.DocsifyCompiler=On,window.marked=gn,window.Prism=En,e(function(e){return new qn})}(); \ No newline at end of file +!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]=n(e))}}var o=s(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),l=Object.prototype.hasOwnProperty,y=Object.assign||function(e){for(var t=arguments,n=1;n/gm),it=Q(/^data-[\-\w.\u00B7-\uFFFF]/),ot=Q(/^aria-[\-\w]+$/),at=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),st=Q(/^(?:\w+script|data):/i),lt=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ut(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t/i,t))xe(o,e);else{W&&(t=De(t,F," "),t=De(t,C," "));var l=e.nodeName.toLowerCase();if(Re(l,s,t))try{a?e.setAttributeNS(a,o,t):e.setAttribute(o,t),Le(c.removed)}catch(e){}}}Te("afterSanitizeAttributes",e,null)}}function $e(e){var t,n=Se(e);for(Te("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)Te("uponSanitizeShadowNode",t,null),Ee(t)||(t.content instanceof u&&$e(t.content),Oe(t));Te("afterSanitizeShadowDOM",e,null)}return c.sanitize=function(e,t){var n,r=void 0,i=void 0,o=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw He("toString is not a function");if("string"!=typeof(e=e.toString()))throw He("dirty is not a string, aborting")}if(!c.isSupported){if("object"===ct(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(Ae(e))return s.toStaticHTML(e.outerHTML)}return e}if(Y||O(t),c.removed=[],"string"==typeof e&&(re=!1),!re)if(e instanceof p)1===(t=(r=_e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?r=t:r.appendChild(t);else{if(!K&&!W&&!V&&-1===e.indexOf("<"))return k&&ee?k.createHTML(e):e;if(!(r=_e(e)))return K?null:w}r&&X&&we(r.firstChild);for(var a=Se(re?e:r);n=a.nextNode();)3===n.nodeType&&n===i||Ee(n)||(n.content instanceof u&&$e(n.content),Oe(n),i=n);if(i=null,re)return e;if(K){if(Q)for(o=S.call(r.ownerDocument);r.firstChild;)o.appendChild(r.firstChild);else o=r;return J&&(o=T.call(l,o,!0)),o}return e=V?r.outerHTML:r.innerHTML,W&&(e=De(e,F," "),e=De(e,C," ")),k&&ee?k.createHTML(e):e},c.setConfig=function(e){O(e),Y=!0},c.clearConfig=function(){ge=null,Y=!1},c.isValidAttribute=function(e,t,n){return ge||O({}),e=Ne(e),t=Ne(t),Re(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],ze(R[e],t))},c.removeHook=function(e){R[e]&&Le(R[e])},c.removeHooks=function(e){R[e]&&(R[e]=[])},c.removeAllHooks=function(){R={}},c}();function se(e){var t,n=e.loaded,r=e.total,i=e.step;ie||((e=v("div")).classList.add("progress"),a(g,e),ie=e),t=i?80<(t=parseInt(ie.style.width||0,10)+i)?80:t:Math.floor(n/r*100),ie.style.opacity=1,ie.style.width=95<=t?"100%":t+"%",95<=t&&(clearTimeout(oe),oe=setTimeout(function(e){ie.style.opacity=0,ie.style.width="0%"},200))}var le={};function ce(i,e,t){void 0===e&&(e=!1),void 0===t&&(t={});function o(){a.addEventListener.apply(a,arguments)}var n,a=new XMLHttpRequest,r=le[i];if(r)return{then:function(e){return e(r.content,r.opt)},abort:u};for(n in a.open("GET",i),t)l.call(t,n)&&a.setRequestHeader(n,t[n]);return a.send(),{then:function(t,n){var r;void 0===n&&(n=u),e&&(r=setInterval(function(e){return se({step:Math.floor(5*Math.random()+1)})},500),o("progress",se),o("loadend",function(e){se(e),clearInterval(r)})),o("error",n),o("load",function(e){e=e.target;400<=e.status?n(e):(e=le[i]={content:e.response,opt:{updatedAt:a.getResponseHeader("last-modified")}},t(e.content,e.opt))})},abort:function(e){return 4!==a.readyState&&a.abort()}}}function ue(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}var pe=f.title;function he(){var e,t=d("section.cover");t&&(e=t.getBoundingClientRect().height,window.pageYOffset>=e||t.classList.contains("hidden")?S(g,"add","sticky"):S(g,"remove","sticky"))}function de(e,t,r,n){var i=[];null!=(t=d(t))&&(i=k(t,"a"));var o,a=decodeURI(e.toURL(e.getCurrentPath()));return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=decodeURI(e.getAttribute("href")),n=r?e.parentNode:e;e.title=e.title||e.innerText,0!==a.indexOf(t)||o?S(n,"remove","active"):(o=e,S(n,"add","active"))}),n&&(f.title=o?o.title||o.innerText+" - "+pe:pe),o}function fe(e,t){for(var n=0;nthis.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}}]),be);function be(){var e=0l){t=t||p;break}t=p}!t||(n=xe[Re(e,t.getAttribute("data-id"))])&&n!==a&&(a&&a.classList.remove("active"),n.classList.add("active"),a=n,!_e&&g.classList.contains("sticky")&&(s=r.clientHeight,e=a.offsetTop+a.clientHeight+40,n=a.offsetTop>=o.scrollTop&&e<=o.scrollTop+s,a=+e"']/),yt=/[&<>"']/g,bt=/[<>"']|&(?!#?\w+;)/,kt=/[<>"']|&(?!#?\w+;)/g,wt={"&":"&","<":"<",">":">",'"':""","'":"'"};var xt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function _t(e){return e.replace(xt,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var St=/(^|[^\[])\^/g;var At=/[^\w:]/g,Tt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Et={},Rt=/^[^:]+:\/*[^/]*$/,Ot=/^([^:]+:)[\s\S]*$/,$t=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ft(e,t){Et[" "+e]||(Rt.test(e)?Et[" "+e]=e+"/":Et[" "+e]=Ct(e,"/",!0));var n=-1===(e=Et[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Ot,"$1")+t:"/"===t.charAt(0)?n?t:e.replace($t,"$1")+t:e+t}function Ct(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;it)n.splice(t);else for(;n.length>=1,e+=e;return n+e},jt=mt.defaults,Ht=Ct,qt=It,Ut=Lt,Bt=I;function Zt(e,t,n){var r=t.href,i=t.title?Ut(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:t}:{type:"image",raw:n,href:r,title:i,text:Ut(t)}}var Gt=function(){function e(e){this.options=e||jt}return e.prototype.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1=n.length?e.slice(n.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:e}}},e.prototype.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();return/#$/.test(n)&&(e=Ht(n,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(n=e.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:n}}},e.prototype.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var t={type:"table",header:qt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){for(var n=t.align.length,r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}},e.prototype.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var t,n,r,i,o,a=e[0],s=e[2],l=1d[1].length:r[1].length>d[0].length||3/i.test(e[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]}},e.prototype.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;e=Ht(n.slice(0,-1),"\\");if((n.length-e.length)%2==0)return}else{var r=Bt(t[2],"()");-1$/.test(n)?r.slice(1):r.slice(1,-1)),Zt(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},e.prototype.reflink=function(e,t){if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){e=(n[2]||n[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return Zt(n,e,n[0]);var n=n[0].charAt(0);return{type:"text",raw:n,text:n}}},e.prototype.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},e.prototype.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},e.prototype.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),e=/^ /.test(n)&&/ $/.test(n);return r&&e&&(n=n.substring(1,n.length-1)),n=Ut(n,!0),{type:"codespan",raw:t[0],text:n}}},e.prototype.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},e.prototype.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},e.prototype.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var n,t="@"===e[2]?"mailto:"+(n=Ut(this.options.mangle?t(e[1]):e[1])):n=Ut(e[1]);return{type:"link",raw:e[0],text:n,href:t,tokens:[{type:"text",raw:n,text:n}]}}},e.prototype.url=function(e,t){var n,r,i,o;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=Ut(this.options.mangle?t(n[0]):n[0]));else{for(;o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],o!==n[0];);r=Ut(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.prototype.inlineText=function(e,t,n){e=this.rules.inline.text.exec(e);if(e){n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]:Ut(this.options.smartypants?n(e[0]):e[0]);return{type:"text",raw:e[0],text:n}}},e}(),It=Dt,I=Nt,Dt=Pt,Nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:It,table:It,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Nt.def=I(Nt.def).replace("label",Nt._label).replace("title",Nt._title).getRegex(),Nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Nt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Nt.item=I(Nt.item,"gm").replace(/bull/g,Nt.bullet).getRegex(),Nt.listItemStart=I(/^( *)(bull)/).replace("bull",Nt.bullet).getRegex(),Nt.list=I(Nt.list).replace(/bull/g,Nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Nt.def.source+")").getRegex(),Nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nt._comment=/|$)/,Nt.html=I(Nt.html,"i").replace("comment",Nt._comment).replace("tag",Nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nt.paragraph=I(Nt._paragraph).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.blockquote=I(Nt.blockquote).replace("paragraph",Nt.paragraph).getRegex(),Nt.normal=Dt({},Nt),Nt.gfm=Dt({},Nt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Nt.gfm.nptable=I(Nt.gfm.nptable).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.gfm.table=I(Nt.gfm.table).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.pedantic=Dt({},Nt.normal,{html:I("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:It,paragraph:I(Nt.normal._paragraph).replace("hr",Nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});It={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:It,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:It,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};It.punctuation=I(It.punctuation).replace(/punctuation/g,It._punctuation).getRegex(),It._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",It._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",It._comment=I(Nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),It.em.start=I(It.em.start).replace(/punctuation/g,It._punctuation).getRegex(),It.em.middle=I(It.em.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.em.endAst=I(It.em.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.em.endUnd=I(It.em.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.start=I(It.strong.start).replace(/punctuation/g,It._punctuation).getRegex(),It.strong.middle=I(It.strong.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.strong.endAst=I(It.strong.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.endUnd=I(It.strong.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.blockSkip=I(It._blockSkip,"g").getRegex(),It.overlapSkip=I(It._overlapSkip,"g").getRegex(),It._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,It._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,It._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,It.autolink=I(It.autolink).replace("scheme",It._scheme).replace("email",It._email).getRegex(),It._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,It.tag=I(It.tag).replace("comment",It._comment).replace("attribute",It._attribute).getRegex(),It._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,It._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,It._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,It.link=I(It.link).replace("label",It._label).replace("href",It._href).replace("title",It._title).getRegex(),It.reflink=I(It.reflink).replace("label",It._label).getRegex(),It.reflinkSearch=I(It.reflinkSearch,"g").replace("reflink",It.reflink).replace("nolink",It.nolink).getRegex(),It.normal=Dt({},It),It.pedantic=Dt({},It.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",It._label).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It._label).getRegex()}),It.gfm=Dt({},It.normal,{escape:I(It.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\'+(n?e:nn(e,!0))+"\n":"
    "+(n?e:nn(e,!0))+"
    \n"},e.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},e.prototype.html=function(e){return e},e.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},e.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},e.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},e.prototype.checkbox=function(e){return" "},e.prototype.paragraph=function(e){return"

    "+e+"

    \n"},e.prototype.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},e.prototype.tablerow=function(e){return"\n"+e+"\n"},e.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},e.prototype.strong=function(e){return""+e+""},e.prototype.em=function(e){return""+e+""},e.prototype.codespan=function(e){return""+e+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(e){return""+e+""},e.prototype.link=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;e='
    "},e.prototype.image=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;n=''+n+'":">"},e.prototype.text=function(e){return e},e}(),on=function(){function e(){}return e.prototype.strong=function(e){return e},e.prototype.em=function(e){return e},e.prototype.codespan=function(e){return e},e.prototype.del=function(e){return e},e.prototype.html=function(e){return e},e.prototype.text=function(e){return e},e.prototype.link=function(e,t,n){return""+n},e.prototype.image=function(e,t,n){return""+n},e.prototype.br=function(){return""},e}(),an=function(){function e(){this.seen={}}return e.prototype.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.prototype.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},e.prototype.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),sn=mt.defaults,ln=zt,cn=function(){function n(e){this.options=e||sn,this.options.renderer=this.options.renderer||new rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new on,this.slugger=new an}return n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)},n.prototype.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,o,a,s,l,c,u,p,h,d,f,g,m,v="",y=e.length,b=0;bAn error occurred:

    "+hn(e.message+"",!0)+"
    ";throw e}}fn.options=fn.setOptions=function(e){return un(fn.defaults,e),dn(fn.defaults),fn},fn.getDefaults=Lt,fn.defaults=mt,fn.use=function(o){var t,e=un({},o);if(o.renderer){var n,a=fn.defaults.renderer||new rn;for(n in o.renderer)!function(r){var i=a[r];a[r]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.renderer[r].apply(a,e);return!1===n&&(n=i.apply(a,e)),n}}(n);e.renderer=a}if(o.tokenizer){var i,s=fn.defaults.tokenizer||new Gt;for(i in o.tokenizer)!function(){var r=s[i];s[i]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.tokenizer[i].apply(s,e);return!1===n&&(n=r.apply(s,e)),n}}();e.tokenizer=s}o.walkTokens&&(t=fn.defaults.walkTokens,e.walkTokens=function(e){o.walkTokens(e),t&&t(e)}),fn.setOptions(e)},fn.walkTokens=function(e,t){for(var n=0,r=e;nAn error occurred:

    "+hn(e.message+"",!0)+"
    ";throw e}},fn.Parser=cn,fn.parser=cn.parse,fn.Renderer=rn,fn.TextRenderer=on,fn.Lexer=Jt,fn.lexer=Jt.lex,fn.Tokenizer=Gt,fn.Slugger=an;var gn=fn.parse=fn;function mn(e,n){if(void 0===n&&(n='
      {inner}
    '),!e||!e.length)return"";var r="";return e.forEach(function(e){var t=e.title.replace(/(<([^>]+)>)/g,"");r+='
  • '+e.title+"
  • ",e.children&&(r+=mn(e.children,n))}),n.replace("{inner}",r)}function vn(e,t){return'

    '+t.slice(5).trim()+"

    "}function yn(e,r){var i=[],o={};return e.forEach(function(e){var t=e.level||1,n=t-1;r?@[\]^`{|}~]/g;function wn(e){return e.toLowerCase()}function xn(e){if("string"!=typeof e)return"";var t=e.trim().replace(/[A-Z]+/g,wn).replace(/<[^>]+>/g,"").replace(kn,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),e=bn[t],e=l.call(bn,t)?e+1:0;return(bn[t]=e)&&(t=t+"-"+e),t}function _n(e,t){return''+t+''}function Sn(e){void 0===e&&(e="");var r={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,t,n){return-1===t.indexOf(":")?(r[t]=n&&n.replace(/"/g,"")||!0,""):e}).trim(),config:r}}function An(e){return void 0===e&&(e=""),e.replace(/(<\/?a.*?>)/gi,"")}xn.clear=function(){bn={}};var Tn,En=ft(function(e){var a,s,l,c,u,r,t,i=function(l){var c=/\blang(?:uage)?-([\w-]+)\b/i,t=0,$={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof F?new F(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=a.reach);y+=v.value.length,v=v.next){var b=v.value;if(n.length>t.length)return;if(!(b instanceof F)){var k,w=1;if(f){if(!(k=C(m,y,t,d)))break;var x=k.index,_=k.index+k[0].length,S=y;for(S+=v.value.length;S<=x;)v=v.next,S+=v.value.length;if(S-=v.value.length,y=S,v.value instanceof F)continue;for(var A=v;A!==n.tail&&(S<_||"string"==typeof A.value);A=A.next)w++,S+=A.value.length;w--,b=t.slice(y,S),k.index-=y}else if(!(k=C(m,0,b,d)))continue;var x=k.index,T=k[0],E=b.slice(0,x),R=b.slice(x+T.length),O=y+b.length;a&&O>a.reach&&(a.reach=O);var b=v.prev;E&&(b=L(n,b,E),y+=E.length),z(n,b,w);var T=new F(s,h?$.tokenize(T,h):T,g,T);v=L(n,b,T),R&&L(n,v,R),1"+i.content+""},!l.document)return l.addEventListener&&($.disableWorkerMessageHandler||l.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,e=t.code,t=t.immediateClose;l.postMessage($.highlight(e,$.languages[n],n)),t&&l.close()},!1)),$;var e,n=$.util.currentScript();function r(){$.manual||$.highlightAll()}return n&&($.filename=n.src,n.hasAttribute("data-manual")&&($.manual=!0)),$.manual||("loading"===(e=document.readyState)||"interactive"===e&&n&&n.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),$}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});function p(e,t){var n=(n=e.className).replace(r," ")+" language-"+t;e.className=n.replace(/\s+/g," ").trim()}e.exports&&(e.exports=i),void 0!==dt&&(dt.Prism=i),i.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;n={"included-cdata":{pattern://i,inside:n}};n["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};t={};t[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},i.languages.insertBefore("markup","cdata",t)}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},t.tag))}(i),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),a=window.Prism,s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="pre[data-src]:not(["+(l="data-src-status")+'="loaded"]):not(['+l+'="'+(c="loading")+'"])',r=/\blang(?:uage)?-([\w-]+)\b/i,a.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),a.hooks.add("before-sanity-check",function(e){var t,n,r,i,o=e.element;o.matches(u)&&(e.code="",o.setAttribute(l,c),(t=o.appendChild(document.createElement("CODE"))).textContent="Loading…",n=o.getAttribute("data-src"),"none"===(e=e.language)&&(r=(/\.(\w+)$/.exec(n)||[,"none"])[1],e=s[r]||r),p(t,e),p(o,e),(r=a.plugins.autoloader)&&r.loadLanguages(e),(i=new XMLHttpRequest).open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(o.setAttribute(l,"loaded"),t.textContent=i.responseText,a.highlightElement(t)):(o.setAttribute(l,"failed"),400<=i.status?t.textContent="✖ Error "+i.status+" while fetching file: "+i.statusText:t.textContent="✖ Error: File does not exist or is empty"))},i.send(null))}),t=!(a.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(u),r=0;t=n[r++];)a.highlightElement(t)}}),a.fileHighlight=function(){t||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),t=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)})});function Rn(e,t){return"___"+e.toUpperCase()+t+"___"}Tn=Prism,Object.defineProperties(Tn.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,e,o){var a;r.language===i&&(a=r.tokenStack=[],r.code=r.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var t,n=a.length;-1!==r.code.indexOf(t=Rn(i,n));)++n;return a[n]=e,t}),r.grammar=Tn.languages.markup)}},tokenizePlaceholders:{value:function(c,u){var p,h;c.language===u&&c.tokenStack&&(c.grammar=Tn.languages[u],p=0,h=Object.keys(c.tokenStack),function e(t){for(var n=0;n=h.length);n++){var r,i,o,a,s,l=t[n];"string"==typeof l||l.content&&"string"==typeof l.content?(i=h[p],o=c.tokenStack[i],r="string"==typeof l?l:l.content,s=Rn(u,i),-1<(a=r.indexOf(s))&&(++p,i=r.substring(0,a),o=new Tn.Token(u,Tn.tokenize(o,c.grammar),"language-"+u,o),a=r.substring(a+s.length),s=[],i&&s.push.apply(s,e([i])),s.push(o),a&&s.push.apply(s,e([a])),"string"==typeof l?t.splice.apply(t,[n,1].concat(s)):l.content=s)):l.content&&e(l.content)}return t}(c.tokens))}}});function On(i,e){var o=this;this.config=i,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=i.externalLinkTarget||"_blank",this.linkRel="_blank"===this.linkTarget?i.externalLinkRel||"noopener":"",this.contentBase=e.getBasePath();var t=this._initRenderer();this.heading=t.heading;var a=r(e=i.markdown||{})?e(gn,t):(gn.setOptions(y(e,{renderer:y(t,e.renderer)})),gn);this._marked=a,this.compile=function(n){var r=!0,e=s(function(e){r=!1;var t="";return n?(t=c(n)?a(n):a.parser(n),t=i.noEmoji?t:t.replace(/:\+1:/g,":thumbsup:").replace(/:-1:/g,":thumbsdown:").replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||_n).replace(/__colon__/g,":"),xn.clear(),t):n})(n),t=o.router.parse().file;return r?o.toc=o.cacheTOC[t]:o.cacheTOC[t]=[].concat(o.toc),e}}var $n={},Fn={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,t){return{html:'"}},video:function(e,t){return{html:'"}},audio:function(e,t){return{html:'"}},code:function(e,t){var n=e.match(/\.(\w+)$/);return"md"===(n=t||n&&n[1])&&(n="markdown"),{url:e,lang:n}}};On.prototype.compileEmbed=function(e,t){var n,r,i=Sn(t),o=i.str,i=i.config;if(t=o,i.include)return O(e)||(e=N(this.contentBase,F(this.router.getCurrentPath()),e)),i.type&&(r=Fn[i.type])?(n=r.call(this,e,t)).type=i.type:(r="code",/\.(md|markdown)/.test(e)?r="markdown":/\.mmd/.test(e)?r="mermaid":/\.html?/.test(e)?r="iframe":/\.(mp4|ogg)/.test(e)?r="video":/\.mp3/.test(e)&&(r="audio"),(n=Fn[r].call(this,e,t)).type=r),n.fragment=i.fragment,n},On.prototype._matchNotCompileLink=function(e){for(var t=this.config.noCompileLinks||[],n=0;n/g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore} --\x3e",""),e.title=An(r),e.ignoreSubHeading=!0),/{docsify-ignore}/g.test(r)&&(r=r.replace("{docsify-ignore}",""),e.title=An(r),e.ignoreSubHeading=!0),//g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),e.title=An(r),e.ignoreAllSubs=!0),/{docsify-ignore-all}/g.test(r)&&(r=r.replace("{docsify-ignore-all}",""),e.title=An(r),e.ignoreAllSubs=!0);n=xn(i.id||r),i=o.toURL(o.getCurrentPath(),{id:n});return e.slug=i,h.toc.push(e),"'+r+""},i.code={renderer:e}.renderer.code=function(e,t){void 0===t&&(t="markup");var n=En.languages[t]||En.languages.markup;return'
    '+En.highlight(e.replace(/@DOCSIFY_QM@/g,"`"),n,t)+"
    "},i.link=(n=(t={renderer:e,router:o,linkTarget:t,linkRel:n,compilerClass:h}).renderer,a=t.router,s=t.linkTarget,l=t.linkRel,c=t.compilerClass,n.link=function(e,t,n){void 0===t&&(t="");var r=[],i=Sn(t),o=i.str,i=i.config;return s=i.target||s,l="_blank"===s?c.config.externalLinkRel||"noopener":"",t=o,O(e)||c._matchNotCompileLink(e)||i.ignore?(O(e)||"./"!==e.slice(0,2)||(e=document.URL.replace(/\/(?!.*\/).*/,"/").replace("#/./","")+e),r.push(0===e.indexOf("mailto:")?"":'target="'+s+'"'),r.push(0!==e.indexOf("mailto:")&&""!==l?' rel="'+l+'"':"")):(e===c.config.homepage&&(e="README"),e=a.toURL(e,null,a.getCurrentPath())),i.crossorgin&&"_self"===s&&"history"===c.config.routerMode&&-1===c.config.crossOriginLinks.indexOf(e)&&c.config.crossOriginLinks.push(e),i.disabled&&(r.push("disabled"),e="javascript:void(0)"),i.class&&r.push('class="'+i.class+'"'),i.id&&r.push('id="'+i.id+'"'),t&&r.push('title="'+t+'"'),'"+n+""}),i.paragraph={renderer:e}.renderer.paragraph=function(e){e=/^!>/.test(e)?vn("tip",e):/^\?>/.test(e)?vn("warn",e):"

    "+e+"

    ";return e},i.image=(r=(n={renderer:e,contentBase:r,router:o}).renderer,u=n.contentBase,p=n.router,r.image=function(e,t,n){var r=e,i=[],o=Sn(t),a=o.str,o=o.config;return t=a,o["no-zoom"]&&i.push("data-no-zoom"),t&&i.push('title="'+t+'"'),o.size&&(t=(a=o.size.split("x"))[0],(a=a[1])?i.push('width="'+t+'" height="'+a+'"'):i.push('width="'+t+'"')),o.class&&i.push('class="'+o.class+'"'),o.id&&i.push('id="'+o.id+'"'),O(e)||(r=N(u,F(p.getCurrentPath()),e)),0":''+n+'"}),i.list={renderer:e}.renderer.list=function(e,t,n){t=t?"ol":"ul";return"<"+t+" "+[/
  • /.test(e.split('class="task-list"')[0])?'class="task-list"':"",n&&1"+e+""},i.listitem={renderer:e}.renderer.listitem=function(e){return/^(]*>)/.test(e)?'
  • ":"
  • "+e+"
  • "},e.origin=i,e},On.prototype.sidebar=function(e,t){var n=this.toc,r=this.router.getCurrentPath(),i="";if(e)i=this.compile(e);else{for(var o=0;o{inner}");this.cacheTree[r]=t}return i},On.prototype.subSidebar=function(e){if(e){var t=this.router.getCurrentPath(),n=this.cacheTree,r=this.toc;r[0]&&r[0].ignoreAllSubs&&r.splice(0),r[0]&&1===r[0].level&&r.shift();for(var i=0;i\n'+e+"\n"}]).links={}:(t=[{type:"html",text:e}]).links={}),o({token:i,embedToken:t}),++l>=s&&o({})}}(t);t.embed.url?ce(t.embed.url).then(r):r(t.embed.html)}}({compile:n,embedTokens:s,fetch:t},function(e){var t,n=e.embedToken,e=e.token;e?(t=e.index,u.forEach(function(e){t>e.start&&(t+=e.length)}),y(c,n.links),a=a.slice(0,t).concat(n,a.slice(t+1)),u.push({start:t,length:n.length-1})):(zn[i]=a.concat(),a.links=zn[i].links=c,r(a))})}function Mn(e,t,n){var r,i,o,a;return t="function"==typeof n?n(t):"string"==typeof n?(o=[],a=0,(r=n).replace(B,function(t,e,n){o.push(r.substring(a,n-1)),a=n+=t.length+1,o.push(i&&i[t]||function(e){return("00"+("string"==typeof Z[t]?e[Z[t]]():Z[t](e))).slice(-t.length)})}),a!==r.length&&o.push(r.substring(a)),function(e){for(var t="",n=0,r=e||new Date;n404 - Not found","Vue"in window)for(var o=0,a=k(".markdown-section > *").filter(t);oscript").filter(function(e){return!/template/.test(e.type)})[0])||(e=e.innerText.trim())&&new Function(e)()),"Vue"in window){var l,c,u=[],p=Object.keys(n.vueComponents||{});2===i&&p.length&&p.forEach(function(e){window.Vue.options.components[e]||window.Vue.component(e,n.vueComponents[e])}),!Cn&&n.vueGlobalOptions&&"function"==typeof n.vueGlobalOptions.data&&(Cn=n.vueGlobalOptions.data()),u.push.apply(u,Object.keys(n.vueMounts||{}).map(function(e){return[b(r,e),n.vueMounts[e]]}).filter(function(e){var t=e[0];e[1];return t})),(n.vueGlobalOptions||p.length)&&(l=/{{2}[^{}]*}{2}/,c=/<[^>/]+\s([@:]|v-)[\w-:.[\]]+[=>\s]/,u.push.apply(u,k(".markdown-section > *").filter(function(n){return!u.some(function(e){var t=e[0];e[1];return t===n})}).filter(function(e){return e.tagName.toLowerCase()in(n.vueComponents||{})||e.querySelector(p.join(",")||null)||l.test(e.outerHTML)||c.test(e.outerHTML)}).map(function(e){var t=y({},n.vueGlobalOptions||{});return Cn&&(t.data=function(){return Cn}),[e,t]})));for(var h=0,d=u;h([^<]*?)

    $'))&&("color"===t[2]?r.style.background=t[1]+(t[3]||""):(e=t[1],S(r,"add","has-mask"),O(t[1])||(e=N(this.router.getBasePath(),t[1])),r.style.backgroundImage="url("+e+")",r.style.backgroundSize="cover",r.style.backgroundPosition="center center"),n=n.replace(t[0],"")),this._renderTo(".cover-main",n),he()):S(r,"remove","show")},t.prototype._updateRender=function(){var e,t,n,r;e=this,t=d(".app-name-link"),n=e.config.nameLink,r=e.route.path,t&&(c(e.config.nameLink)?t.setAttribute("href",n):"object"==typeof n&&(e=Object.keys(n).filter(function(e){return-1'):"")),e.coverpage&&(c+=(r=", 100%, 85%",'
    \x3c!--cover--\x3e
    ')),e.logo&&(r=/^data:image/.test(e.logo),t=/(?:http[s]?:)?\/\//.test(e.logo),n=/^\./.test(e.logo),r||t||n||(e.logo=N(this.router.getBasePath(),e.logo))),c+=(n=(t=e).name?t.name:"","
    "+('')+'
    \x3c!--main--\x3e
    '),this._renderTo(l,c,!0)):this.rendered=!0,e.mergeNavbar&&h?u=b(".sidebar"):(s.classList.add("app-nav"),e.repo||s.classList.add("no-badge")),e.loadNavbar&&w(u,s),e.themeColor&&(f.head.appendChild(v("div","").firstElementChild),o=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){if("STYLE"===e.nodeName)ue(e,o);else if("LINK"===e.nodeName){e=e.getAttribute("href");if(!/\.css$/.test(e))return;ce(e).then(function(e){e=v("style",e);m.appendChild(e),ue(e,o)})}}))),this._updateRender(),S(g,"ready")},t}(function(n){function e(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];n.apply(this,e),this.route={}}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),g.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var t=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&i?q:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){t.updateRender(),t._updateRender(),U.path!==t.route.path?(t.$fetch(u,t.$resetEvents.bind(t,e.source)),U=t.route):t.$resetEvents(e.source)})},e}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.initLifecycle=function(){var n=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var t=n._hooks[e]=[];n._lifecycle[e]=function(e){return t.push(e)}})},t.prototype.callHook=function(e,n,r){void 0===r&&(r=u);var i=this._hooks[e],o=function(t){var e=i[t];t>=i.length?r(n):"function"==typeof e?2===e.length?e(n,function(e){n=e,o(t+1)}):(e=e(n),n=void 0===e?n:e,o(t+1)):o(t+1)};o(0)},t}(Hn)))))));function Un(e,t,n){return jn&&jn.abort&&jn.abort(),jn=ce(e,!0,n)}window.Docsify={util:In,dom:t,get:ce,slugify:xn,version:"4.12.2"},window.DocsifyCompiler=On,window.marked=gn,window.Prism=En,e(function(e){return new qn})}(); diff --git a/docs/src/syntax/prism-markdown.min.js b/docs/src/syntax/prism-markdown.min.js new file mode 100644 index 000000000..2b16ba515 --- /dev/null +++ b/docs/src/syntax/prism-markdown.min.js @@ -0,0 +1 @@ +!function(n){function e(n){return n=n.replace(//g,(function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"})),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var t="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",a="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,(function(){return t})),i="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(t),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(t),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:e("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:e("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:e("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:e('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(t){e!==t&&(n.languages.markdown[e].inside.content.inside[t]=n.languages.markdown[t])}))})),n.hooks.add("after-tokenize",(function(n){"markdown"!==n.language&&"md"!==n.language||function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},l=String.fromCodePoint||String.fromCharCode;n.languages.md=n.languages.markdown}(Prism); \ No newline at end of file diff --git a/documentation/static/src/themes/dark-light.css b/docs/src/themes/docsify-darklight-theme.min.css similarity index 100% rename from documentation/static/src/themes/dark-light.css rename to docs/src/themes/docsify-darklight-theme.min.css diff --git a/docs/src/themes/docsify-darklight-theme.min.js b/docs/src/themes/docsify-darklight-theme.min.js new file mode 100644 index 000000000..a55b2fd61 --- /dev/null +++ b/docs/src/themes/docsify-darklight-theme.min.js @@ -0,0 +1 @@ +window.$docsify.plugins=[].concat((e,t)=>{let o={siteFont:"JetBrains Mono Light",defaultTheme:"dark",codeFontFamily:"JetBrains Mono, Monaco, courier, monospace",bodyFontSize:"17px",dark:{accent:"#42b983",toogleBackground:"#ffffff",background:"#091a28",textColor:"#b4b4b4",codeTextColor:"#ffffff",codeBackgroundColor:"#0e2233",borderColor:"#0d2538",blockQuoteColour:"#858585",highlightColor:"#d22778",sidebarSublink:"#b4b4b4",codeTypeColor:"#ffffff",coverBackground:"linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)",toogleImage:"url(sun.svg)"},light:{accent:"#42b983",toogleBackground:"#091a28",background:"#ffffff",textColor:"#34495e",codeTextColor:"#525252",codeBackgroundColor:"#f8f8f8",borderColor:"rgba(0, 0, 0, 0.07)",blockQuoteColor:"#858585",highlightColor:"#d22778",sidebarSublink:"#505d6b",codeTypeColor:"#091a28",coverBackground:"linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)",toogleImage:"url(moon.svg)"}};if(t.config.hasOwnProperty("darklightTheme")){for(var[r,l]of Object.entries(t.config.darklightTheme))"light"!==r&&"dark"!==r&&"defaultTheme"!==r&&(o[r]=l);for(var[r,l]of Object.entries(o))"light"!==r&&"dark"!==r&&(o[r]=l,document.documentElement.style.setProperty("--"+r,l));if(t.config.darklightTheme.hasOwnProperty("dark"))for(var[r,l]of Object.entries(t.config.darklightTheme.dark))o.dark[r]=l;if(t.config.darklightTheme.hasOwnProperty("light"))for(var[r,l]of Object.entries(t.config.darklightTheme.light))o.light[r]=l}else for(var[r,l]of Object.entries(o))"light"!==r&&"dark"!==r&&(o[r]=l,document.documentElement.style.setProperty("--"+r,l));window.matchMedia("(prefers-color-scheme: dark)").matches?o.defaultTheme="dark":window.matchMedia("(prefers-color-scheme: light)").matches&&(o.defaultTheme="light");var d=e=>{if(localStorage.setItem("DARK_LIGHT_THEME",e),o.defaultTheme=e,"light"==e)for(var[t,r]of Object.entries(o.light))document.documentElement.style.setProperty("--"+t,r);else if("dark"==e)for(var[t,r]of Object.entries(o.dark))document.documentElement.style.setProperty("--"+t,r);document.documentElement.style.setProperty("color-scheme",e),document.getElementById("docsify-darklight-theme").setAttribute("aria-pressed","dark"===e)};e.afterEach((function(e,t){t(e=e+'')})),e.doneEach((function(){let e=localStorage.getItem("DARK_LIGHT_THEME");"light"==e||"dark"==e?(o.defaultTheme=e,d(o.defaultTheme)):d(o.defaultTheme),document.getElementById("docsify-darklight-theme").addEventListener("click",(function(){"light"===o.defaultTheme?d("dark"):d("light")}))}))},window.$docsify.plugins); \ No newline at end of file diff --git a/docs/src/themes/prism-vsc-dark-plus.css b/docs/src/themes/prism-vsc-dark-plus.css new file mode 100644 index 000000000..d3bd5010a --- /dev/null +++ b/docs/src/themes/prism-vsc-dark-plus.css @@ -0,0 +1,275 @@ +pre[class*="language-"], +code[class*="language-"] { + color: #d4d4d4; + font-size: 13px; + text-shadow: none; + font-family: Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::selection, +code[class*="language-"]::selection, +pre[class*="language-"] *::selection, +code[class*="language-"] *::selection { + text-shadow: none; + background: #264F78; +} + +@media print { + pre[class*="language-"], + code[class*="language-"] { + text-shadow: none; + } +} + +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; + background: #1e1e1e; +} + +:not(pre) > code[class*="language-"] { + padding: .1em .3em; + border-radius: .3em; + color: #db4c69; + background: #1e1e1e; +} +/********************************************************* +* Tokens +*/ +.namespace { + opacity: .7; +} + +.token.doctype .token.doctype-tag { + color: #569CD6; +} + +.token.doctype .token.name { + color: #9cdcfe; +} + +.token.comment, +.token.prolog { + color: #6a9955; +} + +.token.punctuation, +.language-html .language-css .token.punctuation, +.language-html .language-javascript .token.punctuation { + color: #d4d4d4; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.inserted, +.token.unit { + color: #b5cea8; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.deleted { + color: #ce9178; +} + +.language-css .token.string.url { + text-decoration: underline; +} + +.token.operator, +.token.entity { + color: #d4d4d4; +} + +.token.operator.arrow { + color: #569CD6; +} + +.token.atrule { + color: #ce9178; +} + +.token.atrule .token.rule { + color: #c586c0; +} + +.token.atrule .token.url { + color: #9cdcfe; +} + +.token.atrule .token.url .token.function { + color: #dcdcaa; +} + +.token.atrule .token.url .token.punctuation { + color: #d4d4d4; +} + +.token.keyword { + color: #569CD6; +} + +.token.keyword.module, +.token.keyword.control-flow { + color: #c586c0; +} + +.token.function, +.token.function .token.maybe-class-name { + color: #dcdcaa; +} + +.token.regex { + color: #d16969; +} + +.token.important { + color: #569cd6; +} + +.token.italic { + font-style: italic; +} + +.token.constant { + color: #9cdcfe; +} + +.token.class-name, +.token.maybe-class-name { + color: #4ec9b0; +} + +.token.console { + color: #9cdcfe; +} + +.token.parameter { + color: #9cdcfe; +} + +.token.interpolation { + color: #9cdcfe; +} + +.token.punctuation.interpolation-punctuation { + color: #569cd6; +} + +.token.boolean { + color: #569cd6; +} + +.token.property, +.token.variable, +.token.imports .token.maybe-class-name, +.token.exports .token.maybe-class-name { + color: #9cdcfe; +} + +.token.selector { + color: #d7ba7d; +} + +.token.escape { + color: #d7ba7d; +} + +.token.tag { + color: #569cd6; +} + +.token.tag .token.punctuation { + color: #808080; +} + +.token.cdata { + color: #808080; +} + +.token.attr-name { + color: #9cdcfe; +} + +.token.attr-value, +.token.attr-value .token.punctuation { + color: #ce9178; +} + +.token.attr-value .token.punctuation.attr-equals { + color: #d4d4d4; +} + +.token.entity { + color: #569cd6; +} + +.token.namespace { + color: #4ec9b0; +} +/********************************************************* +* Language Specific +*/ + +pre[class*="language-javascript"], +code[class*="language-javascript"], +pre[class*="language-jsx"], +code[class*="language-jsx"], +pre[class*="language-typescript"], +code[class*="language-typescript"], +pre[class*="language-tsx"], +code[class*="language-tsx"] { + color: #9cdcfe; +} + +pre[class*="language-css"], +code[class*="language-css"] { + color: #ce9178; +} + +pre[class*="language-html"], +code[class*="language-html"] { + color: #d4d4d4; +} + +.language-regex .token.anchor { + color: #dcdcaa; +} + +.language-html .token.punctuation { + color: #808080; +} +/********************************************************* +* Line highlighting +*/ +pre[class*="language-"] > code[class*="language-"] { + position: relative; + z-index: 1; +} + +.line-highlight.line-highlight { + background: #f7ebc6; + box-shadow: inset 5px 0 0 #f7d87c; + z-index: 0; +} diff --git a/docs/src/themes/sun.svg b/docs/src/themes/sun.svg new file mode 100644 index 000000000..8fb9960c7 --- /dev/null +++ b/docs/src/themes/sun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/documentation/core-engine/declarations/BlockSource.d.ts b/documentation/core-engine/declarations/BlockSource.d.ts index c98bb7ce3..2045d02ef 100644 --- a/documentation/core-engine/declarations/BlockSource.d.ts +++ b/documentation/core-engine/declarations/BlockSource.d.ts @@ -117,7 +117,7 @@ declare class BlockSource { /** * Sets biome id by coords - * @param id - id of the biome to set + * @param id id of the biome to set */ setBiome(x: number, z: number, biomeID: number): void; diff --git a/documentation/core-engine/declarations/CoreEngine.d.ts b/documentation/core-engine/declarations/CoreEngine.d.ts index 7010aa6b7..cbc4831c0 100644 --- a/documentation/core-engine/declarations/CoreEngine.d.ts +++ b/documentation/core-engine/declarations/CoreEngine.d.ts @@ -183,7 +183,7 @@ declare function ConfigureMultiplayer(args: { name: string, version: string, isC declare type ArmorType = "helmet" | "chestplate" | "leggings" | "boots"; /** - * Default render templates used inside of InnerCore, + * Default render templates used inside of Inner Core, * currently there are only default armor models */ declare type DefaultRenderTemplate = ArmorType; \ No newline at end of file diff --git a/documentation/core-engine/declarations/CustomEnchant.d.ts b/documentation/core-engine/declarations/CustomEnchant.d.ts index 6c69e7e70..eaf6ffe18 100644 --- a/documentation/core-engine/declarations/CustomEnchant.d.ts +++ b/documentation/core-engine/declarations/CustomEnchant.d.ts @@ -1,6 +1,6 @@ /** * Module to create custom enchantments. - * Available starting from InnerCore 2.2.1b105 + * @since 2.2.1b105 */ declare namespace CustomEnchant { diff --git a/documentation/core-engine/declarations/Game.d.ts b/documentation/core-engine/declarations/Game.d.ts index 9057e3456..b569ed2dc 100644 --- a/documentation/core-engine/declarations/Game.d.ts +++ b/documentation/core-engine/declarations/Game.d.ts @@ -76,7 +76,7 @@ declare namespace Game { function isItemSpendingAllowed(player?: number): boolean; /** - * true if developer mode was enabled in InnerCore config, false otherwise + * true if developer mode was enabled in Inner Core config, false otherwise */ let isDeveloperMode: boolean; } \ No newline at end of file diff --git a/documentation/core-engine/declarations/Native.d.ts b/documentation/core-engine/declarations/Native.d.ts index 0012e0bd6..99ecb66d2 100644 --- a/documentation/core-engine/declarations/Native.d.ts +++ b/documentation/core-engine/declarations/Native.d.ts @@ -1,6 +1,6 @@ /** * Module containing enums that can make user code more readable - * @deprecated from InnerCore Test 2.2.1b89, use new enum system instead + * @deprecated 2.2.1b89, use enums instead */ declare namespace Native { /** diff --git a/documentation/core-engine/declarations/com/zhekasmirnov/innercore/api/mod/ui/elements/UIElement.d.ts b/documentation/core-engine/declarations/com/zhekasmirnov/innercore/api/mod/ui/elements/UIElement.d.ts index 11a20b783..d48829831 100644 --- a/documentation/core-engine/declarations/com/zhekasmirnov/innercore/api/mod/ui/elements/UIElement.d.ts +++ b/documentation/core-engine/declarations/com/zhekasmirnov/innercore/api/mod/ui/elements/UIElement.d.ts @@ -30,7 +30,7 @@ declare module com { */ export type BitmapTypes = string | string[] | android.graphics.Bitmap | android.graphics.Bitmap[]; /** - * There are 12 types of UI elements given by InnerCore, and you can also create your custom ones. + * There are 12 types of UI elements given by Inner Core, and you can also create your custom ones. * Each element type has its own specific description object. * These description objects are all inherited from this [[BasicElementDescription]]. * It means that each element must have coords on the GUI by X, Y, and additionally Z axis, @@ -42,7 +42,7 @@ declare module com { [key: string]: any } /** - * This is the base Java abstract class, which are all InnerCore element types inherited from. + * This is the base Java abstract class, which are all Inner Core element types inherited from. * In Java, to create custom element types, you can inherit your element class from this one as well. * Whereas in JavaScript, you should use "custom" element type in description object, * where you can specify custom behavior for different events. diff --git a/documentation/static/.nojekyll b/documentation/static/.nojekyll deleted file mode 100644 index e69de29bb..000000000 diff --git a/documentation/static/en/README.md b/documentation/static/en/README.md deleted file mode 100644 index e9ae9610c..000000000 --- a/documentation/static/en/README.md +++ /dev/null @@ -1 +0,0 @@ -> English selected... diff --git a/documentation/static/en/config/_sidebar.md b/documentation/static/en/config/_sidebar.md deleted file mode 100644 index e4d52bdc2..000000000 --- a/documentation/static/en/config/_sidebar.md +++ /dev/null @@ -1,46 +0,0 @@ -- [Horizon](/en/page/apps/horizon/index.md) - - - [Packs](/en/page/apps/horizon/packs.md) - - [Pack System](/en/page/apps/horizon/pack-system.md) - -- [InnerCore](/en/page/apps/innercore/index.md) - - - [Core Engine v2.1 API](/api/ ':ignore :target=_self') - - [Versions](/en/page/apps/innercore/changelog.md) - - - Guides - Getting Started - - - [Mod Configuration Files](/en/page/guides/getting-started/config.md) - - Minecraft - - - [Attributes](/en/page/guides/minecraft/attributes.md) - - [Player Containers](/en/page/guides/minecraft/playercontainers.md) - - Mod Api - - - [Callbacks](/en/page/guides/mod-api/callbacks.md) - - Mod Resources - - - [Materials](/en/page/guides/mod-resources/materials.md) - - Player - - - [Abilities](/en/page/guides/player/abilities.md) - - World - - - [Biomes](/en/page/guides/world/biomes.md) - - [Dimensions](/en/page/guides/world/dimensions.md) - - - Mods: - [IndustrialCraft](/en/page/mod/IndustrialCraft2.md) - - - Libraries: - [Dungeon Utility](/en/page/lib/DungeonUtility.md) - [BackpackAPI](/en/page/lib/BackpackAPI.md) - -- [Contributing](/en/page/other/contributing.md) - - [Creating new pages[OLD]](/en/page/other/create-page.md) diff --git a/documentation/static/en/page/apps/horizon/index.md b/documentation/static/en/page/apps/horizon/index.md deleted file mode 100644 index 1920504e1..000000000 --- a/documentation/static/en/page/apps/horizon/index.md +++ /dev/null @@ -1,34 +0,0 @@ -## What is HMK? - -_**HMK** - Horizon Modding Kernel App_ - -Horizon is a universal platform for launching mobile games with mods. At the moment, it supports only InnerCore, which contains Minecraft: Bedrock Edition 1.11.4 and 1.16.201. Horizon allows you to create and store several independent InnerCore packages, which in turn allows you to divide different mod packs and worlds with these packages. Development can take place in JavaScript, Java, C++ and not only. - -## Structure of the HMK pack - -1. The game on which the launcher is based -2. The launcher on which the user will play -3. The browser of mods that the user can apply to the game - -## Native mods - -Mods are written in c++ and applied to game directly. -They have full access to game and can use all its functions. - -## Useful links - -[Group in VK](https://vk.com/core_engine) - -[Video guide for setting up the environment for development](https://www.youtube.com/watch?v=ofwKkRYh97k) - -[Video guide for creating new projects and importing old](https://www.youtube.com/watch?v=ykAVJoxKTKc) - -[Tools for development of mods](https://icmods.mineprogramming.org/dev) - -[Horizon](https://play.google.com/store/apps/details?id=com.zheka.horizon) - -[Discussion in VK for sending messages about bugs](https://vk.com/topic-134044100_41523503) - -[Documentation for development of mods](https://docs.mineprogramming.org/) - -[Toolchain for development of mods](https://github.com/zheka2304/innercore-mod-toolchain) diff --git a/documentation/static/en/page/apps/horizon/pack-system.md b/documentation/static/en/page/apps/horizon/pack-system.md deleted file mode 100644 index f34d9d114..000000000 --- a/documentation/static/en/page/apps/horizon/pack-system.md +++ /dev/null @@ -1,38 +0,0 @@ -## What are packs? - -Packs are fully independent instances of games with mods (with separate saves and mods). Mods can be installed manually or using internal mod managers. - -All installed packs will be showed on main screen, to select and open a pack just click on it. After pack is selected it will be opened automatically during next launches. To exit from pack menu to pack selection press back on navigation panel. - -## How to install / remove a pack? - -To install the pack, click the large + button and select the pack you are interested in. - -To delete an already downloaded/not installed pack, you need to hold on the pack and a context menu will open, which has the following content: - -## Clonning packs - -Cloning packs allows you to create full copy of pack and all its mods and saves, that will be fully independent from original pack. To clone a pack long-click on it and press clone. - -## Deleting packs - -If you want to free storage space, used by some pack, just long-click and press delete, but notice, that it will delete all its saves. Packs will not be deleted if app is uninstalled. - -## Pack context menu - -- Add to favorites - mark this pack as a favorite -- Clone - duplicates the pack completely with all worlds and mods -- Re-install - completely reinstalls the package from the cache with the data saved -- Show info - opens a dialog box with information about the package, such as: - - Title - The full name of the pack - - Pack Description - - Game - What game was created for - - Version - The version of the current pack and the latest available version - - State - pack status - - Installed - pack is already installed - - Pending - expected download and installation - - NOT_INSTALLED - not downloaded and not installed - - Local directory -path to the pack from /sdcard/games/horizon/packs - - External UUID - UUID of pack - - Changelog - opens the full changelog for this pack -- Delete - completely deletes all pack data, including worlds, resource packs, mods, etc. diff --git a/documentation/static/en/page/apps/horizon/packs.md b/documentation/static/en/page/apps/horizon/packs.md deleted file mode 100644 index ecaf9dd3d..000000000 --- a/documentation/static/en/page/apps/horizon/packs.md +++ /dev/null @@ -1,31 +0,0 @@ -## What is in the pack - -In main menu of InnerCore pack there are 5 buttons: - -1. **Play** - button to start the game -2. **Native mods** - button on the right side of the screen to open the native mods menu -3. **Mod browser** - mod browser for this game - 1. Download mods - a tab where you can download any mods for the game. - 2. My mods - a tab where you can manage your installed mods. - 3. Modpacks - ready-made builds of mods that are created by developers - 4. Updates - list of mods that are available for update - 5. Visit website - opens a full-fledged mods site for the game -4. **Preferences and links** - 1. Pack settings - 1. **Disable the loading screen** - displaying the loading screen of mods, when turned on on some devices, it may speed up the download - 2. **Developer Mode** - useful for mod creators, includes debugging mode in supported mods. - 3. **Limitation of updates by version** - the number of updates of mods in the tick will be limited by the execution time, otherwise by the number of updated objects. Simply put, how many calls to the tick can mods make. - 4. **Maximum updates per tick** - adjustment of the _time limit_ - 5. **Advanced stream priority settings** - a higher priority of the server stream stabilizes the number of ticks per second of TPS \(this means more stable operation and response time\), however, this can cause freezes and frame drawdown per second of FPS - 6. **Server thread priority** - adjustment of the _expanded thread priority setting_ - 7. **Threshold FPS** - as long as FPS is below this threshold, the server thread will work at the lower priority, otherwise the upper priority will be set - 8. **Number of additional threads** - Additional threads are an experimental setup. On powerful devices, it can improve performance under heavy load. - 9. **Priority of additional threads** - adjustment of _the number of additional threads._ - 10. **Auto-save** - allows you to save the world and mods data if the game may abruptly shut down or incorrectly - 11. **Autosave period** - time in seconds between autosave launches_ - 12. **Enable Socket Server** - Allows players on a local network to connect to your world using sockets - 13. **Use the native protocol** - connect using the native protocol \(by default, the protocol based on _sockets_\ has a higher priority) - 14. **Force the Local Native Protocol** - _**for developers!**_ Use the native protocol for communication between the local client and the server. This setting is only needed for debugging mods and the engine, **do not use it for the game!** - 2. Guides and links - a tab with links and guides - 3. Thanks - a tab with credits of the developers, testers, mod developers - 4. About app diff --git a/documentation/static/en/page/apps/innercore/changelog.md b/documentation/static/en/page/apps/innercore/changelog.md deleted file mode 100644 index 1fd2bd147..000000000 --- a/documentation/static/en/page/apps/innercore/changelog.md +++ /dev/null @@ -1,610 +0,0 @@ -## 2.2.1b105 - -- Added experimental API for creating custom enchants: -- Minor optimization for C++ to Java calls -- Minor fixes for icons in UI - -## 2.2.1b104 - -- Fixed last item in hend was not spending -- Fixed animated liquid textures -- Fixed endless custom buckets in survival -- Now changing items in ItemUse callback are handled correctly when not prevented -- Added Block.registerClickFunction[ForID](nameId/id, (coords, item, block, player) => void) -- Fixed position, passed dispense callback, added slot parameter (4th argument) - -## 2.2.1b103 - -- When creating liquids you can now automatically create buckets with full functionality (see docs) -- Added isRenewable parameter for custom liquids -- Fixed bucket interaction with custom liquids - -## 2.2.1b102 - -- Added methods for creating liquid blocks, docs: -- Fixed some mod manager issues and crashes, added ability to search mod by its id -- Added Entity.hasEffect(entity, effectId) and Entity.getEffect(entity, effectId) -- Added BlockSource.setDestroyParticlesEnabled(boolean) method -- Fixed Item.invokeItemUseOn not using given entity block source -- Fixed vanilla swords tool data -- Fixed destroying attachables was causing crash -- Fixed creating block states by block id -- Fixed BlockState.addStates was not accepting JS object -- Other minor fixes - -## 2.2.1b101 - -- Fixed some fence blocks were not displayed correctly in world - -## 2.2.1b100 - -- Added Block.getMaterial(blockId) -- Added PlayerActor methods: getItemUseDuration(), getItemUseIntervalProgress(), getItemUseStartupProgress() -- Fixed multiplayer mod list was built with incorrect mod info -- Fixed BlockSource.listAllEntitiesInAABB was not returning player, when passed no filter parameters - -## 2.2.1b99 - -- Fixed syncing runtime ids in multiplayer could fail -- Fixed multiplayer mod list check was not working -- Fixed startup crash on old android versions on some devices - -## 2.2.1b98 - -- Fixed Commands.exec -- Fixed Entity.getNameTag - -## 2.2.1b97 - -- Now when connecting to remote world, additional synchronization is done, to assure block runtime ids will match even in case of different mods. - -## 2.2.1b96 - -- Added methods Recipes.getAllWorkbenchRecipes() and Recipes.getAllFurnaceRecipes() -- Added method BlockSource.getBiomeDownfallAt(x, y, z) -- Added slot element properties: iconScale and disablePixelPerfect -- Added methods for UI.Window: updateScrollDimensions() and updateWindowPositionAndSize() -- Added new text alignment type: 3 - ALIGN_CENTER_HORIZONTAL -- Added functon runOnClientThread(function), works as runOnMainThread, but for client ticking thread -- Fixed some item ids compatibility and related recipes - nether start, melon, records, horse armor, fireball, fireworks -- Fixed chestplate model for modded armor - -## 2.2.1b95 - -- Added BlockSource methods setExtraBlock(x, y, z, BlockState/[id, data]) and getExtraBlock(x, y, z) -> BlockState to access and modify extra blocks, such as liquids in other blocks -- Added block description parameters "can_contain_liquid" and "can_be_extra_block" -- Added methods Block.canContainLiquid(id) and Block.canBeExtraBlock(id) -- Fixed settings changes were not applied on first launch after change -- Fixed crashes in mod config -- Fixed language settings were not loaded correctly -- Added developer option to output block state info dump - -## 2.2.1b94 - -- Fixed new modpack selecting bug from 2.2.1b93 -- Fixed Item.isValid(id), added IDRegistry.getStringIdAndTypeForIntegerId(id), IDRegistry.getTypeForIntegerId(id), IDRegistry.getStringIdForIntegerId(id) -- Fixed getEnchantName from ItemExtraData - -## 2.2.1b93 - -- Fixed modded food -- Restored basic functionality of PathNavigation -- Added API to override underwater fog parameters and fixed underwater fog in custom dimensions -- Added EntityAddedLocal and EntityRemovedLocal callbacks - client side variants of EntityAdded and EntityRemoved -- Fixed Entity.setOffhandItem -- Added Dimensions.getAllRegisteredCustomBiomes() method, returning map of all custom biomes -- Various possible in-game chashes fixed -- Fixed some mod manager crashes & minor redesign -- Fixed wrong modpack can be loaded, when multiple modpacks are installed -- Improved Chinese support - -## 2.2.1b92 - -- Errors in updatables (for example machines) now will not shutdown all mods until world reload. Instead it will disable only updatable, causing error. -- Crash fixes - -## 2.2.1b90-91 - -- Previous version hotfix - -## 2.2.1b89 - -- Fixed bug when block ids were not synced in multiplayer -- Added vanilla block states API -- Fixed workbench for connected players -- Fixed generation callbacks errors -- Improved saves stability -- Fixed links and guides page -- Fixed excess items were added to creative - -## 2.2.1b88 - -- Added callback EntityPickUpDrop(entity, dropEntity, dropStack, count), it is called, when entity picks up dropped item, right now works only for players -- Updated guides and links page, added links to mod and modpack development guides -- Minor fixes for ItemModel and other crashes and errors - -## 2.2.1b87 - -- Fixed modpack system and mod manager issues -- Fixed missing or invalid workbench recipes and item icons -- Added useful links to preferences and links menu - -## 2.2.1b86 - -- Global engine optimization will increase overall modded performance -- Fixed lags in creative inventory, when items with extra data are present -- Minor optimization for creative search - -## 2.2.1b85 - -- Massive update to mod manager with alot of new features, fixes and improvements -- Added modpack support, including installation, modification and creating your own -- Block models are now loading faster and consume less RAM -- BlockSource.breakBlock/ForJsResult methods now also invoke DestroyBlock callback, if actor is passed as a parameter and exists in BlockSource's dimension (and it was not prevented by BreakBlock callback) - -## 2.2.0b84 - -- Added PreProcessChunk and PostProcessChunk callbacks - universal world generation callbacks. First one called before vanilla structures generation and second one after it. All others callbacks are called after vanilla generation but before PostProcessChunk -- Fixed missing bed and chest recipes -- Fixed using mesh in ActorRenderer -- Fixed rare crashes when entering and leaving the world -- Fixed transparency was not working for far blocks -- Fixed config.json interaction with .redirect -- Added slot element binding selection_forced - -## 2.2.0b83 - -- Rework for block drop system -- Added callback BreakBlock (BlockSource, position, block, isDropAllowed, player, item) - called when block is destroyed, unlike DestroyBlock can be called not only when block is destroyed by player, but also by new BlockSource methods. This callback is used for block drops, player destroy logic must remain in DestroyBlock -- Drop functions now using BreakBlock -- Added blocksource methods BlockSource: breakBlock(x, y, z, isDropAllowed[, actor][, item]) - destroys block, calls BreakBlock, breakBlockForJsResult(x, y, z[, actor][, item]) - same as breakBlock, but instead of dropping items and exp orbs, returns: {experience:, items: [{id:, count:, data:, extra:}, ...]} - -## 2.2.0b82 - -- Added ItemContainer methods setSlotSavingEnabled(name, enabled), setGlobalSlotSavingEnabled(enabled), they are used to control, which slots are saved -- Added parameter to destroy method of tile entity, that indicates, if it was destroyed in DestroyBlock callback -- Optimized inventory editing methods for player -- Fixed editing player abilities, including flying -- Fixed server open listener in ItemContainer was called before open packet is sent -- Fixed some furnace recipes -- Fixed loading bug on older android versions -- Fixed breaking ice - -## 2.2.0b79-81 - -- Added missing and fixed existing workbench recipes -- Fixed constant startup crashes on some devices (new bug since 1.16.201) -- Fixed frequend startup crashes on some devices (old bug since 1.11.4) - -## 2.2.0b78 - -- Continued fixing worldgen - -## 2.2.0b77 - -- Fixed modded world generation was called multiple times per chunk. It will significantly reduce lag. -- Modded world generation now called AFTER vanilla worldgen. -- Another attemt to fix loading mods on some devices -- Added log methods: Logger.debug(tag, message), Logger.info(tag, message), Logger.error(tag, message[, error]); - -## 2.2.0b76 - -- Fixed loading mods with resource packs -- Fixed saves errors -- Fixed loading mods on some devices -- Added parameter "category" in Item.createItem - -## 2.2.0b75 - -- Updated for Minecraft 1.16.201 -- Multiplayer might experience some issues with ID sync, if it happens, try swapping host and client -- Added API for armor and attachable renderer -- Major refactor for mod loader -- Major refactor for saves system and some other engine modules -- Started working on ECS and Java API - -## 2.1.0b72 - -- Now, when connecting to host with some blocks or items, missing on client, placeholders will be created to prevent crash -- Native protocol tested on extremely high load, possible lags and crashes fixed - -## 2.1.0b71 - -- Saving previously logged in Xbox account (experimental) -- Minor fixes - -## 2.1.0b70 - -- Added multiplayer FAQ in Xbox login window. -- Increased initialization packet timeout up to 90 seconds. -- Fixes for network entities -- Other minor fixes - -## 2.1.0b69 - -- Nice, we have reached this point -- Fixed items with extra data were sometimes invisible in vanilla UI -- Added getLightLevel(x, y, z) to BlockSource - -## 2.1.0b68 - -- Minor improvements to native protocol (Xbox multiplayer). - -## 2.1.0b65-67 - -- Made Xbox login functional on most devices. - -## 2.1.0b64 - -- Added experimental custom xbox login feature. You can connect to your friends from xbox account with same mods as yours (with multiplayer support). Xbox connection will use only native protocol, that was added in 2.1.0b63. - -## 2.1.0b63 - -- Added ability to use multiplayer with native minecraft protocol. This option can be turned on in engine config. Native protocol might reduce ping, but could be less stable. -- Minor fixes - -## 2.1.0b61-62 - -- Fixes for ItemContainer and BlockSource -- Other fixes - -## 2.1.0b60 - -- Added method exists() to animations -- Minor fixes - -## 2.1.0b59 - -- Added methods BlockRenderer.setCustomRaycastShape(id, data, collisionShape), BlockRenderer.setCustomCollisionAndRaycastShape(id, data, collisionShape) -- Added methods BlockRenderer.mapCollisionModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapRaycastModelAtCoords(dimensionId, x, y, z, model), BlockRenderer.mapCollisionAndRaycastModelAtCoords(dimensionId, x, y, z, model), for collision and raycast shape mapping, passing null model will unmap it, mapping works on any block including air -- Added BlockSource method getBlock(x, y, z), returning object, that contains both id and data -- Clearing mapped render models (not collision ones) on local player dimension change as well as animations -- Other minor fixes - -## 2.1.0b58 - -- Minor fixes - -## 2.1.0b57 - -- Added method Network.inRemoteWorld() - returns true, if player connected to remote world -- Added callback ItemUseLocal(coords, item, block, player) for client side item use -- Added callback ConnectingToHost(host, minecraftPort, moddedPort) -- Improvements for NetworkConnectedClientList -- Added method BlockSource.getCurrentClientRegion() -- Other minor fixes - -## 2.1.0b56 - -- New item caching system, that caches every complex icon, not only custom models and allows creating of model cache groups -- Call ItemModel.setCurrentCacheGroup("groupName", "version") at the start of your mod to create cache group, it will be applied to all models, created at the root of your mod (including default ones). If specified version does not match cache version, whole group will be re-created. -- Fixed ItemContainer interaction with items with extra data. - -## 2.1.0b55 - -- Fixed compatibility with Recipe Viewer -- Added block special type parameter color_source, can be one of "none", "leaves", "grass", "water" -- Sped up loading of item models and made it less RAM consuming -- Minor improvements - -## 2.1.0b48-54 - -Following updates contain fixes for multiplayer update. - -## 2.1.0b47 - -This update adds experimental LAN multiplayer support, allowing players on same Wi-Fi and same set of mods play together. - -ALL MODS NEED TO BE UPDATED TO SUPPORT MULTIPLAYER. Playing with mods without multiplayer support (warning will appear) might cause undefined behaviour or even crash, so do it at your own risk. - -Alot of new API modules, callbacks and functions were introduced in this update, but backwards compatibility remains. There will be a migration guide for mod developers. - -## 2.0.5b46 - -- Fixed 2.0.5b45 bug, which caused icon problems of items with extra data -- Fixed mod manager didnt show redirected mods - -## 2.0.5b45 - -- Added item model method setModelOverrideCallback(function(item) {...}), acts like itemOverrideFunctions, but returns ItemModel instance, instead of icon -- Added method ItemModel.newStandalone(), creates empty ItemModel instance, not linked to any item, this models should be used in setModelOverrideCallback -- Item override function now receives extra data -- Fixed crash, caused by calling toScriptable() method of NBT tags -- D8 dexer, instead of old DX is now used to build dex files from java - -## 2.0.5b44 - -- Mods now can access and modify NBT of entities, tile entities and items. Docs are located at the bottom. -- Added functions: Entity.getCompoundTag(entity), Entity.setCompoundTag(entity, tag) -- Added methods to vanilla TileEntity, returned by World.getContainer(): getCompoundTag(), setCompoundTag(tag) -- Added methods to ItemExtraData: getCompoundTag(), setCompoundTag(tag) -- Mod UI now supports modded animated item icons -- Icon override functions now receives second parameter - isModUi -- Added function Debug.big, acts like Debug.m, but outputs dialog with selectable text and pretty JSON -- TileEntity function click now receives additional parameter - click coords -- Fixed rare addon-related crash - -NBT.CompoundTag (map, string keys): - -- constructor() - creates empty tag -- constructor(NBT.CompoundTag) - creates tag copy -- toScriptable() - returns javascript object, that represents contents -- getAllKeys() - returns java array with all keys -- contains(key) - checks tag contains key -- containsValueOfType(key, type) - checks tag contains key and value is desired type -- getValueType(key) - returns value type by key (type is integer) -- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key) - value getters -- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(key, value) - value setters -- remove(key) - deletes value by key -- clear() - deletes all values - -NBT.ListTag (list, non-negative integer indices): - -- constructor() - creates empty list -- constructor(NBT.ListTag) - creates list copy -- toScriptable() - returns javascript object, that represents contents -- length() - returns list length -- getValueType(index) - returns value type by index (type is integer) -- get(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index) - returns value by index -- put(Byte|Short|Int|Int64|Float|Double|String|CompoundTag|ListTag)(index, value) - set value by index, if index >= length, adds to the end, if index < 0 adds to beginning, else replaces -- clear() - deletes all values - -## 2.0.4b43 - -- Automatically deleting resource and behavior packs from uninstalled mods upon world load -- RenderMesh now can receive not only absolute file path, but also resource path and name of file in models/ dir in resources. -- Deprecated slot element parameters isTransparentBackground and needClean, now slot supports transparent background by default -- Added container method setOnOpenListener(function(container, window) {...}) -- Removed shared objects, built for x86 ABI to reduce overall weight -- Fixed error, that occurred after second WRAP_JAVA call on same class - -## 2.0.4b42 - -- Callback.addCallback now has third optional parameter - priority (integer, default value is 0). Callbacks with higher priority will be called earlier -- UI slots now support animated background (texture name array must be passed instead of single name). For other textures in UI this feature was already present. -- UI slots now has text parameter, also container.setText work on them. If this parameter is not null, it value will be shown instead of count -- World.clip now works on actors, but only on certain mode parameter values. -- Fixed block icon generation for ICRender models. - -## 2.0.4b41 - -- Attemt to fix blurry UI on some devices - -## 2.0.4b40 - -- Optimized mod UI, making it a bit faster and consume less RAM -- Added new mode for standard window, making all contents appear in separate window instead of background one. To use it in a new mode, use UI.StandardWindow instead of misspelled UI.StandartWindow -- Resource and behavior packs are now injected inside each world upon enter -- Animations (static models) are now cleaned up on dimension change -- Animations are now garbage collected after they are destroyed in world -- Added Updatable.addAnimator(updatable_object), which adds updatable, that ticks on client thread and never saves - -## 2.0.4b39 - -- Minor fixes for previous version - -## 2.0.4b38 - -- Added TagRegistry module. Docs will be available after some tests and maybe rework. -- Added particle type properties framesX and framesY, which define frame grid size. -- Added particle type property rebuildDelay, which defines time in ticks between particle mesh updates -- Added particle type properties color2 and animators.color, which allow animation of particle color -- Fixed slabs drop -- Fixed some textures in ui - -## 2.0.4b37 - -- Custom dimension generator got heavy optimizations by decreasing noise level of detail. However, custom level of detail now can be set to individual noise generators. -- ItemModel got new methods, that can set custom bitmap as icon in mod ui -- Added DimensionLoaded(currentId, lastId) and DimensionUnloaded(unloadedId) callbacks - -## 2.0.4b36 - -More minor fixes - -## 2.0.4b34-35 - -- Inner Core preferences menu was majorly improved and new settings were added -- Fixed critical error, that could cause server thread to stop -- Fixed OutOfMemory crashes, that could occur during startup -- Alot of minor fixes from GP statistics -- After installing mod you can now install all its dependencies -- Saving system improved: overall stability increased, saves backup is created and all saves errors, if occured, are now displayed in one window instead of one window per error -- Main menu is slightly redesigned -- Added function Entity.getAllInsideBox(coords1, coords2[, type, flag]) -- Added function Entity.getDimension(entity) -- Added function Item.setAllowedInOffhand(id, allowed) -- Added function Game.simulateBackPressed() -- PathNavigation is majorly fixed and improved -- Fixed Entity.setCarriedItem/setOffhandItem/setArmor were not sending data to client on non-player entities -- Fixed some crashes, that could occur while transferring between dimensions -- Fixed rotation of animations -- Fixed error, that caused mod behavior packs to be ignored on first launch -- Fixed duplication mod behavior packs in world folder -- Fixed Entity.spawn was working incorrectly with addon entities -- Fixed Translation module doing English to English translations -- Increased item name caching capacity -- Fixed window method setTouchable not working for game overlays -- Other minor stability-related fixes - -## 2.0.3b33 - -- Added support for custom shader uniforms, that can be passed for individual models (more documentation will be released soon) -- Added support for controlled entity navigation via Entity.getPathNavigation(entity) -- Added function Entity.getAttribute(entity, name) to access and modify entity attributes -- Added functions: Player.setAbility(name, value), Player.getFloatAbility(name), Player.getBooleanAbility(name) -- Added uniform vec3 VIEW_POS to shaders on world models (animations) - -## 2.0.3b32 - -- Fixed vanilla particles and mod models with blending drawing behing alpha-tested blocks and clouds - -## 2.0.3b31 - -- Minor fixes, including custom dimensions and block meshes in hand render - -## 2.0.3b30 - -- All changes applied to main version -- Fixed item icons with metadata - -## 2.0.2b29 - -- Better TileEntity system: now unloaded TileEntities, or ones without tick function will not be counted, when checking updatable limit. Added TileEntity functions load(), unload() and onCheckerTick(isInitialized, isLoaded, wasLoaded) -- Fixed crash with mob custom models -- Other minor fixes - -## 2.0.2b28 - -- Added option disable_loading_screen, that disables loading screen and loads mods on main thread -- Fixed World.clip, RenderMesh.clone, Block.setupAsRedstone[Receiver/Emitter] -- Fixed some crashes from item models - -## 2.0.2b27 - -- Fixed issue with spending items when tapping on block with UI -- Added functions to World module: clip(x1, y1, z1, x2, y2, z2), doesVanillaTileHasUI(id), setBlockUpdateAllowed(true, false), setBlockUpdateType(type) -- Fixed functions for player experience work -- Fixed meshes after app was minimized - -## 2.0.2b26 - -- Added server thread priority to Inner Core config -- Added Block.registerNeighbourChangeFunction[ForID](id, function(coords, block, changeCoords){}) -- Added Block.registerEntityInsideFunction[ForID](id, function(coords, block, entity){}) -- Added Block.registerEntityStepOnFunction[ForID](id, function(coords, block, entity){}) -- Added RenderMesh methods rotate(x, y, z, rx, ry, rz), fitIn(x1, y1, z1, x2, y2, z2[, keepRatio]), clone() -- Fixed colors and mesh position in item models - -## 2.0.2b25 - -- Added block description property - sound, sets one of standard block sound types -- Added RenderMesh method setLightPos(x, y, z) - set relative position for block lighting -- Added RenderMesh method parameter setFoliageTinted(leavesType) -- Fixed ItemModel.occupy() method not preventing setting ICRender models - -## 2.0.2b24 - -- Fixed crash from massive amount of blocks with RenderMesh -- Added methods to RenderMesh - setNoTint(), setGrassTinted(), setFoliageTinted(), setWaterTinted() -- Added preloader scipt methods - Resources.getAllMatchingResources("regex"), Resources.getResourcePath("local path"), Resources.getAllResourceDirectoriesPaths() - -## 2.0.2b23 - -- UI and world item models engine was fully rewritten: - - Mod UI support custom item models (non-meshes for now) - - Item animations now based on RenderMesh and support custom item models and materials - - Generating item models moved to new loading phase - - Item model caching will make their generation much faster after first launch - - ItemModel API module is massively improved and allows access to all model-related stuff - - Additional materials can be passed to handle glint on item models - - Block rendertype parameter is fixed and will affect block item model Other improvements: - - Added condition ICRender.RANDOM(value, max[, seed]) - for given block position generates random number from 0 to max - 1, and returns, if it is equal to value. Has method setAxisEnabled(0-2, enabled) to ignore some axises. - - Added functions Block.setupAsRedstoneReceiver(nameID, connectToRedstone), Block.setupAsRedstoneEmitter(nameID, connectToRedstone, Block.setupAsNonRedstoneTile(nameID) - - RenderMesh: added method addMesh(mesh[, x, y, z[, scaleX, scaleY, scaleZ]]), alpha value now can be passed to setColor - - Added block description property - mapcolor, sets 0xRRGGBB map color to block - -## 2.0.2b22 - -- Minor fixes and improvements - -## 2.0.2b21 - -- (Experimental) Global optimization, attempting to increase FPS by using dynamic thread priority -- (Experimental) World generation optimized -- Minor fixes for item models - -## 2.0.2b20 - -This update adds alot and might be unstable. - -- Added ability to create custom materials and shaders (more info will be provided soon) -- Added UI and in-hand item models, to access use ItemModel.getFor(id, data) -- Added new animation mode - direct mesh render with material, to enter this mode call method describe({mesh: RenderMesh, skin: "texture name", material: "material name"}) -- Blocks with ICRender will automatically gain inventory models -- Added custom dimension methods: setFogDistance(close, far), resetFogDistance() -- Other minor fixes - -## 2.0.1b18 - -- Added directories innercore/resource_packs, innercore/behaviour_packs for adding resource and behaviour packs -- Local world resource and behaviour packs are now automatically forced for this world -- Added module AddonEntityRegistry and functions to work with addon-added mobs -- Minor fixes - -## 2.0.1b17 - -- Added GenerationUtils.generateOreCustom(x, y, z, id, data, amount, mode, listOfIds[, seed]), also added optional seed parameter to GenerationUtils.generateOre -- Fixed drops from World.destroyBlock -- Fixed Player.setHunger, Player.setSaturation, Player.setExhaustion -- Fixed some block drops - -## 2.0.1b16 - -- Added machine place sound -- Fixed some block drops -- Minor fixes for custom dimensions - -## 2.0.1b15 - -- Attempt to optimize biome map - -## 2.0.1b14 - -- Temporary disabled biome maps - -## 2.0.1b13 - -- Minor fixed and optimizations - -## 2.0.1b12 - -- Added better API for new custom dimensions -- Fixed empty and non ASCII base item name crash (Mods like Divine RPG) - -## 2.0.1b11 - -- Added API for custom biomes -- Added callback GenerateBiomeMap, that uses World.get/setBiomeMap to build chunk biome map before any generation -- Added new parameters to generation callbacks: (chunkX, chunkZ, random, dimensionId, chunkSeed, worldSeed, dimensionSeed) -- Added GenerationUtils.getPerlinNoise(x, y, z, seed, scale, numOctaves) -- Added World.addGenerationCallback(callbackName, callback[, hashString]), that uniquely modifies chunk seed before calling callback - -## 2.0.1b10 - -- Added mod loading UI -- Mods are now loading in separate thread -- Fixed UI hangs after fast-clicking on block or item with UI -- Fixed some errors with drops and tools -- Fixed fatal error tip message randomly appearing during world load - -## 2.0.0b9 - -- Completed classic mod UI and workbench UI -- Now mod UI will close when back is pressed or app is minimized -- Fixed possible crashes from render mapping and Item.getName -- Now when all mods are stopped in case of an fatal error it is displayed as tip message -- Applied stability fixes from build 8 - -## 2.0.0b8 - -- anoter attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required), after all this attempts best solution from builds 6-8 will be selected -- fixed new workbench - -## 2.0.0b7 - -- anoter attempt to fix stability, eliminate lags and crashes upon minecraft loading (checks for crashes are required) - -## 2.0.0b6 - -- more stability fixes (report any new or more frequent crashes) -- classic-styled workbench -- started migrating mod UI to classic style - -## 2.0.0b5 - -- fixes for system versions lower than Android 9 - -## 2.0.0b4 - -- some UI fixes, mostly for devices with cutout diff --git a/documentation/static/en/page/guides/getting-started/config.md b/documentation/static/en/page/guides/getting-started/config.md deleted file mode 100644 index 04cb976a0..000000000 --- a/documentation/static/en/page/guides/getting-started/config.md +++ /dev/null @@ -1,74 +0,0 @@ -## config.json - -To make the behavior of your mod dependent on some user-defined settings, use mod configuration file. Configuration file is a JSON file stored in the mod's root directory and called _config.json_. To access this configuration file from your code, use [[__config__]] global variable. - -The only option that should always be present in your mod is _enabled_. If it is not in the mod configuration file, it will be added automatically. - -An example of mod configuration file: - -```json -{ - "enabled": true, - "topLevelSetting": 12, - "someSettingsGroup": { - "key1": "value1", - "key2": true - } -} -``` - -As you can see, some of the settings may be nested, so that you can group them accordingly. It is generally not recommended to use more then two layers of nested settings, since when displaying in mods manager they are flattened to a two-layer structure. - -## config.info.json - -All the settings of the mod can be changed from Inner Core's Mods Manager module. By default, Mods Manager uses text inputs for numbers and strings and switches for boolean values. It also generates readable setting names from property names, e.g. `some_sample_setting` gets transformed into **"Some sample setting"**. Thus, in most cases, the settings are visualized correctly. However, you might want to change the controls' look, localize settings names or supply descriptions. To customize the way your settings are displayed, you can place a JSON file called _config.info.json_ in the mod's root directory. A simple example of such a file is given below: - -```json -{ - "description": "This is a global config description", - "properties": { - "topLevelSetting": { - "name": "Some setting", - "type": "SeekBar", - "min": 10, - "max": 120 - }, - "someSettingsGroup": { - "name": "GROUP", - "collapsible": false, - "displayIf": "enabled" - }, - "someSettingsGroup.key1": { - "name": { - "en": "Some setting", - "ru": "Некая настройка" - }, - "description": { - "en": "Some setting allows to do something cool", - "ru": "Некая настройка позволяет сделать нечто крутое" - } - } - } -} -``` - -- **description** option allows to specify the description of the whole config file that will be displayed at the top of config view - -- **properties** option is an object containing option names (dot-separated for nested settings) as keys and their properties objects as values. All available properties of options are listed below: - - - _name_ specifies the actual name of the setting. Can be either a string or an object containing language codes as keys and localized strings as values. In the second case, English (_"en"_) localization is required - - - _description_ specifies the description that will be displayed above the setting. Can be either string or an object like in the _name_ property - - - _collapsible_ can be applied only to settings group. If false, the group is expanded by default and cannot be collapsed. Defaults to true - - - _display_ allows to hide settings by specifying as false. Defaults to true - - - _displayIf_ allows to display settings only if some boolean setting is either true or false. Use `"displayIf": "propertyName"` to display the setting if the appropriate property is true and `"displayIf": "!propertyName"` to display the setting if the appropriate property is false - - _index_ is used to specify the order of settings in the config view. The settings with specified indexes go first, then the settings with no indexes in the order they appear in the _config.json_ file. Note that the indexes work only on the single layer of nested settings, so that you can rearrange settings inside the group - - - _type_ allows for some additional setting appearance modification. The only currently supported explicit setting type is a _"SeekBar"_. It creates a slider for numeric values rather then just a text input - - - _min_ specifies the minimum value for the _SeekBar_ settings - - - _max_ specifies the maximum value for the _SeekBar_ settings diff --git a/documentation/static/en/page/guides/minecraft/playercontainers.md b/documentation/static/en/page/guides/minecraft/playercontainers.md deleted file mode 100644 index 036ae6683..000000000 --- a/documentation/static/en/page/guides/minecraft/playercontainers.md +++ /dev/null @@ -1,118 +0,0 @@ -Containers allow to store items in TileEntities and some entities. - -ContainerCategory - maybe type of container \ -ContainerEnumName - maybe unique id of container or id of name - -## Known containers in inventory - -### armor_items -#### ContainerModel -FilteredContainerModel \ -ContainerCategory = 1 \ -ContainerEnumName = 6 - -### combined_hotbar_and_inventory_items -#### ContainerModel -FilteredContainerModel \ -ContainerCategory = 1 \ -ContainerEnumName = 12 - -### hotbar_items -#### ContainerModel -FilteredContainerModel \ -ContainerCategory = 1 \ -ContainerEnumName = 27 - -### inventory_items -#### ContainerModel -FilteredContainerModel \ -ContainerCategory = 1 \ -ContainerEnumName = 28 - -### offhand_items - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 1 \ -ContainerEnumName = 33 - - -### crafting_input_items - -#### ContainerModel -FilteredContainerModel \ -ContainerCategory = 2 \ -ContainerEnumName = 13 - -### cursor_items - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 2 \ -ContainerEnumName = 58 - - -### crafting_output_items - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 14 - -### recipe_construction - -Stores items in Construction tab. -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 15 - -### recipe_nature - -Stores items in Nature tab. - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 16 - -### recipe_items - -Stores items in Items tab. - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 17 - -### recipe_search - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 18 - -### recipe_equimpent - -Stores items in Equimpent tab. - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 20 - -### creative_output_items - -#### ContainerModel - -FilteredContainerModel \ -ContainerCategory = 3 \ -ContainerEnumName = 59 diff --git a/documentation/static/en/page/mod/IndustrialCraft2.md b/documentation/static/en/page/mod/IndustrialCraft2.md deleted file mode 100644 index 274676be4..000000000 --- a/documentation/static/en/page/mod/IndustrialCraft2.md +++ /dev/null @@ -1 +0,0 @@ -[IC2](https://raw.githubusercontent.com/MineExplorer/IndustrialCraft_2/master/README.md ':include') \ No newline at end of file diff --git a/documentation/static/en/page/other/create-page.md b/documentation/static/en/page/other/create-page.md deleted file mode 100644 index c7ff8c15b..000000000 --- a/documentation/static/en/page/other/create-page.md +++ /dev/null @@ -1,111 +0,0 @@ -## Create your mod page - -### Adding page content - -Before we start writing your mod page, we need to learn about Markdown format. -You can goto [this page](https://www.markdownguide.org/getting-started/) to learn what is Markdown. -And [this page](https://www.markdownguide.org/basic-syntax/) to learn basic markdown syntax. - -After learning about Markdown format, you can start writing your pages. - -1. Create your folder inside `./static-pages/mods/list/` folder. -2. Create your `some_file_name.md` file inside your folder. -3. Write your page content in `some_file_name.md` file. - -### Creating routes for your pages - -Before we start creating routes for your pages, we need to learn about JSON format. - -I recommend you to read this pages: - -1. [JSON format documentation](https://www.json.org/json-en.html) - Website has many translations, choose the one you need to learn -2. [Short description about the JSON format](https://www.w3schools.com/whatis/whatis_json.asp) - -After you will learn about JSON format, you can start creating your pages. - -### To create page routes - -1. Goto `pagesconfig.json` -2. Find `Mods` group inside `groups` -3. Find Mod List -4. Create your `child page` from [Page template](#page-template) -5. Add your `child page` to `Mod List`.`children` like `pagesconfig.json` example - -***Important!*** All folders and files must have relative path to `./static-pages/mods/list` folder. - -#### `pagesconfig.json` - -```json -{ - "groups": [ - // ... Apps ... - // ... Guides ... - { // Mods group - "title": "Mods", // Group title - "source": "./static-pages/mods", // Source directory, path: ./static-pages/mods/ - "output": "./mods", // Output directory, result path: ./out/pages/mods - "pages": [ - // ... About mod documentation ... - { - // Mod list - "title": "Mod List", // Page title - "source": "./index.md", // Page file source, path: ./static-pages/mods/index.md - "output": "./list", // Output directory, result path: ./out/pages/mods/list - "children": [ - { // Child page: start - "title": "IndustrialCraft2", // Children page title - "source": "./list/industrialCraft2", // Children directory, path: ./static-pages/mods/list/industrialCraft2 - "output": "./industrialCraft2", // Output directory, result path: ./out/pages/mods/list/industrialCraft2 - "groups": [ - { - "title": "IC2 Documentation", // Group title for mod - "output": "./", // Output directory for pages, result path: ./out/pages/mods/list/industrialCraft2 - "pages": [ - { - "title": "IC2 child page 1", // Mod child page - "source": "./page1.md" // Page file, any_name.md, path: ./out/pages/mods/list/industrialCraft2/page1.md - }, - { - "title": "IC2 child page 2", // Mod child page - "source": "./page2.md" // Page file, any_name.md, path: ./out/pages/mods/list/industrialCraft2/page2.md - } - ] - } - ] - } // Child page: end - // ... Other mods ... - ] - } - ] - } - // ... Libraries ... - ] - // ... other configs ... -} -``` - -### Page template - -```json -{ // Child page: start - "title": "IndustrialCraft2", // Children page title - "source": "./list/industrialCraft2", // Children directory, path: ./static-pages/mods/list/industrialCraft2 - "output": "./industrialCraft2", // Output directory, result path: ./out/pages/mods/list/industrialCraft2 - "groups": [ - { - "title": "IC2 Documentation", // Group title for mod - "output": "./", // Output directory for pages, result path: ./out/pages/mods/list/industrialCraft2 - "pages": [ - { - "title": "IC2 child page 1", // Mod child page - "source": "./page1.md" // Page file, any_name.md, path: ./out/pages/mods/list/industrialCraft2/page1.md - }, - { - "title": "IC2 child page 2", // Mod child page - "source": "./page2.md" // Page file, any_name.md, path: ./out/pages/mods/list/industrialCraft2/page2.md - } - ] - } - ] -} // Child page: end -``` diff --git a/documentation/static/en/page/wiki/building-mods/mod_structure.md b/documentation/static/en/page/wiki/building-mods/mod_structure.md deleted file mode 100644 index 9d50c6d27..000000000 --- a/documentation/static/en/page/wiki/building-mods/mod_structure.md +++ /dev/null @@ -1,138 +0,0 @@ -## Структура модов - -Mod on Inner Core is a directory with build.config file, also can be several additional files, such as description file and default configuration file. Last one will be created automatically. - -Если вы не хотите вдаваться в подробности построения модов, вы можете использовать стандартный шаблон мода, который описан [здесь](/ru/page/inner-core/standart-mod-template). - -en: If you don't want to dive into the details of the build of mods, you can use the standard mod template, which is described [here](/ru/page/inner-core/standart-mod-template). - -## Конфиг и описание - -Файл конфига - config.json - задается в формате JSON и генерируется, либо исправляется автоматически. Всегда будет присутствовать значение enabled, которое включает/выключает весь мод. Содержимое этого файла будет визуализировано в меню мода, которое открывается через меню Inner Core. Работа с этим файлом производистся целиком из кода. - -Файл информации - mod.info - задается в формате JSON и может не пристуствовать, однако тогда информации о моде в меню Inner Core не будет, название мода будет по имени директории и т.д. - -Формат файла mod.info: - -```javascript -{ -"name":"Имя мода", -"author":"Автор мода", -"version":"Версия мода в любом формате", -"description":"Краткое описание мода" -} -``` - -Также директория мода может содержать файл mod_icon.png, который будет являться иконкой мода в меню Inner Core. Важен только формат - png - размер может быть любым. - -## Основные параметры - -Файл построения задается в формате JSON и имеет несколько разделов, в которых описываются различные настройки и элементы мода. Первый раздел - defaultConfig - является обязательным и описывает основные параметры построения мода. С ним содержимое файла построения будет выглядеть следующим образом (комментарии, помеченные символом #, присутствовать не должны): - -```javascript -{ - "defaultConfig": { - "api":"CoreEngine", #API, которое будет использовано для всех выполняемых файлов по-умолчанию, варианты API будут перечислены далее - "buildType":"develop", #Этот параметр при разработке должен быть develop, далее он будет изменяться с помощью Inner Core - "libraryDir":"lib/", #Необязательный параметр, который задает стандартную директорию, откуда будут загружаться библиотеки. - } -} -``` - -API задает абсолютное большинство методов, которые могут использовать исполняемые файлы мода. Однако есть набор базовых методов, которые доступны для конкретных типов выполняемых файлов. Виды API: -*CoreEngine - Основной и самый объемный API для разработки модов. В основном вам нужно будет использовать его, остальные варианты более ситуативны и не нужны в большинстве случаев. -*AdaptedScript - Реализует основные возможности, однако не имеет различных реализаций, сильно упрощающих разработку, таких как Tile Entity. - -## Исполняемые файлы - -Исполняемые файлы содержат исходный код мода, написаный под нужный вариант API на JavaScript, которые будут выполняться в различные моменты, зависящие от их типа. Так же их можно строить из отдельных директорий и компилировать в байт-код из меню Inner Core для быстродействия и лучшего дебага (релизные версии мода). - -Исполняемые файлы описываются в разделе compile, который является массивом. Их может быть сколько угодно много: - -```javascript -{ - "defaultConfig": { - //... - }, - ... - "compile": [ - { - "path":"Локальный путь к файлу, к примеру main.js, source/logger.js", - "sourceType":"Тип исполняемого файла, они будут перечислены далее", - "sourceName":"Имя, необязательный параметр, будет использовано при выводе ошибок", - "api":"Тип API, если вы хотите выбрать не тот тип, который вы указали в defaultConfig конкретно для этого файла, иначе этот параметр не нужен" - }, - //... - ] -} -``` - -Типы исполняемых файлов: - -- mod - В этом типе файлов находится основной исходный код модов, задающий их контент. -- launcher - Должен присутствовать только один файл этого типа. В нем осуществляется запуск мода в определенный момент (Например если мод использует API другого мода, он должен запуститься только после его загрузки и т.п.). Если никаких дополнительных условий для запуска не нужно, он просто должен содержать команду Launch(); -- library - Библиотека. Может с помощью специальных методов, доступных только этому типу файлов, регистрировать новые модули API, которые используются модами, если те эту библиотеку импортируют. Этот тип файлов не надо описывать, если он находится в директории, заданной в параметре libraryDir. -- preloader - Отдельный специфический тип файла, который будет выполняться до загрузки MCPE после загрузки ресурсов и требуется для их создания и изменения. На момент написания данной документации, использует отдельный тип API, который еще плохо реализован. -- custom - Выполняется только с помощью специального метода - runCustomSource(), вызванного из остальных типов исполняемых файлов. Может принимать параметры. - -Подробнее про каждый тип файлов и их специальные методы и значения будет рассказано в [[InnerCore/Базовые_методы_и_переменные_исполняемых_файлов|отдельной главе]]. - -## Построение исполняемых файлов - -Исполняемым файлам можно задавать построение из отдельных директорий. Построение происходит из многих файлов, которые описываются в файле построения. Этот метод позволяет разбивать код на части и группировать их, а не писать один огромный файл. Это дает не только читабельность, но так же позволяет более оптимально компилировать моды и дебажить их в продакшине. - -Директории построения задаются в разделе buildDirs, который является массивом: - -```javascript -{ - "defaultConfig": { - // ... - }, - // ... - "buildDirs": [ - { - "dir":"dir/to/build/", #Директория, из которой будет выполняться построение, должна заканчиваться символом / - "targetSource":"dir/to/source/file", #Файл, в который будет выполняться построение. ВАЖНО: содержимое файла будет полностью перезаписываться при каждом построении, так что не стоит там что либо писать. - }, - // ... - ] -} -``` - -Директория построения задается следующим образом: - -*Она должна содержать файлы с кодом, которые вы хотите объединить в исполняемый файл. Они могут находиться в дочерних директориях и иметь любые названия. -*Она должна содержать файл построения .includes, в нем прописаны все локальные пути файлов, которые участвуют в построении в нужном порядке, так же он может содержать комментарии (// или #) и пустые строки - -Пример содержимого .includes: - -> // Предположим, что .includes находится в директории dev/ в моде // Этот файл должен находиться на пути dev/header.js -> header.js // Эти файлы соответсвенно должны находиться в dev/source/ -> source/blocks.js -> source/items.js - -Важно понимать, что каждый из этих файлов должен быть завершенным куском кода, потому что каждый из них компилируется по отдельности. Т.е. нельзя начать блок в одном файле и закончить в следующем. - -## Ресурсы - -Ресурсы модов делятся на две группы - текстуры интерфейса (GUI) и остальные (блоки, предметы, текстуры для моделей и т.п.). Какие бывают типы ресурсов будет рассказано в [[InnerCore/Ресурсы|отдельной главе]]. - -Директории ресурсов описываются в разделе resources, их может быть сколько угодно много: - -```javascript -{ - "defaultConfig": { - // ... - }, - // ... - "resources": [ - { - "path":"resource/dir/", #Директория ресурсов, должна заканчиваться символом / - "resourceType":"resource|gui", #Тип подгрузки ресурсов: resource - внутриигровые ресурсы, gui - текстуры интерфейса - }, - // ... - ] -} -``` - -Подробно о ресурсах и их использовании будет рассказано [отдельно](/ru/page/inner-core/resources). diff --git a/documentation/static/index.html b/documentation/static/index.html deleted file mode 100644 index 4aeab467a..000000000 --- a/documentation/static/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Inner Core Docs - - - - - - - - - -
    - - - - - - - diff --git a/documentation/static/ru/README.md b/documentation/static/ru/README.md deleted file mode 100644 index 1820b95d9..000000000 --- a/documentation/static/ru/README.md +++ /dev/null @@ -1 +0,0 @@ -lmao \ No newline at end of file diff --git a/documentation/static/ru/config/_sidebar.md b/documentation/static/ru/config/_sidebar.md deleted file mode 100644 index 1b9760c5c..000000000 --- a/documentation/static/ru/config/_sidebar.md +++ /dev/null @@ -1,12 +0,0 @@ -- [Главная](/ru/) -- Построение модов - - [Структура модов](/ru/page/building-mods/mod_structure.md) - - [Стандартный шаблон модов](/ru/page/building-mods/standart-mod-template.md) - - [Ресурсы](/ru/page/building-mods/mod-resources.md) - - [Компиляция в байткод](/ru/page/building-mods/bytecode-compilation.md) - - [Базовые методы и переменные исполняемых файлов](/ru/page/building-mods/basic-methods-and-variables-of-executable-files.md) - - [Библиотеки](/ru/page/building-mods/libraries.md) -- [Глобальные методы и переменные CoreEngine](/ru/page/coreengine-global-methods-and-variables.md) -- [CoreEngine Апи](/api/ ':ignore') - -- [Hello World](api/modules.html#helloWorld ':ignore :target=_self') diff --git a/documentation/static/ru/page/building-mods/basic-methods-and-variables-of-executable-files.md b/documentation/static/ru/page/building-mods/basic-methods-and-variables-of-executable-files.md deleted file mode 100644 index ca1a8eeb5..000000000 --- a/documentation/static/ru/page/building-mods/basic-methods-and-variables-of-executable-files.md +++ /dev/null @@ -1,41 +0,0 @@ -# Понятие параметра SCOPE - -Этот параметр используется только в методах для запуска других исполняемых файлов. Этот объект описывает новые переменные в пространстве имен запускаемого файла, где имя поля в этом объекте - имя новой переменной, а значение - соответсвенно ее значение.  Параметр SCOPE может быть не передан или иметь значение null, тогда никаких новых переменных не будет создано. - -Пример: - -```javascript -SCOPE это объект { - x: 2, - - sqr: function(a){ - return a * a; - } -} -``` - -В исполняемом файле, который запущен с таким SCOPE появятся переменная x со значением 2 и функция sqr, возводящая число в квадрат. - -В коде исполняемых файлов вне зависимости от API всегда есть набор стандартных методов и переменных, связанных со структурой мода и его файлами. Далее будут перечисленны все. - -Не зависят от типа исполняемого файла: - -Переменные: - -*''__name__'' - переменная, содержащая имя мода в виде строки, в основном используется в логах. -*''__dir__'' - директория мода, которая содержит все его файлы, заканчивается на / -*''__config__ ''- реализация основного конфига мода (config.json), который будет визуализирован в меню настройки модов. Обычно создавать дополнительные конфиги не приходится. -*''__mod__ ''- java-объект самого мода, содержаший все остальные значения, техническая переменная. - -Методы: - -*''runCustomSource(path, SCOPE)'' - запускает исполняемый файл на указанном пути path (локальный путь в директории данного мода) с данным объектом SCOPE. Важно то, что этот файл должен быть описан в build.config и иметь тип custom. -*''importLib(libName, moduleName)'' - импортирует указанный модуль из указанной библиотеки, где libName - имя файла библиотеки без расширения, а moduleName, имя нужного модуля в библиотеке или строка "*", в последнем случае будут импортированы все модули из данной библитеки. В самих библиотеках данный метод недоступен. - -Только в библиотеках: - -*''registerAPIUnit(moduleName, moduleValue)'' - регистрирует модуль библиотеки, который далее можно будет импортировать с помощью ''importLib(libName, moduleName)'' или ''importLib(libName, "*")'', где moduleName - имя модуля, а moduleValue - любое значение, которое вы хотите передать, обычно это объект с набором методов. - -Только в лаунчере: - -*''Launch(SCOPE)'' - запускает все основные файлы мода с данным SCOPE, если мод уже запущен, то выдаст исключение RuntimeException. diff --git a/documentation/static/ru/page/building-mods/bytecode-compilation.md b/documentation/static/ru/page/building-mods/bytecode-compilation.md deleted file mode 100644 index 8913079b6..000000000 --- a/documentation/static/ru/page/building-mods/bytecode-compilation.md +++ /dev/null @@ -1,16 +0,0 @@ -Компиляция модов в байткод крайне полезна для релизных версий. Во-первых это позволяет увеличить быстродействие, а во-вторых шифрует исходный код, если это требуется. - -Компиляция производится через меню Inner Core, для этого вам нужно открыть список модов, найти там требуемый вам мод и открыть меню разработчика (кнопка с гаечным ключом). -Порядок компиляции: - -- Убедитесь, что вы находитесь в режиме построения разработки (build type: develop). -- Проверьте статус всех ваших исполняемых файлов, он должен быть "ok" для всех, в противном случае у вас возникли ошибки при запуске мода и их стоит исправить при компиляции. -- Нажмите кнопку компиляции, подтвердите действие ("Yes"), после чего появится окно процесса компиляции, в зависимости от объема мода и мощности устройства, это займет от нескольких секунд до 10 минут. -- Если во время компиляции возникли ошибки, то скорее всего вы не выполнили пункт 2. Откажитесь от переключения в релизный тип построения ("No") и исправльте ошибки. Если ошибок нет, то есть 2 варианта проблемы: либо файл, который надо скомпилировать, слишком большой, в этом случае надо разбить его на несколько (директории построения), либо он содержит незавершенный блок кода, в этом случае его надо объеденить с тем, где находится завершение к или просто перенести его (завершение) в нужный файл. -- Если компиляция прошла успешна, перезапустите Inner Core, зайдите обратно в меню разработчика и убедитесь, что статус для всех файлов теперь "ok [bytecode]". - -Чтобы вернуться после компиляции к разработке мода, вам надо в том же меню разработчика нажать ту же кнопку (при условии, что build type: release) и подтвердить действие. После этого необходим перезапуск, чтобы мод перезагрузился в режиме разработчика. - -== Скрытие исходного кода == - -Если вам совсем не хочется делиться своими исходниками с другими, то после компиляции в релизной версии удалить все файлы с исходным кодом, кроме библиотек, они не будут нужны для работы. '''ВНИМАНИЕ'''!!! ВЫ НЕ СМОЖЕТЕ ИЗ СКОМПИЛИРОВАННОГО МОДА ПОЛУЧИТЬ ИСХОДНЫЙ КОД, ЭТО НЕВОЗМОЖНО. УДАЛЯЙТЕ ИСХОДНЫЙ КОД ТОЛЬКО УБЕДИВШИСЬ, ЧТО У ВАС ЕСТЬ ЕГО ПОЛНАЯ И АКТУАЛЬНАЯ РЕЗЕРВНАЯ КОПИЯ. diff --git a/documentation/static/ru/page/building-mods/libraries.md b/documentation/static/ru/page/building-mods/libraries.md deleted file mode 100644 index 22230162b..000000000 --- a/documentation/static/ru/page/building-mods/libraries.md +++ /dev/null @@ -1,103 +0,0 @@ - -# Библиотеки - -Библиотеки — это дополнительные исполняемые файлы, нужные, чтобы дополнить и расширить существующий API и упростить выполнение каких-либо задач.   - -## Добавление библиотек в моды - -Библиотеки представлены одиночным файлом с кодом. Чтобы добавить библиотеку в мод, ее нужно переместить в директорию библиотек мода (обычно она называется lib, название директории задается параметром libraryDir в разделе defaultConfig файла построения). - -## Принцип работы библиотек - -Библиотека регистрирует новые объекты API, которые можно импортировать в пространство имен любого исполняемого файла для их последующего использования. Имя библиотеки и имена объектов API, которые она добавляет можно посмотреть в документации к ней. - -Чтобы импортировать библиотеку используется команда IMPORT: - -''IMPORT'' (''"имя библиотеки") - импортирует все объекты API из указанной библиотеки'' - -''IMPORT ("имя библиотеки", "имя объекта API") - импортирует конкретный объект API из указанной библиотеки'' - -## Область видимости библиотек - -Библиотеки бывают двух типов - локальные и глобальные.   - -Локальные могут быть импортированы только в пределах одного мода, и, если одна и та же библиотека присутствует в двух разных модах, она будет загружена для каждого из них отдельно. Локальные библиотеки используются в случае, когда API, которое она добавляет не нуждается в совместимости. К примеру, библиотека ToolType просто добавляет упрощенные типы инструментов. - -Глобальные библиотеки загружаются один раз для всех модов и могут быть импортированы откуда угодно. Они используются для создания глобальных модулей регистрации, которым нужно взаимодействие со всеми модами. Как пример можно привести библиотеку energylib, позволяющую регистрировать различные типы энергии и использовать их в разных модах. - -## Версии библиотек - -Каждая библиотека имеет свой собственный код версии, он нужен для определения самой новой версии библиотеки, если одновременно используется несколько одинаковых библиотек. Особенно это касается глобальных. - -Если при импорте библиотеки в целевом пространстве находится более одной библиотеки с одинаковыми именами, будет загружена только одна и при этом с наибольшей версией. - -## Обратная совместимость - -Новые версии библиотек могут изменять старый API, при этом правило с загрузкой максимальной версии может вызвать некорректную работу какого-то мода, использующего старую версию библиотеки. - -Для этого в команде импорта существует возможность импортировать библиотеку с указанием целевой версии. Формат команды импорта с указанием целевой версии: - -''IMPORT ("имя библиотеки:целевая версия", ...) - в первом параметре указывается через двоеточие код целевой версии библиотеки, второй параметр остается неизменным.'' - -Советуется использовать именно этот вариант импорта, чтобы минимизировать шанс того, что полученный API не будет соответствовать ожидаемому (Произойдет это только в том случае, если разработчик библиотеки не позаботился об обратной совместимости). - -= Разработка библиотек = - -Как было сказано выше библиотека — это одиночный файл с кодом. Далее будут рассмотрены особенности разработки библиотек. - -## Заголовок - -Заголовок библиотеки полностью описывает ее параметры и представлен вызовом команды LIBRARY перед всем остальным кодом. - -Использование команды LIBRARY: - -```javascript -LIBRARY({ - name: "имя библиотеки", // по этому имени библиотека будет импортирована - version: код версии, // код версии должен быть целым числом больше 0, при каждом обновлении библиотеки его надо увеличивать и указывать в документации к ней - shared: false, // если true, то библиотека будет глобальной - api: "CoreEngine", // название API, которое использует библиотека - dependencies: [  "name1:version1", - //... - ] -  /* список зависимостей от других библиотек в том же формате, что и первый параметр команды IMPORT (Импортировать эти библиотеки надо отдельно, этот параметр гарантирует их загрузку до загрузки этой библиотеки)*/ -}); -``` - -## Импорт библиотек - -Импорт других библиотек происходит по тем же принципам, что и в обычных файлах модов, однако все импортируемые библиотеки нужно задекларировать в загловке в параметре dependencies с учетом версий. - -## Экспорт объектов API - -Экспорт объектов API является самой важной частью библиотек, без которой они теряют свой смысл. Экспорт позволяет передать какой-либо объект под данным именем для его последующего импорта из этой библиотеки. - -Использование команды EXPORT: - -''EXPORT("имя объекта API", объект API) - делает данный объект доступным для экспорта под данным именем'' - -## Обратная совместимость экспортируемых объектов - -При изменении объекта API и его несовместимости с прошлыми версиями (к примеру при удалении или изменении названия метода) стоит сделать дополнительный экспорт для обратной совместимости. - -Использование команды EXPORT для добавления объекта обратной совместимости: - -''EXPORT("имя объекта API:код версии", объект API) - экспортирует данный объект для версий <код версии> и ниже, может присутствовать экспорт с таким же именем и без версии, а так же другие импорты для совместимости с более низкими версиями.'' - -Пример (Версия библиотеки, в которой это происходит больше 3): - -```javascript -EXPORT("print", function() { - alert("new version print"); -});  - -EXPORT("print:3", function() { - alert("older print"); -}); - -EXPORT("print:1", function() { - alert("first version print"); -}); -``` - -При импорте библиотеки с указанием разных версий, всегда будет присутствовать print, однако для новых версий это будет первый вариант, для версии 3 и ниже - второй, а для версии 1 - третий. diff --git a/documentation/static/ru/page/building-mods/mod-resources.md b/documentation/static/ru/page/building-mods/mod-resources.md deleted file mode 100644 index 2900ce9bf..000000000 --- a/documentation/static/ru/page/building-mods/mod-resources.md +++ /dev/null @@ -1,60 +0,0 @@ -Ресурсы делятся на два больших типа - текстуры интерфейса (gui) и внутриигровые ресурсы (resource). Оба типа ресурсов хранятся в директориях, указанных в файле построения (для шаблонного мода это директории gui и res соответственно). У каждого типа ресурсов есть правила, по которым они загружаются и будут доступны в дальнейшем. - -## Текстуры интерфейса - -Текстуры интерфейса должны быть в расширении .png и могут находиться как в директории, указанной в файле построения, так и в дочерних ей. Текстура интерфейса будет доступна в коде по имени без расшрения, если она находится в дочерних директориях, то будут указаны и их имена через точку. - -Пример: - -Структура файлов интерфейса: - -```text -close_button_small.png # Будет доступен как close_button_small -close_button_large.png # Будет доступен как close_button_large - -machine - energy_bar.png # Будет доступен как machine.energy_bar - macerator - progress_bar.png # Будет доступен как machine.macerator.progress_bar - heat_bar.png # Будет доступен как machine.macerator.heat_bar -``` - -## Внутриигровые ресурсы - -В отличие от тектур интерфейса, внутриигровые ресурсы имеют различные типы, каждый из которых определяется и загружается по своему. Определяются эти типы по названию файла или по имени дочерней директории, в которой они находятся.  - -Во-первых файлы делятся на текстуры и не текстуры, последние определяются как файлы, которые имеют расширения png и tga.  - -## Текстуры - -Текстуры в свою очередь делятся на несколько типов: просто текстуры, текстуры блоков, текстуры предметов, анимации текстур блоков. - -Текстуры блоков должны находиться в дочерней директории terrain-atlas или же просто иметь ее в своем пути. Кроме этого их названия должны быть в специальном формате: name_index.png, где name - имя, состоящее из латинских букв и подчеркиваний, а index - натуральное число, обозначающее номер текстуры с данным именем name. В коде данная текстура блока будет доступна по комбинации name и index. - -Важно то, что для набора текстур с одинаковым именем крайне желательна непрерывная индексация с 0, т.е. если у вас N текстур с одинаковым именем их индексы должны быть от 0 до N - 1 (0, 1, 2, 3 - правильно; 1, 2, 4, 8 - неправильно). - -Пример (Через запятую показаны имя и индекс, это не цельное имя, а два отдельных параметра): - -```text -terrain-atlas - someBlock_0.png # Текстура будет доступна как someBlock, 0 - someBlock_1.png # Текстура будет доступна как someBlock, 1 - someBlock_2.png # Текстура будет доступна как someBlock, 2 - ores - oreCopper_0.png # Не важно, что файл находится в дочерней директории, текстура будет доступна как oreCopper, 0 - oreTin_0.png # Текстура будет доступна как oreTin, 0 -``` - -Текстуры предметов абсолютно аналогичны текстурам блоков и формату их названий и местоположения в ресурсах. Однако вместо terrain-atlas ключевое имя директории для текстур предметов - items-opaque. - -Анимации текстур блоков могут находиться где угодно в директории ресурсов, однако имеют единый формат названий. Это должен быть файл в формате png, имеющий имя name.anim.png или name.anim.ticksPerFrape.png, где name - имя текстуры блока (именно имя текстуры, а не файла, т.е. для name_index.png это name), anim - ключевое слово, его оставить как есть, а ticksPerFrape - натуральное число, показывающее, сколько тиков (1/20) секунды нужно для смены 1 кадра анимации. - -Сама анимация представляет из себя изображение размера (W)x(W*N), где W - разрешение текстуры, которую надо анимировать (обычно 16 или 32), а N - кол-во кадров анимации (обычно 32). - -К сожалению, MCPE позволяет анимировать таким образом только текстуры блоков. Текстуры предметов так анимировать нельзя. - -Остальные текстуры будут доступны в основном как текстуры моделей. Доступ из кода осуществляется по полному локальному пути в ресурсах, т.е. если текстура находится в <директория ресурсов>/path/to/file.png, то она будет доступна как path/to/file.png - -## Замена ванильных ресурсов - -Любые файлы во внутриигровых ресурсах имеют следующее свойство: если в ванильном ресурспаке MCPE есть файл с таким же локальным путем, что и файл в ресурсах мода, он будет заменен на этот самый файл из ресурсов мода, это позволяет для нужд мода заменять конкретные текстуры, шейдеры и т.п., а так же встраивать в моды ресурспаки. diff --git a/documentation/static/ru/page/building-mods/mod_structure.md b/documentation/static/ru/page/building-mods/mod_structure.md deleted file mode 100644 index 297ffeb93..000000000 --- a/documentation/static/ru/page/building-mods/mod_structure.md +++ /dev/null @@ -1,136 +0,0 @@ -## Структура модов - -Мод под Inner Core представляет из себя директорию с файлом построения build.config, так же могут присутствовать несколько дополнительных файлов, таких как файл описания и стандартный файл конфигурации. Последний будет создан автоматически. - -Если вы не хотите вдаваться в подробности построения модов, вы можете использовать стандартный шаблон мода, который описан [здесь](/inner-core/standart-mod-template). - -## Конфиг и описание - -Файл конфига - config.json - задается в формате JSON и генерируется, либо исправляется автоматически. Всегда будет присутствовать значение enabled, которое включает/выключает весь мод. Содержимое этого файла будет визуализировано в меню мода, которое открывается через меню Inner Core. Работа с этим файлом производистся целиком из кода. - -Файл информации - mod.info - задается в формате JSON и может не пристуствовать, однако тогда информации о моде в меню Inner Core не будет, название мода будет по имени директории и т.д. - -Формат файла mod.info: - -```javascript -{ - "name":"Имя мода", - "author":"Автор мода", - "version":"Версия мода в любом формате", - "description":"Краткое описание мода" -} -``` - -Также директория мода может содержать файл mod_icon.png, который будет являться иконкой мода в меню Inner Core. Важен только формат - png - размер может быть любым. - -## Основные параметры - -Файл построения задается в формате JSON и имеет несколько разделов, в которых описываются различные настройки и элементы мода. Первый раздел - defaultConfig - является обязательным и описывает основные параметры построения мода. С ним содержимое файла построения будет выглядеть следующим образом (комментарии, помеченные символом #, присутствовать не должны): - -```javascript -{ - "defaultConfig": { - "api":"CoreEngine", #API, которое будет использовано для всех выполняемых файлов по-умолчанию, варианты API будут перечислены далее - "buildType":"develop", #Этот параметр при разработке должен быть develop, далее он будет изменяться с помощью Inner Core - "libraryDir":"lib/", #Необязательный параметр, который задает стандартную директорию, откуда будут загружаться библиотеки. - } -} -``` - -API задает абсолютное большинство методов, которые могут использовать исполняемые файлы мода. Однако есть набор базовых методов, которые доступны для конкретных типов выполняемых файлов. Виды API: -*CoreEngine - Основной и самый объемный API для разработки модов. В основном вам нужно будет использовать его, остальные варианты более ситуативны и не нужны в большинстве случаев. -*AdaptedScript - Реализует основные возможности, однако не имеет различных реализаций, сильно упрощающих разработку, таких как Tile Entity. - -## Исполняемые файлы - -Исполняемые файлы содержат исходный код мода, написаный под нужный вариант API на JavaScript, которые будут выполняться в различные моменты, зависящие от их типа. Так же их можно строить из отдельных директорий и компилировать в байт-код из меню Inner Core для быстродействия и лучшего дебага (релизные версии мода). - -Исполняемые файлы описываются в разделе compile, который является массивом. Их может быть сколько угодно много: - -```javascript -{ - "defaultConfig": { - //... - }, - ... - "compile": [ - { - "path":"Локальный путь к файлу, к примеру main.js, source/logger.js", - "sourceType":"Тип исполняемого файла, они будут перечислены далее", - "sourceName":"Имя, необязательный параметр, будет использовано при выводе ошибок", - "api":"Тип API, если вы хотите выбрать не тот тип, который вы указали в defaultConfig конкретно для этого файла, иначе этот параметр не нужен" - }, - //... - ] -} -``` - -Типы исполняемых файлов: - -- mod - В этом типе файлов находится основной исходный код модов, задающий их контент. -- launcher - Должен присутствовать только один файл этого типа. В нем осуществляется запуск мода в определенный момент (Например если мод использует API другого мода, он должен запуститься только после его загрузки и т.п.). Если никаких дополнительных условий для запуска не нужно, он просто должен содержать команду Launch(); -- library - Библиотека. Может с помощью специальных методов, доступных только этому типу файлов, регистрировать новые модули API, которые используются модами, если те эту библиотеку импортируют. Этот тип файлов не надо описывать, если он находится в директории, заданной в параметре libraryDir. -- preloader - Отдельный специфический тип файла, который будет выполняться до загрузки MCPE после загрузки ресурсов и требуется для их создания и изменения. На момент написания данной документации, использует отдельный тип API, который еще плохо реализован. -- custom - Выполняется только с помощью специального метода - runCustomSource(), вызванного из остальных типов исполняемых файлов. Может принимать параметры. - -Подробнее про каждый тип файлов и их специальные методы и значения будет рассказано в [[InnerCore/Базовые_методы_и_переменные_исполняемых_файлов|отдельной главе]]. - -## Построение исполняемых файлов - -Исполняемым файлам можно задавать построение из отдельных директорий. Построение происходит из многих файлов, которые описываются в файле построения. Этот метод позволяет разбивать код на части и группировать их, а не писать один огромный файл. Это дает не только читабельность, но так же позволяет более оптимально компилировать моды и дебажить их в продакшине. - -Директории построения задаются в разделе buildDirs, который является массивом: - -```javascript -{ - "defaultConfig": { - // ... - }, - // ... - "buildDirs": [ - { - "dir":"dir/to/build/", #Директория, из которой будет выполняться построение, должна заканчиваться символом / - "targetSource":"dir/to/source/file", #Файл, в который будет выполняться построение. ВАЖНО: содержимое файла будет полностью перезаписываться при каждом построении, так что не стоит там что либо писать. - }, - // ... - ] -} -``` - -Директория построения задается следующим образом: - -*Она должна содержать файлы с кодом, которые вы хотите объединить в исполняемый файл. Они могут находиться в дочерних директориях и иметь любые названия. -*Она должна содержать файл построения .includes, в нем прописаны все локальные пути файлов, которые участвуют в построении в нужном порядке, так же он может содержать комментарии (// или #) и пустые строки - -Пример содержимого .includes: - -> // Предположим, что .includes находится в директории dev/ в моде // Этот файл должен находиться на пути dev/header.js -> header.js // Эти файлы соответсвенно должны находиться в dev/source/ -> source/blocks.js -> source/items.js - -Важно понимать, что каждый из этих файлов должен быть завершенным куском кода, потому что каждый из них компилируется по отдельности. Т.е. нельзя начать блок в одном файле и закончить в следующем. - -## Ресурсы - -Ресурсы модов делятся на две группы - текстуры интерфейса (GUI) и остальные (блоки, предметы, текстуры для моделей и т.п.). Какие бывают типы ресурсов будет рассказано в [[InnerCore/Ресурсы|отдельной главе]]. - -Директории ресурсов описываются в разделе resources, их может быть сколько угодно много: - -```javascript -{ - "defaultConfig": { - // ... - }, - // ... - "resources": [ - { - "path":"resource/dir/", #Директория ресурсов, должна заканчиваться символом / - "resourceType":"resource|gui", #Тип подгрузки ресурсов: resource - внутриигровые ресурсы, gui - текстуры интерфейса - }, - // ... - ] -} -``` - -Подробно о ресурсах и их использовании будет рассказано [отдельно](/inner-core/resources). diff --git a/documentation/static/ru/page/building-mods/standart-mod-template.md b/documentation/static/ru/page/building-mods/standart-mod-template.md deleted file mode 100644 index a0a0fdd8c..000000000 --- a/documentation/static/ru/page/building-mods/standart-mod-template.md +++ /dev/null @@ -1,72 +0,0 @@ -В большинстве случаев вам не потребуется импровизировать со структурой мода. Для этого тут описан шаблонный файл построения и то, какую структуру должен иметь мод с таким построением. - -Здесь приведено содержимое файла build.config: - -```json -{ - "defaultConfig":{ - "buildType":"develop", - "api":"CoreEngine", - "libraryDir":"lib/" - }, - - "resources":[ - { - "path":"res/", - "resourceType":"resource" - }, - { - "path":"gui/", - "resourceType":"gui" - } - ], - - "buildDirs":[ - { - "targetSource":"main.js", - "dir":"dev/" - } - ], - - "compile":[ - { - "path":"main.js", - "sourceType":"mod" - }, - { - "path":"launcher.js", - "sourceType":"launcher" - } - ] -} -``` - -## Структура мода - -Начнем с API, он един для всего мода - это Core Engine. Основная часть дальнейшей документации будет как раз по нему, т.к. это самый распространенный и удобный вид API в большинстве случаев. - -Если вам нужно подключить какие то библиотеки, вы можете создать директорию lib в директории мода и копировать их туда, после чего их можно будет подключить из любых исполняемых файлов мода. - -Все ресурсы мода должны находиться в директории res, если их нет, она должна быть пустой. Аналогично для текстур интерфейса, только они должны находиться в директории gui. Как конкретно работают ресурсы вы сможете прочитать [[InnerCore/Ресурсы|здесь ]]. - -В директории мода должен присутствовать файл launcher.js, который по-умолчанию должен содержать только команду Launch(); Более подробная работа с лаунчером мода будет описана в другой главе. - -## Исходный код мода - -Так же в моде обязана присутствовать директория построения dev, в которой должен быть файл построения .includes, в нем прописаны все локальные пути файлов, которые участвуют в построении в нужном порядке, так же он может содержать комментарии (// или #) и пустые строки - -Пример содержимого .includes: - -```text -// Предположим, что .includes находится в директории dev/ в моде -// Этот файл должен находиться на пути dev/header.js -header.js -// Эти файлы соответсвенно должны находиться в dev/source/ -source/blocks.js -source/items.js -//Все эти файлы будут собраны в файл main.js и запущены, как основной код мода. -``` - -## Заключение - -Как говорилось в начале данная структура подходит для большинства модов и если вам не нужно ничего особенного, то оптимально использовать именно её. diff --git a/documentation/static/ru/page/coreengine-global-methods-and-variables.md b/documentation/static/ru/page/coreengine-global-methods-and-variables.md deleted file mode 100644 index 147e55fc2..000000000 --- a/documentation/static/ru/page/coreengine-global-methods-and-variables.md +++ /dev/null @@ -1,21 +0,0 @@ - -Кроме [[InnerCore/Базовые_методы_и_переменные_исполняемых_файлов|базовых переменных и методов исполняемых файлов]], Inner Core предоставляет некоторое количество других глобальных методов. Их список приведён ниже: - -*getCoreAPILevel() - возвращает текущую версию API Inner Core, может использоваться для того, чтобы обеспечивать совместимость модов с прошлыми версиями Inner Core. Текущая версия - 8 -*runOnMainThread(func) - запускает функцию func на главном потоке Майнкрафта -*getMCPEVersion() - возвращает текущую версию Майнкрафта в формате: - -```javascript -{ -    str: "1.0.3.12", // string representation -    array: [1, 0, 3, 12], // array representation -   main: 17 // array[0] * 17 + array[1] -} -``` - -* addParticle(x, y, z, id, vx, vy, vz, data) - добавляет на координатах x, y, z ванильную частицу типа id и задаёт ей ускорение vx, vy, vz. data? -* message(message) - выводит отладочное сообщение тёмно-зелёным цветом с префиксом "DEBUG: " в чат -* warning(message) - выводит отладочное сообщение золотистым цветом с префиксом "WARNING: " в чат -* error(message) - выводит отладочное сообщение тёмно-красным цветом с префиксом "ERROR: " в чат -* m(messages...) - выводит несколько отладочных сообщений, разделённых запятыми, тёмно-зелёным цветом с префиксом "DEBUG: " в чат. Если одно из сообщений является объектом, он выведется как JSON-строка -* bitmap(bitmap, title) - показывает диалоговое окно с изображением, взятым из параметра bitmap типа ''Bitmap'', и с заголовком title diff --git a/documentation/static/src/config.js b/documentation/static/src/config.js deleted file mode 100644 index ece904cce..000000000 --- a/documentation/static/src/config.js +++ /dev/null @@ -1,73 +0,0 @@ -window.$docsify = { - name: 'Inner Core Docs', - repo: 'mineprogramming/innercore-docs', - loadSidebar: 'config/_sidebar.md', - loadNavbar: 'config/_navbar.md', - subMaxLevel: 4, - relativePath: true, - autoHeader: true, - nameLink: { - '/ru/': '#/ru/', - '/en/': '#/en/', - '/': '#/' - }, - alias: { - '/ru/(.*/|)config/(.*)': '/ru/config/$2', - '/(en/|)(.*/|)config/(.*)': '/en/config/$3', - '/.*/src/(.*)': '/src/$1' - }, - themeable: { - readyTransition: true, // default - responsiveTables: true // default - }, - // https://github.com/jperasmus/docsify-copy-code - copyCode: { - buttonText: { - '/zh-cn/': '点击复制', - '/ru/': 'Скопировать в буфер обмена', - '/de-de/': 'Klicken Sie zum Kopieren', - '/es/': 'Haga clic para copiar', - '/': 'Copy to clipboard' - }, - errorText: { - '/zh-cn/': '错误', - '/ru/': 'Ошибка', - '/': 'Error' - }, - successText: { - '/zh-cn/': '复制', - '/ru/': 'Скопировано', - '/de-de/': 'Kopiert', - '/es/': 'Copiado', - '/': 'Copied' - } - }, - // https://jhildenbiddle.github.io/docsify-tabs - tabs: { - persist: true, // default - sync: true, // default - theme: 'classic', // default - tabComments: true, // default - tabHeadings: true // default - }, - timeUpdater: { - text: '> Last Modify: {docsify-updated}', - formatUpdated: '{DD}.{MM}.{YYYY}' - }, - plugins: [ - function (hook, vm) { - hook.beforeEach(function (html) { - if (/githubusercontent\.com/.test(vm.route.file)) { - url = vm.route.file - .replace('raw.githubusercontent.com', 'github.com') - .replace(/\/gh-pages/, '/blob/gh-pages'); - } else if (/jsdelivr\.net/.test(vm.route.file)) { - url = vm.route.file.replace('cdn.jsdelivr.net/gh', 'github.com').replace('@gh-pages', '/blob/gh-pages'); - } else { - url = 'https://github.com/mineprogramming/innercore-docs/blob/gh-pages/' + vm.route.file; - } - return html + '\n\n[:memo: Edit Document](' + url + ')'; - }); - } - ] -}; diff --git a/documentation/static/src/syntax/json.min.js b/documentation/static/src/syntax/json.min.js deleted file mode 100644 index a3cb08bb1..000000000 --- a/documentation/static/src/syntax/json.min.js +++ /dev/null @@ -1,11 +0,0 @@ -(Prism.languages.json = { - property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, - string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, - comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, - number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, - punctuation: /[{}[\],]/, - operator: /:/, - boolean: /\b(?:false|true)\b/, - null: { pattern: /\bnull\b/, alias: 'keyword' } -}), - (Prism.languages.webmanifest = Prism.languages.json); diff --git a/documentation/static/src/themes/dark-light.js b/documentation/static/src/themes/dark-light.js deleted file mode 100644 index 6747c04ea..000000000 --- a/documentation/static/src/themes/dark-light.js +++ /dev/null @@ -1,27 +0,0 @@ -window.$docsify.plugins = [].concat((e, o) => { - let t = { siteFont: 'PT Sans', defaultTheme: 'dark', codeFontFamily: 'Roboto Mono, Monaco, courier, monospace', bodyFontSize: '17px', dark: { accent: '#42b983', toogleBackground: '#ffffff', background: '#091a28', textColor: '#b4b4b4', codeTextColor: '#ffffff', codeBackgroundColor: '#0e2233', borderColor: '#0d2538', blockQuoteColor: '#858585', highlightColor: '#d22778', sidebarSublink: '#b4b4b4', codeTypeColor: '#ffffff', coverBackground: 'linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/sun.svg)' }, light: { accent: '#42b983', toogleBackground: '#091a28', background: '#ffffff', textColor: '#34495e', codeTextColor: '#525252', codeBackgroundColor: '#f8f8f8', borderColor: 'rgba(0, 0, 0, 0.07)', blockQuoteColor: '#858585', highlightColor: '#d22778', sidebarSublink: '#505d6b', codeTypeColor: '#091a28', coverBackground: 'linear-gradient(to left bottom, hsl(118, 100%, 85%) 0%,hsl(181, 100%, 85%) 100%)', toogleImage: 'url(https://cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/icons/moon.svg)' } }; - if (o.config.hasOwnProperty('darklightTheme')) { - for (var [r, l] of Object.entries(o.config.darklightTheme)) 'light' !== r && 'dark' !== r && 'defaultTheme' !== r && (t[r] = l); - for (var [r, l] of Object.entries(t)) 'light' !== r && 'dark' !== r && ((t[r] = l), document.documentElement.style.setProperty('--' + r, l)); - if (o.config.darklightTheme.hasOwnProperty('dark')) for (var [r, l] of Object.entries(o.config.darklightTheme.dark)) t.dark[r] = l; - if (o.config.darklightTheme.hasOwnProperty('light')) for (var [r, l] of Object.entries(o.config.darklightTheme.light)) t.light[r] = l; - } else for (var [r, l] of Object.entries(t)) 'light' !== r && 'dark' !== r && ((t[r] = l), document.documentElement.style.setProperty('--' + r, l)); - window.matchMedia('(prefers-color-scheme: dark)').matches ? (t.defaultTheme = 'dark') : window.matchMedia('(prefers-color-scheme: light)').matches && (t.defaultTheme = 'light'); - var d = (e) => { - if ((localStorage.setItem('DARK_LIGHT_THEME', e), (t.defaultTheme = e), 'light' == e)) for (var [o, r] of Object.entries(t.light)) document.documentElement.style.setProperty('--' + o, r); - else if ('dark' == e) for (var [o, r] of Object.entries(t.dark)) document.documentElement.style.setProperty('--' + o, r); - document.documentElement.style.setProperty('color-scheme', e); - }; - e.afterEach(function (e, o) { - o((e = '

    .

    ' + e)); - }), - e.doneEach(function () { - let e = localStorage.getItem('DARK_LIGHT_THEME'); - 'light' == e || 'dark' == e ? ((t.defaultTheme = e), d(t.defaultTheme)) : d(t.defaultTheme); - const o = document.getElementById('docsify-darklight-theme'); - null !== o && - o.addEventListener('click', function () { - 'light' === t.defaultTheme ? d('dark') : d('light'); - }); - }); -}, window.$docsify.plugins); diff --git a/documentation/static/src/themes/fix.css b/documentation/static/src/themes/fix.css deleted file mode 100644 index dab1c84f0..000000000 --- a/documentation/static/src/themes/fix.css +++ /dev/null @@ -1,10 +0,0 @@ -.markdown-section { - padding: 1rem 15px; -} -.sidebar-nav ul li p { - margin: 0; -} -.sidebar-nav ul li ul li a { - padding-top: 0; - padding-bottom: 0; -} \ No newline at end of file diff --git a/documentation/static/src/themes/vue.css b/documentation/static/src/themes/vue.css deleted file mode 100644 index 902d9a070..000000000 --- a/documentation/static/src/themes/vue.css +++ /dev/null @@ -1 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}.emoji{height:1.2rem;vertical-align:middle}.progress{background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:999999}.search a:hover{color:var(--theme-color,#42b983)}.search .search-keyword{color:var(--theme-color,#42b983);font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:10}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a:hover{color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid var(--theme-color,#42b983);color:var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative;cursor:pointer}.app-nav li ul{background-color:#fff;border:1px solid;border-color:#ddd #ddd #ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}.github-corner svg{color:#fff;fill:var(--theme-color,#42b983);height:80px;width:80px}main{display:block;position:relative;width:100vw;height:100%;z-index:0}main.hidden{display:none}.anchor{display:inline-block;text-decoration:none;transition:all .3s}.anchor span{color:#34495e}.anchor:hover{text-decoration:underline}.sidebar{border-right:1px solid rgba(0,0,0,.07);overflow-y:auto;padding:40px 0 0;position:absolute;top:0;bottom:0;left:0;transition:transform .25s ease-out;width:300px;z-index:20}.sidebar>h1{margin:0 auto 1rem;font-size:1.5rem;font-weight:300;text-align:center}.sidebar>h1 a{color:inherit;text-decoration:none}.sidebar>h1 .app-nav{display:block;position:static}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li.collapse .app-sub-sidebar{display:none}.sidebar ul{margin:0 0 0 15px;padding:0}.sidebar li>p{font-weight:700;margin:0}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{border-bottom:none;display:block}.sidebar ul li ul{padding-left:20px}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53.3%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53.3%,.1)}.sidebar-toggle{background-color:transparent;background-color:hsla(0,0%,100%,.8);border:0;outline:none;padding:10px;position:absolute;bottom:0;left:0;text-align:center;transition:opacity .3s;width:284px;z-index:30;cursor:pointer}.sidebar-toggle:hover .sidebar-toggle-button{opacity:.4}.sidebar-toggle span{background-color:var(--theme-color,#42b983);display:block;margin-bottom:4px;width:16px;height:2px}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;position:absolute;top:0;right:0;bottom:0;left:300px;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:80%;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section hr{border:none;border-bottom:1px solid #eee;margin:2em 0}.markdown-section iframe{border:1px solid #eee;width:1px;min-width:100%}.markdown-section table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:1rem;overflow:auto;width:100%}.markdown-section th{font-weight:700}.markdown-section td,.markdown-section th{border:1px solid #ddd;padding:6px 13px}.markdown-section tr{border-top:1px solid #ccc}.markdown-section tr:nth-child(2n){background-color:#f8f8f8}.markdown-section p.tip{background-color:#f8f8f8;border-bottom-right-radius:2px;border-left:4px solid #f66;border-top-right-radius:2px;margin:2em 0;padding:12px 24px 12px 30px;position:relative}.markdown-section p.tip:before{background-color:#f66;border-radius:100%;color:#fff;content:"!";font-family:Dosis,Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:14px;font-weight:700;left:-12px;line-height:20px;position:absolute;height:20px;width:20px;text-align:center;top:14px}.markdown-section p.tip code{background-color:#efefef}.markdown-section p.tip em{color:#34495e}.markdown-section p.warn{background:rgba(66,185,131,.1);border-radius:2px;padding:1rem}.markdown-section ul.task-list>li{list-style-type:none}body.close .sidebar{transform:translateX(-300px)}body.close .sidebar-toggle{width:auto}body.close .content{left:0}@media print{.app-nav,.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar,.sidebar-toggle{position:fixed}.app-nav{margin-top:16px}.app-nav li ul{top:30px}main{height:auto;min-height:100vh;overflow-x:hidden}.sidebar{left:-300px;transition:transform .25s ease-out}.content{left:0;max-width:100vw;position:static;padding-top:20px;transition:transform .25s ease}.app-nav,.github-corner{transition:transform .25s ease-out}.sidebar-toggle{background-color:transparent;width:auto;padding:30px 30px 10px 10px}body.close .sidebar{transform:translateX(300px)}body.close .sidebar-toggle{background-color:hsla(0,0%,100%,.8);transition:background-color 1s;width:284px;padding:10px}body.close .content{transform:translateX(300px)}body.close .app-nav,body.close .github-corner{display:none}.github-corner:hover .octo-arm{-webkit-animation:none;animation:none}.github-corner .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}}@-webkit-keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}section.cover{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;height:100vh;width:100vw;display:none}section.cover.show{display:flex}section.cover.has-mask .mask{background-color:#fff;opacity:.8;position:absolute;top:0;height:100%;width:100%}section.cover .cover-main{flex:1;margin:-20px 16px 0;text-align:center;position:relative}section.cover a{color:inherit;text-decoration:none}section.cover a:hover{text-decoration:none}section.cover p{line-height:1.5rem;margin:1em 0}section.cover h1{color:inherit;font-size:2.5rem;font-weight:300;margin:.625rem 0 2.5rem;position:relative;text-align:center}section.cover h1 a{display:block}section.cover h1 small{bottom:-.4375rem;font-size:1rem;position:absolute}section.cover blockquote{font-size:1.5rem;text-align:center}section.cover ul{line-height:1.8;list-style-type:none;margin:1em auto;max-width:500px;padding:0}section.cover .cover-main>p:last-child a{border-radius:2rem;border:1px solid var(--theme-color,#42b983);box-sizing:border-box;color:var(--theme-color,#42b983);display:inline-block;font-size:1.05rem;letter-spacing:.1rem;margin:.5rem 1rem;padding:.75em 2rem;text-decoration:none;transition:all .15s ease}section.cover .cover-main>p:last-child a:last-child{background-color:var(--theme-color,#42b983);color:#fff}section.cover .cover-main>p:last-child a:last-child:hover{color:inherit;opacity:.8}section.cover .cover-main>p:last-child a:hover{color:inherit}section.cover blockquote>p>a{border-bottom:2px solid var(--theme-color,#42b983);transition:color .3s}section.cover blockquote>p>a:hover{color:var(--theme-color,#42b983)}.sidebar,body{background-color:#fff}.sidebar{color:#364149}.sidebar li{margin:6px 0}.sidebar ul li a{color:#505d6b;font-size:14px;font-weight:400;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li ul{padding:0}.sidebar ul li.active>a{border-right:2px solid;color:var(--theme-color,#42b983);font-weight:600}.app-sub-sidebar li:before{content:"-";padding-right:4px;float:left}.markdown-section h1,.markdown-section h2,.markdown-section h3,.markdown-section h4,.markdown-section strong{color:#2c3e50;font-weight:600}.markdown-section a{color:var(--theme-color,#42b983);font-weight:600}.markdown-section h1{font-size:2rem;margin:0 0 1rem}.markdown-section h2{font-size:1.75rem;margin:45px 0 .8rem}.markdown-section h3{font-size:1.5rem;margin:40px 0 .6rem}.markdown-section h4{font-size:1.25rem}.markdown-section h5{font-size:1rem}.markdown-section h6{color:#777;font-size:1rem}.markdown-section figure,.markdown-section p{margin:1.2em 0}.markdown-section ol,.markdown-section p,.markdown-section ul{line-height:1.6rem;word-spacing:.05rem}.markdown-section ol,.markdown-section ul{padding-left:1.5rem}.markdown-section blockquote{border-left:4px solid var(--theme-color,#42b983);color:#858585;margin:2em 0;padding-left:20px}.markdown-section blockquote p{font-weight:600;margin-left:0}.markdown-section iframe{margin:1em 0}.markdown-section em{color:#7f8c8d}.markdown-section code,.markdown-section output:after,.markdown-section pre{font-family:Roboto Mono,Monaco,courier,monospace}.markdown-section code,.markdown-section pre{background-color:#f8f8f8}.markdown-section output,.markdown-section pre{margin:1.2em 0;position:relative}.markdown-section output,.markdown-section pre>code{border-radius:2px;display:block}.markdown-section output:after,.markdown-section pre>code{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}.markdown-section code{border-radius:2px;color:#e96900;margin:0 2px;padding:3px 5px;white-space:pre-wrap}.markdown-section>:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code{font-size:.8rem}.markdown-section pre{padding:0 1.4rem;line-height:1.5rem;overflow:auto;word-wrap:normal}.markdown-section pre>code{color:#525252;font-size:.8rem;padding:2.2em 5px;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;white-space:inherit}.markdown-section output{padding:1.7rem 1.4rem;border:1px dotted #ccc}.markdown-section output>:first-child{margin-top:0}.markdown-section output>:last-child{margin-bottom:0}.markdown-section code:after,.markdown-section code:before,.markdown-section output:after,.markdown-section output:before{letter-spacing:.05rem}.markdown-section output:after,.markdown-section pre:after{color:#ccc;font-size:.6rem;font-weight:600;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0}.markdown-section output:after,.markdown-section pre:after{content:attr(data-lang)}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8e908c}.token.namespace{opacity:.7}.token.boolean,.token.number{color:#c76b29}.token.punctuation{color:#525252}.token.property{color:#c08b30}.token.tag{color:#2973b7}.token.string{color:var(--theme-color,#42b983)}.token.selector{color:#6679cc}.token.attr-name{color:#2973b7}.language-css .token.string,.style .token.string,.token.entity,.token.url{color:#22a2c9}.token.attr-value,.token.control,.token.directive,.token.unit{color:var(--theme-color,#42b983)}.token.function,.token.keyword{color:#e96900}.token.atrule,.token.regex,.token.statement{color:#22a2c9}.token.placeholder,.token.variable{color:#3d8fd1}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #202746;text-decoration:none}.token.italic{font-style:italic}.token.bold,.token.important{font-weight:700}.token.important{color:#c94922}.token.entity{cursor:help}code .token{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;min-height:1.5rem;position:relative;left:auto} \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 9633e5c1a..814d73a6f 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -17,7 +17,7 @@ module.exports = function (grunt) { typedoc: { build: { options: { - out: './out/api/', + out: './docs/api/', name: 'Core Engine API', readme: './README.md', theme: 'default', @@ -35,23 +35,23 @@ module.exports = function (grunt) { expand: true, flatten: true, src: 'documentation/core-engine/headers/*', - dest: 'out/headers/' + dest: 'docs/headers' }, { expand: true, - src: '**/*', - cwd: 'documentation/static/', - dest: 'out' + src: 'README.md', + dest: 'docs/en' }, { expand: true, src: 'README.md', - dest: 'out/en' + dest: 'docs' }, { expand: true, - src: 'README.md', - dest: 'out' + src: 'changelog.md', + cwd: 'docs/en/page/apps/innercore', + dest: 'docs/ru/page/apps/innercore' } ] } diff --git a/package.json b/package.json index ad6d758bc..c487a2424 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,11 @@ { "name": "core-engine-api", + "displayName": "Inner Core Docs", "version": "2.1.0", - "description": "Inner Core Docs", + "description": "Horizon, Inner Core and Core Engine documentation in one place.", "devDependencies": { - "docsify-cli": "^4.4.2", + "docsify-cli": "^4.4.4", + "docsify-pdf-converter": "^2.0.7", "grunt": "^1.4.1", "grunt-cli": "^1.4.3", "grunt-contrib-concat": "^2.0.0", @@ -15,15 +17,11 @@ "typescript": "^4.5.4", "underscore.string": "^3.3.6" }, - "resolutions": { - "minimist": "^1.2.7" - }, "scripts": { - "serve-docs": "docsify serve ./documentation/static", - "serve-out": "docsify serve ./out", + "serve": "docsify serve ./docs", "build": "grunt docs_api", - "build-serve": "npm run build && npm run serve-out", - "preinstall": "npx npm-force-resolutions" + "build-serve": "npm run build && npm run serve", + "export": "docsify-pdf-converter" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index 54a563c8f..9e0389287 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,14 @@ { - "compilerOptions": { - "target": "ES5", - "lib": [ - "ES6" - ] - }, - "include": [ - "documentation/core-engine/headers/core-engine.d.ts" - ], - "exclude": [ - "documentation/static/**", + "compilerOptions": { + "target": "ES5", + "lib": [ + "ES6" ] -} \ No newline at end of file + }, + "include": [ + "documentation/core-engine/headers/core-engine.d.ts" + ], + "exclude": [ + "docs/**", + ] +}