diff --git a/404.html b/404.html new file mode 100644 index 000000000..b8620e621 --- /dev/null +++ b/404.html @@ -0,0 +1,20 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +

404

Looks like we've got some broken links.
+ Take me home. +
+ + + diff --git a/assets/css/0.styles.c3e38df3.css b/assets/css/0.styles.c3e38df3.css new file mode 100644 index 000000000..0ec167b69 --- /dev/null +++ b/assets/css/0.styles.c3e38df3.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.custom-block.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:#eee}.custom-block.details h4{margin-top:0}.custom-block.details figure:last-child,.custom-block.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-block.details summary{outline:none;cursor:pointer}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:focus .header-anchor,h1:hover .header-anchor,h2:focus .header-anchor,h2:hover .header-anchor,h3:focus .header-anchor,h3:hover .header-anchor,h4:focus .header-anchor,h4:hover .header-anchor,h5:focus .header-anchor,h5:hover .header-anchor,h6:focus .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;-webkit-user-select:none;user-select:none;opacity:0}a.header-anchor:focus,a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.algolia-search-wrapper>span{vertical-align:middle}.algolia-search-wrapper .algolia-autocomplete{line-height:normal}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu{background-color:#fff;border:1px solid #999;border-radius:4px;font-size:16px;margin:6px 0 0;padding:4px;text-align:left}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu:before{border-color:#999}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu [class*=ds-dataset-]{border:none;padding:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestions{margin-top:0}.algolia-search-wrapper .algolia-autocomplete .ds-dropdown-menu .ds-suggestion{border-bottom:1px solid #eaecef}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#2c815b}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion{border-color:#eaecef;padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header{padding:5px 10px;margin-top:0;background:#3eaf7c;color:#fff;font-weight:600}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background:hsla(0,0%,100%,.6)}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--wrapper{padding:0}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--title{font-weight:600;margin-bottom:0;color:#2c3e50}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{vertical-align:top;padding:5px 7px 5px 5px;border-color:#eaecef;background:#f1f3f5}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{display:none}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column-text{color:#555}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-footer{border-color:#eaecef}.algolia-search-wrapper .algolia-autocomplete .ds-cursor .algolia-docsearch-suggestion--content{background-color:#e7edf3!important;color:#2c3e50}@media (min-width:719px){.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{float:none;width:150px;min-width:150px;display:table-cell}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{float:none;display:table-cell;width:100%;vertical-align:top}.algolia-search-wrapper .algolia-autocomplete .algolia-docsearch-suggestion .ds-dropdown-menu{min-width:515px!important}}@media (max-width:719px){.algolia-search-wrapper .ds-dropdown-menu{min-width:calc(100vw - 4rem)!important;max-width:calc(100vw - 4rem)!important}.algolia-search-wrapper .algolia-docsearch-suggestion--wrapper{padding:5px 7px 5px 5px!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column{padding:0!important;background:#fff!important}.algolia-search-wrapper .algolia-docsearch-suggestion--subcategory-column-text:after{content:" > ";font-size:10px;line-height:14.4px;display:inline-block;width:5px;margin:-3px 3px 0;vertical-align:middle}}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/TouhouLittleMaid/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:2rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.page .theme-default-content[data-v-15b7b770]:not(.custom){max-width:80%}.page blockquote[data-v-15b7b770]{border-left:5px solid #96b946;margin-bottom:.8rem;padding:5px 15px;color:#656565;background-color:#f2f2f2;border-top-right-radius:2px;border-bottom-right-radius:2px}.badge[data-v-15b7b770]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-15b7b770],.badge.tip[data-v-15b7b770],.badge[data-v-15b7b770]{background-color:#42b983}.badge.error[data-v-15b7b770]{background-color:#da5961}.badge.warn[data-v-15b7b770],.badge.warning[data-v-15b7b770],.badge.yellow[data-v-15b7b770]{background-color:#e7c000}.badge+.badge[data-v-15b7b770]{margin-left:5px}.theme-code-block[data-v-759a7d02]{display:none}.theme-code-block__active[data-v-759a7d02]{display:block}.theme-code-block>pre[data-v-759a7d02]{background-color:orange}.page .theme-default-content[data-v-deefee04]:not(.custom){max-width:80%}.page blockquote[data-v-deefee04]{border-left:5px solid #96b946;margin-bottom:.8rem;padding:5px 15px;color:#656565;background-color:#f2f2f2;border-top-right-radius:2px;border-bottom-right-radius:2px}.theme-code-group__nav[data-v-deefee04]{margin-bottom:-35px;background-color:#282c34;padding-bottom:22px;border-top-left-radius:6px;border-top-right-radius:6px;padding-left:10px;padding-top:10px}.theme-code-group__ul[data-v-deefee04]{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.theme-code-group__nav-tab[data-v-deefee04]{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:hsla(0,0%,100%,.9);font-weight:600}.theme-code-group__nav-tab-active[data-v-deefee04]{border-bottom:1px solid #42b983}.pre-blank[data-v-deefee04]{color:#42b983}.searchbox{display:inline-block;position:relative;width:200px;height:32px!important;white-space:nowrap;box-sizing:border-box;visibility:visible!important}.searchbox .algolia-autocomplete{display:block;width:100%;height:100%}.searchbox__wrapper{width:100%;height:100%;z-index:999;position:relative}.searchbox__input{display:inline-block;box-sizing:border-box;transition:box-shadow .4s ease,background .4s ease;border:0;border-radius:16px;box-shadow:inset 0 0 0 1px #ccc;background:#fff!important;padding:0 26px 0 32px;width:100%;height:100%;vertical-align:middle;white-space:normal;font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbox__input::-webkit-search-cancel-button,.searchbox__input::-webkit-search-decoration,.searchbox__input::-webkit-search-results-button,.searchbox__input::-webkit-search-results-decoration{display:none}.searchbox__input:hover{box-shadow:inset 0 0 0 1px #b3b3b3}.searchbox__input:active,.searchbox__input:focus{outline:0;box-shadow:inset 0 0 0 1px #aaa;background:#fff}.searchbox__input::-moz-placeholder{color:#aaa}.searchbox__input::placeholder{color:#aaa}.searchbox__submit{position:absolute;top:0;margin:0;border:0;border-radius:16px 0 0 16px;background-color:rgba(69,142,225,0);padding:0;width:32px;height:100%;vertical-align:middle;text-align:center;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;right:inherit;left:0}.searchbox__submit:before{display:inline-block;margin-right:-4px;height:100%;vertical-align:middle;content:""}.searchbox__submit:active,.searchbox__submit:hover{cursor:pointer}.searchbox__submit:focus{outline:0}.searchbox__submit svg{width:14px;height:14px;vertical-align:middle;fill:#6d7e96}.searchbox__reset{display:block;position:absolute;top:8px;right:8px;margin:0;border:0;background:none;cursor:pointer;padding:0;font-size:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;fill:rgba(0,0,0,.5)}.searchbox__reset.hide{display:none}.searchbox__reset:focus{outline:0}.searchbox__reset svg{display:block;margin:4px;width:8px;height:8px}.searchbox__input:valid~.searchbox__reset{display:block;animation-name:sbx-reset-in;animation-duration:.15s}@keyframes sbx-reset-in{0%{transform:translate3d(-20%,0,0);opacity:0}to{transform:none;opacity:1}}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu{right:0!important;left:inherit!important}.algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu:before{right:48px}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu{left:0!important;right:inherit!important}.algolia-autocomplete.algolia-autocomplete-left .ds-dropdown-menu:before{left:48px}.algolia-autocomplete .ds-dropdown-menu{top:-6px;border-radius:4px;margin:6px 0 0;padding:0;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;max-width:600px;min-width:500px;box-shadow:0 1px 0 0 rgba(0,0,0,.2),0 2px 3px 0 rgba(0,0,0,.1)}.algolia-autocomplete .ds-dropdown-menu:before{display:block;position:absolute;content:"";width:14px;height:14px;background:#fff;z-index:1000;top:-7px;border-top:1px solid #d9d9d9;border-right:1px solid #d9d9d9;transform:rotate(-45deg);border-radius:2px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{position:relative;z-index:1000;margin-top:8px}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions a:hover{text-decoration:none}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion{cursor:pointer}.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion.suggestion-layout-simple,.algolia-autocomplete .ds-dropdown-menu .ds-suggestion.ds-cursor .algolia-docsearch-suggestion:not(.suggestion-layout-simple) .algolia-docsearch-suggestion--content{background-color:rgba(69,142,225,.05)}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{position:relative;border:1px solid #d9d9d9;background:#fff;border-radius:4px;overflow:auto;padding:0 8px 8px}.algolia-autocomplete .ds-dropdown-menu *{box-sizing:border-box}.algolia-autocomplete .algolia-docsearch-suggestion{display:block;position:relative;padding:0 8px;background:#fff;color:#02060c;overflow:hidden}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#174d8c;background:rgba(143,187,237,.1);padding:.1em .05em}.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl1 .algolia-docsearch-suggestion--highlight,.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{padding:0 0 1px;background:inherit;box-shadow:inset 0 -2px 0 0 rgba(69,142,225,.8);color:inherit}.algolia-autocomplete .algolia-docsearch-suggestion--content{display:block;float:right;width:70%;position:relative;padding:5.33333px 0 5.33333px 10.66667px;cursor:pointer}.algolia-autocomplete .algolia-docsearch-suggestion--content:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;left:-1px}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{position:relative;border-bottom:1px solid #ddd;display:none;margin-top:8px;padding:4px 0;font-size:1em;color:#33363d}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{width:100%;float:left;padding:8px 0 0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:left;width:30%;text-align:right;position:relative;padding:5.33333px 10.66667px;color:#a4a7ae;font-size:.9em;word-wrap:break-word}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column:before{content:"";position:absolute;display:block;top:0;height:100%;width:1px;background:#ddd;right:0}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-inline{display:none}.algolia-autocomplete .algolia-docsearch-suggestion--title{margin-bottom:4px;color:#02060c;font-size:.9em;font-weight:700}.algolia-autocomplete .algolia-docsearch-suggestion--text{display:block;line-height:1.2em;font-size:.85em;color:#63676d}.algolia-autocomplete .algolia-docsearch-suggestion--no-results{width:100%;padding:8px 0;text-align:center;font-size:1.2em}.algolia-autocomplete .algolia-docsearch-suggestion--no-results:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion code{padding:1px 5px;font-size:90%;border:none;color:#222;background-color:#ebebeb;border-radius:3px;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.algolia-autocomplete .algolia-docsearch-suggestion code .algolia-docsearch-suggestion--highlight{background:none}.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__main .algolia-docsearch-suggestion--category-header,.algolia-autocomplete .algolia-docsearch-suggestion.algolia-docsearch-suggestion__secondary{display:block}@media (min-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:block}}@media (max-width:768px){.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column{display:inline-block;width:auto;float:left;padding:0;color:#02060c;font-size:.9em;font-weight:700;text-align:left;opacity:.5}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:before{display:none}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column:after{content:"|"}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content{display:inline-block;width:auto;text-align:left;float:left;padding:0}.algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--content:before{display:none}}.algolia-autocomplete .suggestion-layout-simple.algolia-docsearch-suggestion{border-bottom:1px solid #eee;padding:8px;margin:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content{width:100%;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--content:before{display:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header{margin:0;padding:0;display:block;width:100%;border:none}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl0,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1{opacity:.6;font-size:.85em}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--category-header-lvl1:before{background-image:url('data:image/svg+xml;utf8,');content:"";width:10px;height:10px;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--wrapper{width:100%;float:left;margin:0;padding:0}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--duplicate-content,.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--subcategory-inline{display:none!important}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title{margin:0;color:#458ee1;font-size:.9em;font-weight:400}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--title:before{content:"#";font-weight:700;color:#458ee1;display:inline-block}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text{margin:4px 0 0;display:block;line-height:1.4em;padding:5.33333px 8px;background:#f8f8f8;font-size:.85em;opacity:.8}.algolia-autocomplete .suggestion-layout-simple .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{color:#3f4145;font-weight:700;box-shadow:none}.algolia-autocomplete .algolia-docsearch-footer{width:134px;height:20px;z-index:2000;margin-top:10.66667px;float:right;font-size:0;line-height:0}.algolia-autocomplete .algolia-docsearch-footer--logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='168' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M78.988.938h16.594a2.968 2.968 0 012.966 2.966V20.5a2.967 2.967 0 01-2.966 2.964H78.988a2.967 2.967 0 01-2.966-2.964V3.897A2.961 2.961 0 0178.988.938zm41.937 17.866c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 00-1.574-.199 5.7 5.7 0 00-.897.069 2.699 2.699 0 00-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 01-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 01-1.471-.636 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 011.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 011.82-.185 8.404 8.404 0 011.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 00-.384-.73 1.784 1.784 0 00-.724-.493 3.164 3.164 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 00-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 012.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 00-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 00-.814.24 1.46 1.46 0 00-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 01.233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 01-1.471-.635 3.085 3.085 0 01-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 012.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 00-.109-.875 1.873 1.873 0 00-.384-.731 1.784 1.784 0 00-.724-.492 3.165 3.165 0 00-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 00-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 012.073-.177zm-8.034-1.271a1.626 1.626 0 01-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 01-1.128 1.906 4.986 4.986 0 01-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 01-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 01-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 011.15-1.892 5.133 5.133 0 011.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 011.753 1.216 5.644 5.644 0 011.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 00-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 01-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 01-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 012.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17z' fill='%235468FF'/%3E%3Cpath d='M6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 00-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 01-.582-.271 13.67 13.67 0 01-.55-.287 4.275 4.275 0 01-.567-.351 6.92 6.92 0 01-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 01-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 00-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 00-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 00-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 01-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z' fill='%235D6494'/%3E%3Cpath d='M89.632 5.967v-.772a.978.978 0 00-.978-.977h-2.28a.978.978 0 00-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 011.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 00-1.382 0l-.465.465a.973.973 0 000 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 00-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 01-4.49-4.482 4.488 4.488 0 014.49-4.482 4.488 4.488 0 014.489 4.482 4.484 4.484 0 01-4.49 4.482m0-10.85a6.363 6.363 0 100 12.729 6.37 6.37 0 006.372-6.368 6.358 6.358 0 00-6.371-6.36' fill='%23FFF'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:50%;background-size:100%;overflow:hidden;text-indent:-9000px;padding:0!important;width:100%;height:100%;display:block}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title,.dropdown-wrapper .mobile-dropdown-title{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:#2c3e50}.dropdown-wrapper .dropdown-title:hover,.dropdown-wrapper .mobile-dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow,.dropdown-wrapper .mobile-dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .mobile-dropdown-title{display:none;font-weight:600}.dropdown-wrapper .mobile-dropdown-title font-size inherit:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:1rem 1.5rem .45rem 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .dropdown-title{display:none}.dropdown-wrapper .mobile-dropdown-title{display:block}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper.open .nav-dropdown,.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#767676}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.page .theme-default-content:not(.custom){max-width:80%}.page blockquote{border-left:5px solid #96b946;margin-bottom:.8rem;padding:5px 15px;color:#656565;background-color:#f2f2f2;border-top-right-radius:2px;border-bottom-right-radius:2px}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}} \ No newline at end of file diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg new file mode 100644 index 000000000..03d83913e --- /dev/null +++ b/assets/img/search.83621669.svg @@ -0,0 +1 @@ + diff --git a/assets/js/1.e6d3c32f.js b/assets/js/1.e6d3c32f.js new file mode 100644 index 000000000..39ce33cdb --- /dev/null +++ b/assets/js/1.e6d3c32f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1,12,14,19,20,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return p})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return k}));n(90);const s=/#.*$/,i=/\.(md|html)$/,r=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(s,"").replace(i,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;const e=t.match(s),n=e?e[0]:"",i=a(t);return r.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(s);if(e)return e[0]}(e);if(i&&n!==i)return!1;return a(t.path)===a(e)}function p(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const s=t.charAt(0);if("/"===s)return t;if("?"===s||"#"===s)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,s,i=1){if("string"==typeof e)return p(n,e,s);if(Array.isArray(e))return Object.assign(p(n,e[0],s),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(p(n,e.path,s),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,s,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function k(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var s=n(239),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(s.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(s.g)(this.link)||Object(s.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(s.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(s.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(14),o=Object(r.a)(i,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},242:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),r=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},247:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var s=n(241),i=n(242),r=n(91),o=n.n(r),a={name:"DropdownLink",components:{NavLink:s.default,DropdownTransition:i.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,s){return e("li",{key:n.link||s,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(s){return e("li",{key:s.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:s},on:{focusout:function(e){t.isLastItemOfArray(s,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},257:function(t,e,n){"use strict";n(247)},258:function(t,e,n){},265:function(t,e,n){"use strict";n.r(e);var s=n(254),i=n(239),r={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:s.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,s=this.$site.themeConfig.locales||{},i={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(i=>{const r=t[i],o=s[i]&&s[i].label||r.lang;let a;return r.lang===this.$lang?a=e:(a=e.replace(this.$localeConfig.path,i),n.some(t=>t.path===a)||(a=i)),{text:o,link:a}})};return[...this.userNav,i]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n{let s=i()(e,"title","");return i()(e,"frontmatter.tags")&&(s+=" "+e.frontmatter.tags.join(" ")),n&&(s+=" "+n),o(t,s)};const o=(t,e)=>{const n=t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp("[^\0-]"),i=t.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t);if(s.test(t))return i.some(t=>e.toLowerCase().indexOf(t)>-1);{const s=t.endsWith(" ");return new RegExp(i.map((t,e)=>i.length!==e+1||s?`(?=.*\\b${n(t)}\\b)`:`(?=.*\\b${n(t)})`).join("")+".+","gi").test(e)}};var a={name:"SearchBox",data:()=>({query:"",focused:!1,focusIndex:0,placeholder:void 0}),computed:{showSuggestions(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions(){const t=this.query.trim().toLowerCase();if(!t)return;const{pages:e}=this.$site,n=this.$site.themeConfig.searchMaxSuggestions||5,s=this.$localePath,i=[];for(let o=0;o=n);o++){const a=e[o];if(this.getPageLocalePath(a)===s&&this.isSearchable(a))if(r(t,a))i.push(a);else if(a.headers)for(let e=0;e=n);e++){const n=a.headers[e];n.title&&r(t,a,n.title)&&i.push(Object.assign({},a,{path:a.path+"#"+n.slug,header:n}))}}return i},alignRight(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath(t){for(const e in this.$site.locales||{})if("/"!==e&&0===t.path.indexOf(e))return e;return"/"},isSearchable(t){let e=null;return null===e||(e=Array.isArray(e)?e:new Array(e),e.filter(e=>t.path.match(e)).length>0)},onHotkey(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown(){this.showSuggestions&&(this.focusIndex "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null).exports,c=n(283),h=n(265);function f(t,e){return t.ownerDocument.defaultView.getComputedStyle(t,null)[e]}var p={name:"Navbar",components:{SidebarButton:c.default,NavLinks:h.default,SearchBox:u,AlgoliaSearchBox:{}},data:()=>({linksWrapMaxWidth:null}),computed:{algolia(){return this.$themeLocaleConfig.algolia||this.$site.themeConfig.algolia||{}},isAlgoliaSearch(){return this.algolia&&this.algolia.apiKey&&this.algolia.indexName}},mounted(){const t=parseInt(f(this.$el,"paddingLeft"))+parseInt(f(this.$el,"paddingRight")),e=()=>{document.documentElement.clientWidth<719?this.linksWrapMaxWidth=null:this.linksWrapMaxWidth=this.$el.offsetWidth-t-(this.$refs.siteName&&this.$refs.siteName.offsetWidth||0)};e(),window.addEventListener("resize",e,!1)}},d=(n(290),Object(l.a)(p,(function(){var t=this,e=t._self._c;return e("header",{staticClass:"navbar"},[e("SidebarButton",{on:{"toggle-sidebar":function(e){return t.$emit("toggle-sidebar")}}}),t._v(" "),e("RouterLink",{staticClass:"home-link",attrs:{to:t.$localePath}},[t.$site.themeConfig.logo?e("img",{staticClass:"logo",attrs:{src:t.$withBase(t.$site.themeConfig.logo),alt:t.$siteTitle}}):t._e(),t._v(" "),t.$siteTitle?e("span",{ref:"siteName",staticClass:"site-name",class:{"can-hide":t.$site.themeConfig.logo}},[t._v(t._s(t.$siteTitle))]):t._e()]),t._v(" "),e("div",{staticClass:"links",style:t.linksWrapMaxWidth?{"max-width":t.linksWrapMaxWidth+"px"}:{}},[t.isAlgoliaSearch?e("AlgoliaSearchBox",{attrs:{options:t.algolia}}):!1!==t.$site.themeConfig.search&&!1!==t.$page.frontmatter.search?e("SearchBox"):t._e(),t._v(" "),e("NavLinks",{staticClass:"can-hide"})],1)],1)}),[],!1,null,null,null));e.default=d.exports}}]); \ No newline at end of file diff --git a/assets/js/10.da380764.js b/assets/js/10.da380764.js new file mode 100644 index 000000000..94381b30e --- /dev/null +++ b/assets/js/10.da380764.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10,3,12,14,18,19,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return g}));n(90);const i=/#.*$/,s=/\.(md|html)$/,r=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(s,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",s=o(t);return r.test(s)?t:s+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),s=function(t){const e=t.match(i);if(e)return e[0]}(e);if(s&&n!==s)return!1;return o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const s=e.split("/");n&&s[s.length-1]||s.pop();const r=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,s=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const r=e.children||[];return 0===r.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:r.map(e=>t(e,n,i,s+1)),collapsable:!1!==e.collapsable}}}(t,s,n)):[]}return[]}function b(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),s={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},r=n(14),a=Object(r.a)(s,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},s=(n(243),n(14)),r=Object(s.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=r.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},245:function(t,e,n){},247:function(t,e,n){},250:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},252:function(t,e,n){"use strict";n(245)},253:function(t,e,n){"use strict";n.r(e);var i=n(266),s=n(255),r=n(239);function a(t,e){if("group"===e.type){const n=e.path&&Object(r.e)(t,e.path),i=e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(r.e)(t,e.path));return n||i}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:i.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(r.e)(this.$route,t.regularPath)}}},l=n(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,i){return e("li",{key:i},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:i===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},254:function(t,e,n){"use strict";n.r(e);var i=n(241),s=n(242),r=n(91),a=n.n(r),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:s.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},255:function(t,e,n){"use strict";n.r(e);var i=n(239);function s(t,e,n,i,s){const r={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}};return s>2&&(r.style={"padding-left":s+"rem"}),t("RouterLink",r,n)}function r(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(i.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,n+"#"+e.slug,e.title,u,e.level-1),r(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(i.e)(a,u.path),h="auto"===u.type?p||u.children.some(t=>Object(i.e)(a,u.basePath+"#"+t.slug)):p,d="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,h),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[d,r(t,u.children,u.basePath,a,f)];if((h||b)&&u.headers&&!i.d.test(u.path)){return[d,r(t,Object(i.c)(u.headers),u.path,a,f)]}return d}},o=(n(252),n(14)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},257:function(t,e,n){"use strict";n(247)},263:function(t,e,n){"use strict";n(250)},264:function(t,e,n){},265:function(t,e,n){"use strict";n.r(e);var i=n(254),s=n(239),r={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},s={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(s=>{const r=t[s],a=i[s]&&i[s].label||r.lang;let o;return r.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,s),n.some(t=>t.path===o)||(o=s)),{text:a,link:o}})};return[...this.userNav,s]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(s.j)(t),{items:(t.items||[]).map(s.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/102.482c782e.js b/assets/js/102.482c782e.js new file mode 100644 index 000000000..c4a3bf870 --- /dev/null +++ b/assets/js/102.482c782e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{381:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/103.c5f2d849.js b/assets/js/103.c5f2d849.js new file mode 100644 index 000000000..624b1e66c --- /dev/null +++ b/assets/js/103.c5f2d849.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{382:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/104.4c3ca6e1.js b/assets/js/104.4c3ca6e1.js new file mode 100644 index 000000000..5c7df62d7 --- /dev/null +++ b/assets/js/104.4c3ca6e1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{383:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/105.55ed8d36.js b/assets/js/105.55ed8d36.js new file mode 100644 index 000000000..0bb3254c2 --- /dev/null +++ b/assets/js/105.55ed8d36.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[105],{384:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/106.917e4f04.js b/assets/js/106.917e4f04.js new file mode 100644 index 000000000..8f19796a9 --- /dev/null +++ b/assets/js/106.917e4f04.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{385:function(t,n,o){"use strict";o.r(n);var s=o(14),e=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Hãy đảm bào rằng phiên bản của Touhou Little Maid mà bạn đang dùng là bản mới nhất.")])])])}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/107.836420c2.js b/assets/js/107.836420c2.js new file mode 100644 index 000000000..aa98678c5 --- /dev/null +++ b/assets/js/107.836420c2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{386:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/108.7cd5fa7c.js b/assets/js/108.7cd5fa7c.js new file mode 100644 index 000000000..63df87dff --- /dev/null +++ b/assets/js/108.7cd5fa7c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{387:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/109.b93451cf.js b/assets/js/109.b93451cf.js new file mode 100644 index 000000000..fef5c4217 --- /dev/null +++ b/assets/js/109.b93451cf.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{388:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/11.72ae73cf.js b/assets/js/11.72ae73cf.js new file mode 100644 index 000000000..86149c03a --- /dev/null +++ b/assets/js/11.72ae73cf.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11,15,17],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return v})),n.d(e,"j",(function(){return m}));n(90);const r=/#.*$/,i=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function p(t){if(u(t))return t;const e=t.match(r),n=e?e[0]:"",i=o(t);return a.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function d(t,e,n){if(u(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function g(t){const e=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function v(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,n){},249:function(t,e,n){},259:function(t,e,n){"use strict";n(248)},260:function(t,e,n){var r=n(11),i=n(4),a=n(10);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},261:function(t,e,n){"use strict";n(249)},262:function(t,e,n){},267:function(t,e,n){"use strict";n.r(e);var r=n(246),i=n.n(r),a=n(239),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=i()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:r="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,r,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,r,i){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i+`?mode=edit&spa=0&at=${r}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${r}/`+(n?n.replace(a.a,"")+"/":"")+i}}},o=(n(259),n(14)),u=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=u.exports},268:function(t,e,n){"use strict";n.r(e);n(90);var r=n(239),i=n(260),a=n.n(i),s=n(246),o=n.n(s),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return l(c.PREV,this)},next(){return l(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function l(t,{$themeConfig:e,$page:n,$route:i,$site:s,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:l,getPageLinkConfig:p}=t,f=l(e),d=p(n),h=o()(d)?f:d;return!1===h?void 0:a()(h)?Object(r.k)(s.pages,h,i.path):c(n,u)}function p(t,e,n){const r=[];!function t(e,n){for(let r=0,i=e.length;r")]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ore"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("blockGlass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ore"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("sand"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("diamond_sword"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 可变参数的示例,这里仅写成一个合成的输入物品")]),s._v("\nAltar"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("addItemCraftRecipe")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:craft_apple"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("touhou_little_maid"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("apple"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("*")]),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ore"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("blockGlass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 生成女仆的合成添加")]),s._v("\nAltar"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("addMaidSpawnCraftRecipe")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"test:replace_maid"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.5")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" \n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 女仆手办复活的合成添加")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 这个合成只能书写 1-5 个物品,手办物品是直接强制内嵌在合成中的")]),s._v("\nAltar"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("addMaidReviveCraftRecipe")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"test:reborn_maid"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.3")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" \n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("grass"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 其他生物的合成")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 第三个参数需要书写完整的实体 id")]),s._v("\nAltar"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("addEntitySpawnCraftRecipe")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"test:spawn_pig"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.2")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"minecraft:pig"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" \n "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("stone"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("stone"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("minecraft"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("stone"),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 删除合成,通过合成的 id 来删除合成,这也是为什么上面多次提到需要设置独立合成 id 的原因")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 只有一个参数,即合成的 id,只需要通过 JEI 就能查到模组自带合成的 id")]),s._v("\nAltar"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),t("span",{pre:!0,attrs:{class:"token function"}},[s._v("removeRecipe")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:craft_camera"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br"),t("span",{staticClass:"line-number"},[s._v("13")]),t("br"),t("span",{staticClass:"line-number"},[s._v("14")]),t("br"),t("span",{staticClass:"line-number"},[s._v("15")]),t("br"),t("span",{staticClass:"line-number"},[s._v("16")]),t("br"),t("span",{staticClass:"line-number"},[s._v("17")]),t("br"),t("span",{staticClass:"line-number"},[s._v("18")]),t("br"),t("span",{staticClass:"line-number"},[s._v("19")]),t("br"),t("span",{staticClass:"line-number"},[s._v("20")]),t("br"),t("span",{staticClass:"line-number"},[s._v("21")]),t("br"),t("span",{staticClass:"line-number"},[s._v("22")]),t("br"),t("span",{staticClass:"line-number"},[s._v("23")]),t("br"),t("span",{staticClass:"line-number"},[s._v("24")]),t("br"),t("span",{staticClass:"line-number"},[s._v("25")]),t("br"),t("span",{staticClass:"line-number"},[s._v("26")]),t("br"),t("span",{staticClass:"line-number"},[s._v("27")]),t("br"),t("span",{staticClass:"line-number"},[s._v("28")]),t("br"),t("span",{staticClass:"line-number"},[s._v("29")]),t("br"),t("span",{staticClass:"line-number"},[s._v("30")]),t("br"),t("span",{staticClass:"line-number"},[s._v("31")]),t("br"),t("span",{staticClass:"line-number"},[s._v("32")]),t("br"),t("span",{staticClass:"line-number"},[s._v("33")]),t("br")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/116.055322c8.js b/assets/js/116.055322c8.js new file mode 100644 index 000000000..e9a8603da --- /dev/null +++ b/assets/js/116.055322c8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{395:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"自定义-javascript-动画"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#自定义-javascript-动画"}},[t._v("#")]),t._v(" 自定义 JavaScript 动画")]),t._v(" "),e("p",[t._v("通过 JavaScript 文件,你可以为女仆或坐垫添加自定义动画。")]),t._v(" "),e("ul",[e("li",[t._v("本 wiki 适用于 Touhou Little Maid 模组 "),e("code",[t._v("1.12.2")]),t._v(" 和 "),e("code",[t._v("1.16.5")]),t._v(" 版本;")]),t._v(" "),e("li",[t._v("需要对 JavaScript 基本语法有简单的了解;")]),t._v(" "),e("li",[t._v("需要高中及以上数学知识,尤其是对三角函数和极坐标的理解。")]),t._v(" "),e("li",[t._v("文本编辑软件推荐 VSCode,相关文本文件均需要用 UTF-8 无 BOM 编码进行存储。")])]),t._v(" "),e("h2",{attrs:{id:"基本格式"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#基本格式"}},[t._v("#")]),t._v(" 基本格式")]),t._v(" "),e("p",[t._v("动画脚本放置在文件夹任意位置均可,只需要在对应模型字段处声明动画文件位置即可。 我建议将它放入 "),e("code",[t._v("animation")]),t._v(" 文件夹中。")]),t._v(" "),e("p",[t._v("下面是通用模板:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 当你需要使用 GlWrapper 时才需要声明这一段代码")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity 需要应用动画的实体对象\n * @param limbSwing 实体在行走过程中的速度(可以理解为汽车的速度表)\n * @param limbSwingAmount 实体行走的总里程数(可以理解为汽车的里程表)\n * @param ageInTicks 实体的 tick 时间,一个从 0 开始一直增加的数值\n * @param netHeadYaw 实体头部的偏航\n * @param headPitch 实体头部的俯仰\n * @param scale 实体缩放参数,默认为 0.0625,未发现任何使用的地方\n * @param modelMap 为一个 map,存储了该模型所有的骨骼\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 相关动画的书写")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("这里我们举一个简单的例子,当前模型有一个带有名为 "),e("code",[t._v("rotation")]),t._v(" 的骨骼,我们想要把让这个骨骼绕着 X 轴持续的做旋转运动,运动的速度大约为每 tick 1 度(也就是 18 秒转一圈),我们可以这样写动画。")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 当你需要使用 GlWrapper 时才需要声明这一段代码")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 先从 modelMap 中尝试获取名为 rotation 的骨骼")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 以防万一,我们做个简单的判定,确保此骨骼一定存在")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 通过骨骼的 setRotateAngleX 函数设置其 X 轴角度")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks 为实体的 tick 时间,一个从 0 开始一直增加的数值")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 通过取余运算(也就是 % 符号)将这个数限定在 0~360 之间")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 因为该方法只接收弧度值,所以需要乘以 0.017453292 转换成对应弧度")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 这样我们就实现了每 tick 旋转 1 度的动画")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("现在我们再进行一个更加复杂的运动,我们有一个名为 "),e("code",[t._v("wing")]),t._v(" 的骨骼,我们想要其能够持续的来回摆动。")]),t._v(" "),e("p",[t._v("摆动围绕 Y 轴,摆动角度在 "),e("code",[t._v("-20°~40°")]),t._v(" 之间,每 5 秒做一次完整的往复运动。")]),t._v(" "),e("p",[t._v("这一块恰好需要用到高中所学的三角函数知识,这一块选取正弦或者余弦均可,我们使用正弦函数。")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 当你需要使用 GlWrapper 时才需要声明这一段代码")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 先从 modelMap 中尝试获取名为 wing 的骨骼")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 以防万一,我们做个简单的判定,确保此骨骼一定存在")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 每 5 秒完整的往复一次,也就是 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 通过乘法和求余来实现这个功能")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 这一块调用了 JavaScript 的 Math 函数")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 构建正弦函数,获得数值为 -20~40 的周期函数")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 最后进行参数的应用")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("其他复杂的运动均可通过相关函数来实现。")]),t._v(" "),e("h2",{attrs:{id:"游戏内热重载功能"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#游戏内热重载功能"}},[t._v("#")]),t._v(" 游戏内热重载功能")]),t._v(" "),e("p",[t._v("因为干巴巴的函数式并不能确定该动画是否表现正确,我们添加了游戏内的动画热重载功能。")]),t._v(" "),e("p",[t._v("加载模型资源包后,只需使用以下命令即可重新加载所有动画数据。")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"函数文档"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#函数文档"}},[t._v("#")]),t._v(" 函数文档")]),t._v(" "),e("p",[t._v("删除线样式的表示此函数已在 1.16 中被废弃,你可以访问"),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("此处连接"),e("OutboundLink")],1),t._v("查看源码 API。")]),t._v(" "),e("h3",{attrs:{id:"实体参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#实体参数"}},[t._v("#")]),t._v(" 实体参数")]),t._v(" "),e("p",[t._v("依据附加动画的对象不同,"),e("code",[t._v("entity")]),t._v(" 参数可用的函数也不相同。")]),t._v(" "),e("h4",{attrs:{id:"女仆"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#女仆"}},[t._v("#")]),t._v(" 女仆")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("函数名")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("返回值")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆穿戴头盔后,返回 "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆穿戴胸甲后,返回 "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆穿戴护腿后,返回 "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆穿戴靴子后,返回 "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当女仆佩戴头盔后,返回头盔物品的注册名称。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当女仆佩戴胸甲后,返回胸甲物品的注册名称。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当女仆佩戴护腿后,返回护腿物品的注册名称。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当女仆佩戴靴子后,返回头盔物品的注册名称。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆是否处于祈求模式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆是否处于骑乘模式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆是否处于待命模式")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("女仆是否携带手推车或其他实体。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取女仆的生命值")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取女仆的最大生命值")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取一个固定值,每个实体都是不同的,类似于该实体的 UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"坐垫"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#坐垫"}},[t._v("#")]),t._v(" 坐垫")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("函数名")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("返回值")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("坐垫是否被玩家所坐")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("坐垫是否有乘客")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取一个固定值,每个实体都是不同的,类似于该实体的 UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"世界"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#世界"}},[t._v("#")]),t._v(" 世界")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("函数名")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("返回值")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取当前世界的时间(tick,0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当前世界是否为白天")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当前世界是否为黑夜")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当前世界是否在降雨")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("当前世界是否处于雷雨中")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-和-limbswingamount-参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-和-limbswingamount-参数"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" 和 "),e("code",[t._v("limbSwingAmount")]),t._v(" 参数")]),t._v(" "),e("p",[t._v("这些都是浮点数,"),e("code",[t._v("limbSwing")]),t._v("是实体的行走速度(可以将其视为汽车的速度计),"),e("code",[t._v("limbSwingAmount")]),t._v("是实体的总行走距离(可以将其视为汽车的里程表)。")]),t._v(" "),e("p",[t._v("这两个数据主要用于腿部和肢体的旋转,Minecraft原版使用这两个基本数据来计算手臂和腿部摆动的动画。")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("改变值"),e("code",[t._v("0.6662")]),t._v("将控制摆动的频率,乘以公式的系数 (例如,腿部使用"),e("code",[t._v("1.4")]),t._v("作为系数) 来改变摆动的幅度。")]),t._v(" "),e("p",[t._v("使用原版Minecraft的手臂和腿摆动公式可以使摆动动画更加自然。")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-参数"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" 参数")]),t._v(" "),e("p",[t._v("浮点数,一个从 0 开始每 tick 都会自加的变量,大多数动画中都会用到的自变量。")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-和-headpitch-参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-和-headpitch-参数"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" 和 "),e("code",[t._v("headPitch")]),t._v(" 参数")]),t._v(" "),e("p",[t._v("二者均为浮点数,单位为角度(这是原版 Minecraft 所设计的)。")]),t._v(" "),e("p",[t._v("通常此参数可以用作旋转角度,你只需要将其更改为弧度。")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("如果在此部分设置的系数大于'0.017453292',可能会出现一些错误问题。")])]),t._v(" "),e("h3",{attrs:{id:"scale-参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-参数"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" 参数")]),t._v(" "),e("p",[t._v("浮点数,固定为 0.0625。")]),t._v(" "),e("p",[t._v("一个含义不明的值。")]),t._v(" "),e("h3",{attrs:{id:"modelmap-参数"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-参数"}},[t._v("#")]),t._v(" modelMap 参数")]),t._v(" "),e("p",[t._v("一个使用字符串作为键的保存组的 Map。")]),t._v(" "),e("p",[t._v("您可以通过"),e("code",[t._v('modelMap.get("xxx")')]),t._v("获取相应的组。 如果没有与名称匹配的组,返回"),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("假设我们想获取目标组"),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("然后我们可以使用这个"),e("code",[t._v("head")]),t._v("组来设置各种参数,制作动画。")]),t._v(" "),e("p",[t._v("当然,为了预防起见,最好对该组进行检查,以确保它存在。")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// 制作各种动画")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"组"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#组"}},[t._v("#")]),t._v(" 组")]),t._v(" "),e("p",[t._v("我们可以通过"),e("code",[t._v('modelMap.get("xxx")')]),t._v("获取各种组,以下是可用于获取到的组的函数列表。")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("函数名")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("返回值")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 X 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 Y 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 Z 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 X 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 Y 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组的 Z 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("设置组是否隐藏")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 X 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 Y 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 Z 轴角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取 ModelRenderer 的初始化 X 轴旋转角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取 ModelRenderer 的初始化 Y 轴旋转角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取 ModelRenderer 的初始化 Z 轴旋转角度")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 X 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 Y 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("获取组的 Z 轴坐标偏移")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("检查组是否隐藏")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("在脚本的最开头,我们使用了一个叫做 "),e("code",[t._v("GlWrapper")]),t._v(" 的工具,它可以进行各种平移、旋转和缩放操作。")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("函数名")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("返回值")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("备注")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("将实体移动至坐标 x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("以直线 "),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" 为轴,将其旋转 "),e("code",[t._v("angle")]),t._v(" 度。")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("无")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("将实体在三条轴上缩放 x y z 倍")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/117.4b1a4e68.js b/assets/js/117.4b1a4e68.js new file mode 100644 index 000000000..0d095ac34 --- /dev/null +++ b/assets/js/117.4b1a4e68.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{396:function(t,_,a){"use strict";a.r(_);var r=a(14),v=Object(r.a)({},(function(){var t=this,_=t._self._c;return _("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[_("h1",{attrs:{id:"自定义模型包"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#自定义模型包"}},[t._v("#")]),t._v(" 自定义模型包")]),t._v(" "),_("p",[t._v("Touhou Little Maid 模组支持自定义模型包,你可以通过 Blockbench 这样的软件快速制作你喜欢的模型。 游戏可以读取 zip 压缩文件格式的模型包,或者直接读取文件夹。")]),t._v(" "),_("p",[t._v("该模型包兼容的模组版本 "),_("code",[t._v("1.12.2")]),t._v(" 和 "),_("code",[t._v("1.16.5")]),t._v(" 完全相同,只是加载方法略有不同:")]),t._v(" "),_("ul",[_("li",[_("code",[t._v("1.12.2")]),t._v(":模型包需要像原版资源包一样加载。")]),t._v(" "),_("li",[_("code",[t._v("1.16.5")]),t._v(":模型包需要放置在游戏目录下的 "),_("code",[t._v("tlm_custom_pack")]),t._v(" 文件夹中。")])]),t._v(" "),_("p",[t._v("即使你是新手,从零开始制作一个自定义模型包也不难。 你只需要以下免费软件:")]),t._v(" "),_("ul",[_("li",[_("p",[t._v("Blockbench: 一个由 "),_("code",[t._v("JannisX11")]),t._v(" 开发的专门用于 Minecraft 3D 建模的软件。")]),t._v(" "),_("p",[t._v("官方网站:"),_("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://blockbench.net/"),_("OutboundLink")],1)]),t._v(" "),_("p",[t._v("模组目前只支持基岩版模型格式,不支持基岩版动画文件。")])]),t._v(" "),_("li",[_("p",[t._v("Visual Studio Code:微软开发的一个集成开发环境软件。")]),t._v(" "),_("p",[t._v("官方网站:"),_("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://code.visualstudio.com/"),_("OutboundLink")],1)]),t._v(" "),_("p",[t._v("主要用于编辑语言文件,可选。")])])]),t._v(" "),_("p",[t._v("此外,我还编写了一个用于导出自定义模型包的 Blockbench 插件,仅适用于 Blockbench 4.0 版本")]),t._v(" "),_("p",[t._v("插件网站: "),_("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[t._v("http://page.cfpa.team/TLM-Utils-Plugins/"),_("OutboundLink")],1)]),t._v(" "),_("h1",{attrs:{id:"快速入门"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#快速入门"}},[t._v("#")]),t._v(" 快速入门")]),t._v(" "),_("p",[t._v("首先你需要了解如何使用 Blockbench,其次你需要安装 "),_("code",[t._v("tlm-utils")]),t._v(" 插件。"),_("br"),t._v("\n当一切完成后,你可以根据下面的说明开始制作一个模型包。")]),t._v(" "),_("h2",{attrs:{id:"_1-创建默认模型"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_1-创建默认模型"}},[t._v("#")]),t._v(" 1. 创建默认模型")]),t._v(" "),_("p",[t._v("创建一个默认模型,它将自动创建一个默认的基岩版模型,你可以在此基础上进行修改。"),_("br"),t._v("\n如果你选择 "),_("code",[t._v("坐垫")]),t._v(",没有默认模型。")]),t._v(" "),_("p",[_("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),t._v(" "),_("h2",{attrs:{id:"_2-基于默认模型-随心所欲的修改它"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_2-基于默认模型-随心所欲的修改它"}},[t._v("#")]),t._v(" 2. 基于默认模型,随心所欲的修改它")]),t._v(" "),_("p",[t._v("需要注意以下几点:")]),t._v(" "),_("ol",[_("li",[_("p",[t._v("女仆的动画是根据"),_("strong",[t._v("组名")]),t._v("自动添加的,所以请不要随意删除或重命名组名。")]),t._v(" "),_("blockquote",[_("p",[t._v("想知道哪些组名可用? 请查看 "),_("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("预设动画")]),t._v(" 篇章。")],1)]),t._v(" "),_("blockquote",[_("p",[t._v("你可以右击大纲界面打开预设动画菜单"),_("br"),t._v(" "),_("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),t._v(" "),_("li",[_("p",[t._v("注意组的子父级关系。")])]),t._v(" "),_("li",[_("p",[t._v("注意旋转点。")])])]),t._v(" "),_("h2",{attrs:{id:"_3-创建材质"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_3-创建材质"}},[t._v("#")]),t._v(" 3. 创建材质")]),t._v(" "),_("p",[t._v("你可以直接在 Blockbench 中编辑材质,或者通过其他图像编辑器编辑材质。")]),t._v(" "),_("p",[_("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),t._v(" "),_("h2",{attrs:{id:"_4-创建一个模型包"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_4-创建一个模型包"}},[t._v("#")]),t._v(" 4. 创建一个模型包")]),t._v(" "),_("p",[_("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),t._v(" "),_("h2",{attrs:{id:"_5-将模型导出到模型包"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_5-将模型导出到模型包"}},[t._v("#")]),t._v(" 5. 将模型导出到模型包")]),t._v(" "),_("p",[_("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),t._v(" "),_("h2",{attrs:{id:"_6-愉快的加载模型吧"}},[_("a",{staticClass:"header-anchor",attrs:{href:"#_6-愉快的加载模型吧"}},[t._v("#")]),t._v(" 6. 愉快的加载模型吧!")])])}),[],!1,null,null,null);_.default=v.exports}}]); \ No newline at end of file diff --git a/assets/js/118.38082445.js b/assets/js/118.38082445.js new file mode 100644 index 000000000..644252413 --- /dev/null +++ b/assets/js/118.38082445.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{397:function(s,t,a){"use strict";a.r(t);var n=a(14),e=Object(n.a)({},(function(){var s=this,t=s._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[t("h1",{attrs:{id:"女仆模型包详解"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#女仆模型包详解"}},[s._v("#")]),s._v(" 女仆模型包详解")]),s._v(" "),t("ul",[t("li",[s._v("本 wiki 适用于 Touhou Little Maid 模组 "),t("code",[s._v("1.12.2")]),s._v(" 和 "),t("code",[s._v("1.16.5")]),s._v(" 最新版;")]),s._v(" "),t("li",[s._v("需要了解原版 Minecraft 的资源包结构;")]),s._v(" "),t("li",[s._v("需要了解 JSON 格式;")]),s._v(" "),t("li",[s._v("当前仅支持 "),t("strong",[s._v("1.10.0 和 1.12.0 版本基岩版模型")]),s._v(";")]),s._v(" "),t("li",[s._v("对于文本编辑软件,我们推荐使用 "),t("code",[s._v("Visual Studio Code")]),s._v(",所有的文件都需要以 "),t("code",[s._v("UTF-8 无 BOM")]),s._v(" 编码保存。")])]),s._v(" "),t("h2",{attrs:{id:"模型包结构"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#模型包结构"}},[s._v("#")]),s._v(" 模型包结构")]),s._v(" "),t("p",[s._v("为了更好地理解如何创建模型包,我们在此列出了模型包的结构")]),s._v(" "),t("div",{staticClass:"language- line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[s._v("模型包文件夹\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br"),t("span",{staticClass:"line-number"},[s._v("13")]),t("br"),t("span",{staticClass:"line-number"},[s._v("14")]),t("br"),t("span",{staticClass:"line-number"},[s._v("15")]),t("br"),t("span",{staticClass:"line-number"},[s._v("16")]),t("br"),t("span",{staticClass:"line-number"},[s._v("17")]),t("br"),t("span",{staticClass:"line-number"},[s._v("18")]),t("br")])]),t("h2",{attrs:{id:"模型包描述文件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#模型包描述文件"}},[s._v("#")]),s._v(" 模型包描述文件")]),s._v(" "),t("p",[s._v("文件完整的结构如下,只有标记为“(必须)”的部分才是必须的,你不必填写所有内容。")]),s._v(" "),t("p",[s._v("模型支持带有注释的 JSON 文件,请酌情使用。")]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包包名(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Touhou Project Model Packs"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 作者列表")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"author"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"TartaricAcid"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"SuccinicAcid"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包的描述文本")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"description"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Default Model Packs"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包的版本")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"version"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"1.0.0"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包的制作时间")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"date"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"2019-07-14"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包的图标,缺失此字段,材质包将没有图标")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"icon"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:textures/maid_icon.png"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型列表(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_list"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型 id,不允许重复(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:hakurei_reimu"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型所在的位置,使用完整的资源地址")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型所使用的材质位置,使用完整的资源地址")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"texture"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 渲染成物品形态时的模型大小,默认为 1.0")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"render_item_scale"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.9")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 渲染成实体时的大小,范围为 0.2~2.0,默认为 1.0")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"render_entity_scale"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[s._v("0.75")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型名称")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Reimu Hakurei"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 该模型的描述文本")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"description"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Shrine Maiden of Hakurei"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 动画脚本,如果没有此字段,将会自动调用默认动画")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// tlm-utils 插件会自动依据组名生成对应的动画脚本引用")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"animation"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:animation/maid.default.js"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br"),t("span",{staticClass:"line-number"},[s._v("13")]),t("br"),t("span",{staticClass:"line-number"},[s._v("14")]),t("br"),t("span",{staticClass:"line-number"},[s._v("15")]),t("br"),t("span",{staticClass:"line-number"},[s._v("16")]),t("br"),t("span",{staticClass:"line-number"},[s._v("17")]),t("br"),t("span",{staticClass:"line-number"},[s._v("18")]),t("br"),t("span",{staticClass:"line-number"},[s._v("19")]),t("br"),t("span",{staticClass:"line-number"},[s._v("20")]),t("br"),t("span",{staticClass:"line-number"},[s._v("21")]),t("br"),t("span",{staticClass:"line-number"},[s._v("22")]),t("br"),t("span",{staticClass:"line-number"},[s._v("23")]),t("br"),t("span",{staticClass:"line-number"},[s._v("24")]),t("br"),t("span",{staticClass:"line-number"},[s._v("25")]),t("br"),t("span",{staticClass:"line-number"},[s._v("26")]),t("br"),t("span",{staticClass:"line-number"},[s._v("27")]),t("br"),t("span",{staticClass:"line-number"},[s._v("28")]),t("br"),t("span",{staticClass:"line-number"},[s._v("29")]),t("br"),t("span",{staticClass:"line-number"},[s._v("30")]),t("br"),t("span",{staticClass:"line-number"},[s._v("31")]),t("br"),t("span",{staticClass:"line-number"},[s._v("32")]),t("br"),t("span",{staticClass:"line-number"},[s._v("33")]),t("br"),t("span",{staticClass:"line-number"},[s._v("34")]),t("br"),t("span",{staticClass:"line-number"},[s._v("35")]),t("br"),t("span",{staticClass:"line-number"},[s._v("36")]),t("br"),t("span",{staticClass:"line-number"},[s._v("37")]),t("br"),t("span",{staticClass:"line-number"},[s._v("38")]),t("br"),t("span",{staticClass:"line-number"},[s._v("39")]),t("br"),t("span",{staticClass:"line-number"},[s._v("40")]),t("br"),t("span",{staticClass:"line-number"},[s._v("41")]),t("br"),t("span",{staticClass:"line-number"},[s._v("42")]),t("br"),t("span",{staticClass:"line-number"},[s._v("43")]),t("br"),t("span",{staticClass:"line-number"},[s._v("44")]),t("br"),t("span",{staticClass:"line-number"},[s._v("45")]),t("br")])]),t("p",[s._v("上面的示例列出了所有可用字段,只需要带有“(必须)”的字段,其余部分可以省略。")]),s._v(" "),t("p",[s._v("为了简单起见,你可以写一个像这样的文件:")]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型包包名(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Touhou Project Model Packs"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型列表(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_list"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 模型 id,不允许重复(必须)")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:hakurei_reimu"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br")])]),t("p",[s._v("如果我们不填写 "),t("code",[s._v("model")]),s._v(" 或 "),t("code",[s._v("texture")]),s._v(",它将基于 "),t("code",[s._v("model_id")]),s._v(" 选择默认的模型和材质。")]),s._v(" "),t("p",[s._v("比如上述案例中 "),t("code",[s._v("model_id")]),s._v(" 为 "),t("code",[s._v("touhou_little_maid:hakurei_reimu")]),s._v(",那么此时模型文件就为该资源域下的 "),t("code",[s._v("models/entity")]),s._v(" 文件夹下名为 "),t("code",[s._v("hakurei_reimu.json")]),s._v(" 的文件,材质就为该资源域下的 "),t("code",[s._v("textures/entity")]),s._v(" 文件夹下名为 "),t("code",[s._v("hakurei_reimu.png")]),s._v(" 的文件。")]),s._v(" "),t("p",[s._v("如果我们书写了 "),t("code",[s._v("model")]),s._v(" 或者 "),t("code",[s._v("texture")]),s._v(" 字段,那么其内容并无限制,你甚至可以调用其他模型包中的模型,只需要书写对资源地址即可。")]),s._v(" "),t("h2",{attrs:{id:"动态图标"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#动态图标"}},[s._v("#")]),s._v(" 动态图标")]),s._v(" "),t("p",[s._v("图标没有大小限制,支持静态图标和动态图标。")]),s._v(" "),t("p",[s._v("任意为 1:1 的图标均会被解析为静态图标。 不为 1:1 的长图,会以 0.1 秒的间隔逐次显示,从而形成动态图效果。")]),s._v(" "),t("blockquote",[t("p",[s._v("下图就为模组自带的图标,左侧被解析为静态图标,右侧被解析为动态图标")])]),s._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),s._v(" "),t("h2",{attrs:{id:"模型文件"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#模型文件"}},[s._v("#")]),s._v(" 模型文件")]),s._v(" "),t("ul",[t("li",[s._v("本模组使用基岩版 "),t("code",[s._v("1.10.0")]),s._v(" 或 "),t("code",[s._v("1.12.0")]),s._v(" JSON 文件来进行模型的加载,该文件可以通过建模软件 "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[s._v("Blockbench"),t("OutboundLink")],1),s._v(" 直接导出,不需要对其做任何修改。")]),s._v(" "),t("li",[s._v("我们提供了许多预设动画,你只需要创建一个特殊名称的组,那么插件就会在导出模型是依据组名生成对应的动画脚本引用。 想要了解所有可用动画,请查看 "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[s._v("预设动画")]),s._v(" 篇章。")],1),s._v(" "),t("li",[s._v("模型也支持 JavaScript 自定义动画,你可以在自定义动画章节中找到对应介绍。")])]),s._v(" "),t("h2",{attrs:{id:"国际化"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#国际化"}},[s._v("#")]),s._v(" 国际化")]),s._v(" "),t("p",[s._v("作为一个面向国际化的游戏,模型包的部分内容自然也兼容国际化。")]),s._v(" "),t("ul",[t("li",[s._v("模型包中的 "),t("code",[s._v("pack_name")]),s._v(" 和 "),t("code",[s._v("description")]),s._v(" 字段支持国际化;")]),s._v(" "),t("li",[s._v("模型列表的 "),t("code",[s._v("name")]),s._v(" 和 "),t("code",[s._v("description")]),s._v(" 字段支持国际化。")])]),s._v(" "),t("p",[s._v("国际化的添加方式很简单,只需要书写以 "),t("code",[s._v("{")]),s._v(" 开头,"),t("code",[s._v("}")]),s._v(" 结尾的字符串即可,中间部分为语言文件的 Key,而后书写对应语言文件即可。")]),s._v(" "),t("p",[s._v("比如我们书写了如下的内容(只截取了一小段)")]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"{pack.vanilla_touhou_model.name}"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"description"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"{pack.vanilla_touhou_model.desc}"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br")])]),t("p",[s._v("而后在模型包资源域下的 "),t("code",[s._v("lang")]),s._v(" 文件夹下创建 "),t("code",[s._v("en_us.lang")]),s._v(" 文件,书写如下内容即可:")]),s._v(" "),t("div",{staticClass:"language-properties line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-properties"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[s._v("pack.vanilla_touhou_model.name")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[s._v("Vanilla Touhou Model")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[s._v("pack.vanilla_touhou_model.desc")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[s._v("Default Model Packs")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br")])]),t("p",[s._v("我们只添加了英文文件,如果还想再支持中文,创建 "),t("code",[s._v("zh_cn.lang")]),s._v(" 文件书写如下内容即可:")]),s._v(" "),t("div",{staticClass:"language-properties line-numbers-mode"},[t("pre",{pre:!0,attrs:{class:"language-properties"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[s._v("pack.vanilla_touhou_model.name")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[s._v("原版东方资源包")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[s._v("pack.vanilla_touhou_model.desc")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[s._v("默认的模型包")]),s._v("\n")])]),s._v(" "),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br")])]),t("p",[s._v("在前面的案例中,如果我们没有书写 "),t("code",[s._v("name")]),s._v(" 字段,那么系统会依据 "),t("code",[s._v("model_id")]),s._v(" 自动生成本地化 key,比如 "),t("code",[s._v("model_id")]),s._v(" 为 "),t("code",[s._v("touhou_little_maid:cushion")]),s._v(",那么生成的语言文件 key 为 "),t("code",[s._v("model.touhou_little_maid.cushion.name")]),s._v("。")]),s._v(" "),t("p",[t("code",[s._v("description")]),s._v(" 字段默认不生成,需要自行主动书写。")]),s._v(" "),t("h2",{attrs:{id:"兼容性问题"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#兼容性问题"}},[s._v("#")]),s._v(" 兼容性问题")]),s._v(" "),t("p",[s._v("鉴于部分作者制作的模型比较特殊,与女仆本身拥有多种附加的外形显示不兼容。 此处专门对非标模型提供了适配的做法:")]),s._v(" "),t("table",[t("thead",[t("tr",[t("th",{staticStyle:{"text-align":"center"}},[s._v("问题")]),s._v(" "),t("th",{staticStyle:{"text-align":"center"}},[s._v("解决方法")])])]),s._v(" "),t("tbody",[t("tr",[t("td",{staticStyle:{"text-align":"center"}},[s._v("动画不协调")]),s._v(" "),t("td",{staticStyle:{"text-align":"center"}},[s._v("编写自定义 JavaScript 动画脚本")])]),s._v(" "),t("tr",[t("td",{staticStyle:{"text-align":"center"}},[s._v("手臂持有物品位置不对")]),s._v(" "),t("td",{staticStyle:{"text-align":"center"}},[s._v("使用定位骨骼进行定位")])]),s._v(" "),t("tr",[t("td",{staticStyle:{"text-align":"center"}},[s._v("禁止显示手部物品")]),s._v(" "),t("td",{staticStyle:{"text-align":"center"}},[s._v("只要 "),t("code",[s._v("armLeft")]),s._v(" 或者 "),t("code",[s._v("armRight")]),s._v(" 骨骼不存在,那么对应的手持物品就不会显示")])]),s._v(" "),t("tr",[t("td",{staticStyle:{"text-align":"center"}},[s._v("背包位置不正确")]),s._v(" "),t("td",{staticStyle:{"text-align":"center"}},[s._v("使用定位骨骼进行定位")])]),s._v(" "),t("tr",[t("td",{staticStyle:{"text-align":"center"}},[s._v("背包、拉杆箱、载具、扫帚,自定义头颅等位置兼容不对")]),s._v(" "),t("td",{staticStyle:{"text-align":"center"}},[s._v("采用如下书写关闭这些功能")])])])]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("div",{staticClass:"highlight-lines"},[t("br"),t("br"),t("br"),t("br"),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("br"),t("br"),t("br")]),t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Touhou Project Pack"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_list"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:hakurei_reimu"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"show_backpack"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止背包的显示")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"show_custom_head"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止女仆显示自定义头颅")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"show_hata"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止旗指物的显示,在 1.16 中弃用")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"can_hold_trolley"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止女仆持有拉杆箱,在 1.16 中弃用")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"can_hold_vehicle"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止女仆持有载具,在 1.16 中弃用")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"can_riding_broom"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("false")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// 阻止女仆骑乘扫帚,在 1.16 中弃用")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br"),t("span",{staticClass:"line-number"},[s._v("11")]),t("br"),t("span",{staticClass:"line-number"},[s._v("12")]),t("br")])]),t("h2",{attrs:{id:"女仆彩蛋"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#女仆彩蛋"}},[s._v("#")]),s._v(" 女仆彩蛋")]),s._v(" "),t("p",[s._v("我们添加了女仆命名彩蛋功能,特殊命名的女仆可以直接调用特定模型。")]),s._v(" "),t("p",[s._v("彩蛋的书写方式非常简单,模组会自动识别其为彩蛋模型,也不会出现在皮肤选择界面。")]),s._v(" "),t("h3",{attrs:{id:"普通彩蛋"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#普通彩蛋"}},[s._v("#")]),s._v(" 普通彩蛋")]),s._v(" "),t("p",[s._v("如下为普通命名彩蛋的书写方式。 普通命名彩蛋下,女仆只需要命名为下面 "),t("code",[s._v("tag")]),s._v(" 字段,就会调用该模型。")]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("div",{staticClass:"highlight-lines"},[t("br"),t("br"),t("br"),t("br"),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("br"),t("br"),t("br")]),t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Touhou Project Model Pack"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_list"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:hakurei_reimu"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"easter_egg"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"tag"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"IKUN~"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br")])]),t("h3",{attrs:{id:"加密彩蛋"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#加密彩蛋"}},[s._v("#")]),s._v(" 加密彩蛋")]),s._v(" "),t("p",[s._v("如下为加密彩蛋的书写方式。 加密彩蛋彩蛋下,女仆需要特定命名,该命名的 SHA-1 值为如下的 "),t("code",[s._v("tag")]),s._v(" 字段,才会调用该模型。")]),s._v(" "),t("p",[s._v("如下书写方式,当女仆命名为 "),t("code",[s._v("IKUN~")]),s._v(" 时,因为这个字符的 SHA-1 值为 "),t("code",[s._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),s._v(",符合 "),t("code",[s._v("tag")]),s._v(" 字段,会调用该模型。")]),s._v(" "),t("div",{staticClass:"language-json line-numbers-mode"},[t("div",{staticClass:"highlight-lines"},[t("br"),t("br"),t("br"),t("br"),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("div",{staticClass:"highlighted"},[s._v(" ")]),t("br"),t("br"),t("br")]),t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"pack_name"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"Touhou Project Model Pack"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_list"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("[")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"model_id"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"touhou_little_maid:hakurei_reimu"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"easter_egg"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"encrypt"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token boolean"}},[s._v("true")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[s._v('"tag"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[s._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("]")]),s._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),t("div",{staticClass:"line-numbers-wrapper"},[t("span",{staticClass:"line-number"},[s._v("1")]),t("br"),t("span",{staticClass:"line-number"},[s._v("2")]),t("br"),t("span",{staticClass:"line-number"},[s._v("3")]),t("br"),t("span",{staticClass:"line-number"},[s._v("4")]),t("br"),t("span",{staticClass:"line-number"},[s._v("5")]),t("br"),t("span",{staticClass:"line-number"},[s._v("6")]),t("br"),t("span",{staticClass:"line-number"},[s._v("7")]),t("br"),t("span",{staticClass:"line-number"},[s._v("8")]),t("br"),t("span",{staticClass:"line-number"},[s._v("9")]),t("br"),t("span",{staticClass:"line-number"},[s._v("10")]),t("br")])]),t("h2",{attrs:{id:"其他问题"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#其他问题"}},[s._v("#")]),s._v(" 其他问题")]),s._v(" "),t("h3",{attrs:{id:"贴图闪烁-z-fighting-问题"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#贴图闪烁-z-fighting-问题"}},[s._v("#")]),s._v(" 贴图闪烁(Z-fighting)问题")]),s._v(" "),t("p",[s._v("这是 OpenGL 本身的一个问题,我们在制作模型过程中使用了平面、或者是两个重合的立方体,就会出现此问题。")]),s._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),s._v(" "),t("p",[s._v("对于平面图形导致的问题,只为其中某一面附上材质,另一面留空可以解决此问题;对于两个重合几何体,只需要微移几何体,或者对重合部分的材质进行剔除即可。")]),s._v(" "),t("h3",{attrs:{id:"文件名大小写问题"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#文件名大小写问题"}},[s._v("#")]),s._v(" 文件名大小写问题")]),s._v(" "),t("p",[s._v("在 Minecraft 中,所有文件名都必须是小写。")])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/119.82410d1e.js b/assets/js/119.82410d1e.js new file mode 100644 index 000000000..2c10d9a59 --- /dev/null +++ b/assets/js/119.82410d1e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{398:function(t,i,a){"use strict";a.r(i);var o=a(14),s=Object(o.a)({},(function(){var t=this,i=t._self._c;return i("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[i("h1",{attrs:{id:"预设动画"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#预设动画"}},[t._v("#")]),t._v(" 预设动画")]),t._v(" "),i("p",[t._v("模组内置了许多预设动画,你只需要:")]),t._v(" "),i("ol",[i("li",[t._v("在 Blockbench 中为想要添加动画的组设置正确的组名。")]),t._v(" "),i("li",[t._v("在 "),i("code",[t._v("maid_model.json")]),t._v(" 文件的 "),i("code",[t._v("animation")]),t._v(" 字段中调用正确的动画脚本引用。")])]),t._v(" "),i("blockquote",[i("p",[i("code",[t._v("tlm-utils")]),t._v(" 插件可以自动依据组名调用正确的动画脚本引用,你只需点击 "),i("code",[t._v("分析动画")]),t._v(" 按钮。 "),i("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),i("p",[t._v("Blockbech 插件提供了所有可用的预设动画,你可以右击大纲界面打开预设动画菜单"),i("br"),t._v(" "),i("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),i("h2",{attrs:{id:"定位组"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#定位组"}},[t._v("#")]),t._v(" 定位组")]),t._v(" "),i("p",[t._v("用于渲染定位,基于组的旋转点来的,组内可以为空。")]),t._v(" "),i("h3",{attrs:{id:"armleftpositioningbone"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),i("code",[t._v("armLeftPositioningBone")])]),t._v(" "),i("p",[t._v("左手物品的位置,其父组必须是 "),i("code",[t._v("armLeft")])]),t._v(" "),i("h3",{attrs:{id:"armrightpositioningbone"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),i("code",[t._v("armRightPositioningBone")])]),t._v(" "),i("p",[t._v("右手物品的位置,其父组必须是 "),i("code",[t._v("armRight")])]),t._v(" "),i("h3",{attrs:{id:"backpackpositioningbone"}},[i("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),i("code",[t._v("backpackPositioningBone")])]),t._v(" "),i("p",[t._v("背包肩带位置,它必须位于根目录下")])])}),[],!1,null,null,null);i.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/12.4ef66142.js b/assets/js/12.4ef66142.js new file mode 100644 index 000000000..33b4e7737 --- /dev/null +++ b/assets/js/12.4ef66142.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12,14,19,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return h})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(90);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return s.test(r)?t:r+".html"+n}function h(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),a=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=a.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},247:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var i=n(241),r=n(242),s=n(91),a=n.n(s),o={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>a()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports},257:function(t,e,n){"use strict";n(247)},265:function(t,e,n){"use strict";n.r(e);var i=n(254),r=n(239),s={name:"NavLinks",components:{NavLink:n(241).default,DropdownLink:i.default},computed:{userNav(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav(){const{locales:t}=this.$site;if(t&&Object.keys(t).length>1){const e=this.$page.path,n=this.$router.options.routes,i=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",ariaLabel:this.$themeLocaleConfig.ariaLabel||"Select language",items:Object.keys(t).map(r=>{const s=t[r],a=i[r]&&i[r].label||s.lang;let o;return s.lang===this.$lang?o=e:(o=e.replace(this.$localeConfig.path,r),n.some(t=>t.path===o)||(o=r)),{text:a,link:o}})};return[...this.userNav,r]}return this.userNav},userLinks(){return(this.nav||[]).map(t=>Object.assign(Object(r.j)(t),{items:(t.items||[]).map(r.j)}))},repoLink(){const{repo:t}=this.$site.themeConfig;return t?/^https?:/.test(t)?t:"https://github.com/"+t:null},repoLabel(){if(!this.repoLink)return;if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;const t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"];for(let n=0;n({placeholder:void 0}),watch:{$lang(e){this.update(this.options,e)},options(e){this.update(e,this.$lang)}},mounted(){this.initialize(this.options,this.$lang),this.placeholder=this.$site.themeConfig.searchPlaceholder||""},methods:{initialize(e,t){Promise.all([Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,295,7)),Promise.all([a.e(0),a.e(9)]).then(a.t.bind(null,296,7))]).then(([a])=>{a=a.default;const{algoliaOptions:i={}}=e;a(Object.assign({},e,{inputSelector:"#algolia-search-input",algoliaOptions:{...i,facetFilters:["lang:"+t].concat(i.facetFilters||[])},handleSelected:(e,t,a)=>{const{pathname:i,hash:n}=new URL(a.url),r=i.replace(this.$site.base,"/"),s=decodeURIComponent(n);this.$router.push(`${r}${s}`)}}))})},update(e,t){this.$el.innerHTML='',this.initialize(e,t)}}},n=(a(288),a(14)),r=Object(n.a)(i,(function(){var e=this._self._c;return e("form",{staticClass:"algolia-search-wrapper search-box",attrs:{id:"search-form",role:"search"}},[e("input",{staticClass:"search-query",attrs:{id:"algolia-search-input",placeholder:this.placeholder}})])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/14.3eb9dfa2.js b/assets/js/14.3eb9dfa2.js new file mode 100644 index 000000000..95ae75c9d --- /dev/null +++ b/assets/js/14.3eb9dfa2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14,19,21],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return d})),n.d(e,"c",(function(){return b})),n.d(e,"j",(function(){return g}));n(90);const i=/#.*$/,r=/\.(md|html)$/,s=/\/$/,o=/^[a-z]+:/i;function a(t){return decodeURI(t).replace(i,"").replace(r,"")}function l(t){return o.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(i),n=e?e[0]:"",r=a(t);return s.test(r)?t:r+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return a(t.path)===a(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return h(n,e,i);if(Array.isArray(e))return Object.assign(h(n,e[0],i),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function b(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function g(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=n(14),o=Object(s.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=o.exports},242:function(t,e,n){"use strict";n.r(e);var i={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},r=(n(243),n(14)),s=Object(r.a)(i,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},243:function(t,e,n){"use strict";n(240)},244:function(t,e,n){},251:function(t,e,n){"use strict";n(244)},254:function(t,e,n){"use strict";n.r(e);var i=n(241),r=n(242),s=n(91),o=n.n(s),a={name:"DropdownLink",components:{NavLink:i.default,DropdownTransition:r.default},props:{item:{required:!0}},data:()=>({open:!1}),computed:{dropdownAriaLabel(){return this.item.ariaLabel||this.item.text}},watch:{$route(){this.open=!1}},methods:{setOpen(t){this.open=t},isLastItemOfArray:(t,e)=>o()(e)===t,handleDropdown(){0===event.detail&&this.setOpen(!this.open)}}},l=(n(251),n(14)),u=Object(l.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[e("button",{staticClass:"dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:t.handleDropdown}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow down"})]),t._v(" "),e("button",{staticClass:"mobile-dropdown-title",attrs:{type:"button","aria-label":t.dropdownAriaLabel},on:{click:function(e){return t.setOpen(!t.open)}}},[e("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),e("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),e("DropdownTransition",[e("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(n,i){return e("li",{key:n.link||i,staticClass:"dropdown-item"},["links"===n.type?e("h4",[t._v("\n "+t._s(n.text)+"\n ")]):t._e(),t._v(" "),"links"===n.type?e("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(n.items,(function(i){return e("li",{key:i.link,staticClass:"dropdown-subitem"},[e("NavLink",{attrs:{item:i},on:{focusout:function(e){t.isLastItemOfArray(i,n.items)&&t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0):e("NavLink",{attrs:{item:n},on:{focusout:function(e){t.isLastItemOfArray(n,t.item.items)&&t.setOpen(!1)}}})],1)})),0)])],1)}),[],!1,null,null,null);e.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/15.df39777f.js b/assets/js/15.df39777f.js new file mode 100644 index 000000000..77d5618f2 --- /dev/null +++ b/assets/js/15.df39777f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{239:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return o})),e.d(n,"i",(function(){return a})),e.d(n,"f",(function(){return u})),e.d(n,"g",(function(){return c})),e.d(n,"h",(function(){return p})),e.d(n,"b",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"k",(function(){return h})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return v})),e.d(n,"j",(function(){return b}));e(90);const r=/#.*$/,i=/\.(md|html)$/,o=/\/$/,a=/^[a-z]+:/i;function s(t){return decodeURI(t).replace(r,"").replace(i,"")}function u(t){return a.test(t)}function c(t){return/^mailto:/.test(t)}function p(t){return/^tel:/.test(t)}function l(t){if(u(t))return t;const n=t.match(r),e=n?n[0]:"",i=s(t);return o.test(i)?t:i+".html"+e}function f(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return s(t.path)===s(n)}function h(t,n,e){if(u(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const o=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return h(e,n,r);if(Array.isArray(n))return Object.assign(h(e,n[0],r),{title:n[1]});{const o=n.children||[];return 0===o.length&&n.path?Object.assign(h(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:o.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=v(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function v(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,n){t.exports=function(t){return null==t}},249:function(t,n,e){},260:function(t,n,e){var r=e(11),i=e(4),o=e(10);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},261:function(t,n,e){"use strict";e(249)},268:function(t,n,e){"use strict";e.r(n);e(90);var r=e(239),i=e(260),o=e.n(i),a=e(246),s=e.n(a),u={name:"PageNav",props:["sidebarItems"],computed:{prev(){return p(c.PREV,this)},next(){return p(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,n){return l(t,n,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,n){return l(t,n,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function p(t,{$themeConfig:n,$page:e,$route:i,$site:a,sidebarItems:u}){const{resolveLink:c,getThemeLinkConfig:p,getPageLinkConfig:l}=t,f=p(n),h=l(e),d=s()(h)?f:h;return!1===d?void 0:o()(d)?Object(r.k)(a.pages,d,i.path):c(e,u)}function l(t,n,e){const r=[];!function t(n,e){for(let r=0,i=n.length;rfunction t(e,n,i,r=1){if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function m(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,e,n){"use strict";n.r(e);var i=n(239),r={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(i.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(i.g)(this.link)||Object(i.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(i.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(i.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},a=n(14),s=Object(a.a)(r,(function(){var t=this,e=t._self._c;return t.isInternal?e("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(e){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):e("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?e("OutboundLink"):t._e()],1)}),[],!1,null,null,null);e.default=s.exports},256:function(t,e,n){},269:function(t,e,n){"use strict";n(256)},280:function(t,e,n){"use strict";n.r(e);var i={name:"Home",components:{NavLink:n(241).default},computed:{data(){return this.$page.frontmatter},actionLink(){return{link:this.data.actionLink,text:this.data.actionText}}}},r=(n(269),n(14)),a=Object(r.a)(i,(function(){var t=this,e=t._self._c;return e("main",{staticClass:"home",attrs:{"aria-labelledby":null!==t.data.heroText?"main-title":null}},[e("header",{staticClass:"hero"},[t.data.heroImage?e("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?e("h1",{attrs:{id:"main-title"}},[t._v("\n "+t._s(t.data.heroText||t.$title||"Hello")+"\n ")]):t._e(),t._v(" "),null!==t.data.tagline?e("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]):t._e(),t._v(" "),t.data.actionText&&t.data.actionLink?e("p",{staticClass:"action"},[e("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?e("div",{staticClass:"features"},t._l(t.data.features,(function(n,i){return e("div",{key:i,staticClass:"feature"},[e("h2",[t._v(t._s(n.title))]),t._v(" "),e("p",[t._v(t._s(n.details))])])})),0):t._e(),t._v(" "),e("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?e("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):e("Content",{staticClass:"footer",attrs:{"slot-key":"footer"}})],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/17.13f9f737.js b/assets/js/17.13f9f737.js new file mode 100644 index 000000000..affb29dac --- /dev/null +++ b/assets/js/17.13f9f737.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return m})),n.d(e,"j",(function(){return b}));n(90);const i=/#.*$/,r=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(r,"")}function c(t){return s.test(t)}function u(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function d(t){if(c(t))return t;const e=t.match(i),n=e?e[0]:"",r=o(t);return a.test(r)?t:r+".html"+n}function p(t,e){const n=decodeURIComponent(t.hash),r=function(t){const e=t.match(i);if(e)return e[0]}(e);if(r&&n!==r)return!1;return o(t.path)===o(e)}function f(t,e,n){if(c(e))return{type:"external",path:e};n&&(e=function(t,e,n){const i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;const r=e.split("/");n&&r[r.length-1]||r.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,i,r=1){if("string"==typeof e)return f(n,e,i);if(Array.isArray(e))return Object.assign(f(n,e[0],i),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(f(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,i,r+1)),collapsable:!1!==e.collapsable}}}(t,r,n)):[]}return[]}function g(t){const e=m(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function m(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function b(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,n){},259:function(t,e,n){"use strict";n(248)},267:function(t,e,n){"use strict";n.r(e);var i=n(246),r=n.n(i),a=n(239),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=r()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:i="master",docsRepo:a=e}=this.$site.themeConfig;return t&&a&&this.$page.relativePath?this.createEditLink(e,a,n,i,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,i,r){if(/bitbucket.org/.test(e)){return e.replace(a.a,"")+"/src"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r+`?mode=edit&spa=0&at=${i}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(a.a,"")+"/-/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}return(a.i.test(e)?e:"https://github.com/"+e).replace(a.a,"")+"/edit"+`/${i}/`+(n?n.replace(a.a,"")+"/":"")+r}}},o=(n(259),n(14)),c=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/18.6d3b94c1.js b/assets/js/18.6d3b94c1.js new file mode 100644 index 000000000..07ed4beb8 --- /dev/null +++ b/assets/js/18.6d3b94c1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(90);const r=/#.*$/,i=/\.(md|html)$/,a=/\/$/,s=/^[a-z]+:/i;function u(t){return decodeURI(t).replace(r,"").replace(i,"")}function o(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function l(t){return/^tel:/.test(t)}function p(t){if(o(t))return t;const e=t.match(r),n=e?e[0]:"",i=u(t);return a.test(i)?t:i+".html"+n}function f(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return u(t.path)===u(e)}function d(t,e,n){if(o(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const a=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return d(n,e,r);if(Array.isArray(e))return Object.assign(d(n,e[0],r),{title:e[1]});{const a=e.children||[];return 0===a.length&&e.path?Object.assign(d(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:a.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},245:function(t,e,n){},252:function(t,e,n){"use strict";n(245)},255:function(t,e,n){"use strict";n.r(e);var r=n(239);function i(t,e,n,r,i){const a={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(a.style={"padding-left":i+"rem"}),t("RouterLink",a,n)}function a(t,e,n,s,u,o=1){return!e||o>u?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const c=Object(r.e)(s,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,c,e.level-1),a(t,e.children,n,s,u,o+1)])}))}var s={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:s,$themeConfig:u,$themeLocaleConfig:o},props:{item:c,sidebarDepth:l}}){const p=Object(r.e)(s,c.path),f="auto"===c.type?p||c.children.some(t=>Object(r.e)(s,c.basePath+"#"+t.slug)):p,d="external"===c.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,c.path,c.title||c.path):i(t,c.path,c.title||c.path,f),h=[e.frontmatter.sidebarDepth,l,o.sidebarDepth,u.sidebarDepth,1].find(t=>void 0!==t),b=o.displayAllHeaders||u.displayAllHeaders;if("auto"===c.type)return[d,a(t,c.children,c.basePath,s,h)];if((f||b)&&c.headers&&!r.d.test(c.path)){return[d,a(t,Object(r.c)(c.headers),c.path,s,h)]}return d}},u=(n(252),n(14)),o=Object(u.a)(s,void 0,void 0,!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/19.fd36e329.js b/assets/js/19.fd36e329.js new file mode 100644 index 000000000..ffda4123f --- /dev/null +++ b/assets/js/19.fd36e329.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{240:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var s={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),o=Object(i.a)(s,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=o.exports},243:function(t,e,n){"use strict";n(240)}}]); \ No newline at end of file diff --git a/assets/js/2.6bfae921.js b/assets/js/2.6bfae921.js new file mode 100644 index 000000000..519121cc0 --- /dev/null +++ b/assets/js/2.6bfae921.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{245:function(t,e,a){},246:function(t,e){t.exports=function(t){return null==t}},248:function(t,e,a){},249:function(t,e,a){},250:function(t,e,a){},252:function(t,e,a){"use strict";a(245)},253:function(t,e,a){"use strict";a.r(e);var n=a(266),s=a(255),i=a(239);function r(t,e){if("group"===e.type){const a=e.path&&Object(i.e)(t,e.path),n=e.children.some(e=>"group"===e.type?r(t,e):"page"===e.type&&Object(i.e)(t,e.path));return a||n}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:n.default,SidebarLink:s.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let a=0;a-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(i.e)(this.$route,t.regularPath)}}},l=a(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(a,n){return e("li",{key:n},["group"===a.type?e("SidebarGroup",{attrs:{item:a,open:n===t.openGroupIndex,collapsable:a.collapsable||a.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(n)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:a}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},255:function(t,e,a){"use strict";a.r(e);var n=a(239);function s(t,e,a,n,s){const i={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:n,"sidebar-link":!0}};return s>2&&(i.style={"padding-left":s+"rem"}),t("RouterLink",i,a)}function i(t,e,a,r,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(n.e)(r,a+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[s(t,a+"#"+e.slug,e.title,u,e.level-1),i(t,e.children,a,r,o,l+1)])}))}var r={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:a,$route:r,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(n.e)(r,u.path),d="auto"===u.type?p||u.children.some(t=>Object(n.e)(r,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,a){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[a,t("OutboundLink")])}(t,u.path,u.title||u.path):s(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,i(t,u.children,u.basePath,r,f)];if((d||b)&&u.headers&&!n.d.test(u.path)){return[h,i(t,Object(n.c)(u.headers),u.path,r,f)]}return h}},o=(a(252),a(14)),l=Object(o.a)(r,void 0,void 0,!1,null,null,null);e.default=l.exports},256:function(t,e,a){},259:function(t,e,a){"use strict";a(248)},260:function(t,e,a){var n=a(11),s=a(4),i=a(10);t.exports=function(t){return"string"==typeof t||!s(t)&&i(t)&&"[object String]"==n(t)}},261:function(t,e,a){"use strict";a(249)},262:function(t,e,a){},263:function(t,e,a){"use strict";a(250)},264:function(t,e,a){},266:function(t,e,a){"use strict";a.r(e);var n=a(239),s={name:"SidebarGroup",components:{DropdownTransition:a(242).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=a(253).default},methods:{isActive:n.e}},i=(a(263),a(14)),r=Object(i.a)(s,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=r.exports},267:function(t,e,a){"use strict";a.r(e);var n=a(246),s=a.n(n),i=a(239),r={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=s()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:a="",docsBranch:n="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,a,n,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,a,n,s){if(/bitbucket.org/.test(e)){return e.replace(i.a,"")+"/src"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s+`?mode=edit&spa=0&at=${n}&fileviewer=file-view-default`}if(/gitlab.com/.test(e)){return e.replace(i.a,"")+"/-/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}return(i.i.test(e)?e:"https://github.com/"+e).replace(i.a,"")+"/edit"+`/${n}/`+(a?a.replace(i.a,"")+"/":"")+s}}},o=(a(259),a(14)),l=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=l.exports},268:function(t,e,a){"use strict";a.r(e);a(90);var n=a(239),s=a(260),i=a.n(s),r=a(246),o=a.n(r),l={name:"PageNav",props:["sidebarItems"],computed:{prev(){return c(u.PREV,this)},next(){return c(u.NEXT,this)}}};const u={NEXT:{resolveLink:function(t,e){return p(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return p(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function c(t,{$themeConfig:e,$page:a,$route:s,$site:r,sidebarItems:l}){const{resolveLink:u,getThemeLinkConfig:c,getPageLinkConfig:p}=t,d=c(e),h=p(a),f=o()(h)?d:h;return!1===f?void 0:i()(f)?Object(n.k)(r.pages,f,s.path):u(a,l)}function p(t,e,a){const n=[];!function t(e,a){for(let n=0,s=e.length;n({isSidebarOpen:!1}),computed:{shouldShowNavbar(){const{themeConfig:t}=this.$site,{frontmatter:e}=this.$page;return!1!==e.navbar&&!1!==t.navbar&&(this.$title||t.logo||t.repo||t.nav||this.$themeLocaleConfig.nav)},shouldShowSidebar(){const{frontmatter:t}=this.$page;return!t.home&&!1!==t.sidebar&&this.sidebarItems.length},sidebarItems(){return Object(o.l)(this.$page,this.$page.regularPath,this.$site,this.$localePath)},pageClasses(){const t=this.$page.frontmatter.pageClass;return[{"no-navbar":!this.shouldShowNavbar,"sidebar-open":this.isSidebarOpen,"no-sidebar":!this.shouldShowSidebar},t]}},mounted(){this.$router.afterEach(()=>{this.isSidebarOpen=!1})},methods:{toggleSidebar(t){this.isSidebarOpen="boolean"==typeof t?t:!this.isSidebarOpen,this.$emit("toggle-sidebar",this.isSidebarOpen)},onTouchStart(t){this.touchStart={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}},onTouchEnd(t){const e=t.changedTouches[0].clientX-this.touchStart.x,a=t.changedTouches[0].clientY-this.touchStart.y;Math.abs(e)>Math.abs(a)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}},u=a(14),c=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[t.shouldShowNavbar?e("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),e("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),e("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("sidebar-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("sidebar-bottom")]},proxy:!0}],null,!0)}),t._v(" "),t.$page.frontmatter.home?e("Home"):e("Page",{attrs:{"sidebar-items":t.sidebarItems},scopedSlots:t._u([{key:"top",fn:function(){return[t._t("page-top")]},proxy:!0},{key:"bottom",fn:function(){return[t._t("page-bottom")]},proxy:!0}],null,!0)})],1)}),[],!1,null,null,null);e.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/20.dadc13e1.js b/assets/js/20.dadc13e1.js new file mode 100644 index 000000000..6a6eeea4e --- /dev/null +++ b/assets/js/20.dadc13e1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{258:function(t,c,n){},270:function(t,c,n){"use strict";n(258)},283:function(t,c,n){"use strict";n.r(c);n(270);var i=n(14),s=Object(i.a)({},(function(){var t=this,c=t._self._c;return c("div",{staticClass:"sidebar-button",on:{click:function(c){return t.$emit("toggle-sidebar")}}},[c("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[c("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null);c.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/21.e6ea6789.js b/assets/js/21.e6ea6789.js new file mode 100644 index 000000000..3e9fcf537 --- /dev/null +++ b/assets/js/21.e6ea6789.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{239:function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"a",(function(){return s})),e.d(n,"i",(function(){return u})),e.d(n,"f",(function(){return a})),e.d(n,"g",(function(){return l})),e.d(n,"h",(function(){return c})),e.d(n,"b",(function(){return f})),e.d(n,"e",(function(){return h})),e.d(n,"k",(function(){return p})),e.d(n,"l",(function(){return d})),e.d(n,"c",(function(){return b})),e.d(n,"j",(function(){return m}));e(90);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,u=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function a(t){return u.test(t)}function l(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function f(t){if(a(t))return t;const n=t.match(r),e=n?n[0]:"",i=o(t);return s.test(i)?t:i+".html"+e}function h(t,n){const e=decodeURIComponent(t.hash),i=function(t){const n=t.match(r);if(n)return n[0]}(n);if(i&&e!==i)return!1;return o(t.path)===o(n)}function p(t,n,e){if(a(n))return{type:"external",path:n};e&&(n=function(t,n,e){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return n+t;const i=n.split("/");e&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(n,e,r,i=1){if("string"==typeof n)return p(e,n,r);if(Array.isArray(n))return Object.assign(p(e,n[0],r),{title:n[1]});{const s=n.children||[];return 0===s.length&&n.path?Object.assign(p(e,n.path,r),{title:n.title}):{type:"group",path:n.path,title:n.title,sidebarDepth:n.sidebarDepth,initialOpenGroupIndex:n.initialOpenGroupIndex,children:s.map(n=>t(n,e,r,i+1)),collapsable:!1!==n.collapsable}}}(t,i,e)):[]}return[]}function g(t){const n=b(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:n.map(n=>({type:"auto",title:n.title,basePath:t.path,path:t.path+"#"+n.slug,children:n.children||[]}))}]}function b(t){let n;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?n=t:n&&(n.children||(n.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},241:function(t,n,e){"use strict";e.r(n);var r=e(239),i={name:"NavLink",props:{item:{required:!0}},computed:{link(){return Object(r.b)(this.item.link)},exact(){return this.$site.locales?Object.keys(this.$site.locales).some(t=>t===this.link):"/"===this.link},isNonHttpURI(){return Object(r.g)(this.link)||Object(r.h)(this.link)},isBlankTarget(){return"_blank"===this.target},isInternal(){return!Object(r.f)(this.link)&&!this.isBlankTarget},target(){return this.isNonHttpURI?null:this.item.target?this.item.target:Object(r.f)(this.link)?"_blank":""},rel(){return this.isNonHttpURI||!1===this.item.rel?null:this.item.rel?this.item.rel:this.isBlankTarget?"noopener noreferrer":null}},methods:{focusoutAction(){this.$emit("focusout")}}},s=e(14),u=Object(s.a)(i,(function(){var t=this,n=t._self._c;return t.isInternal?n("RouterLink",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact},nativeOn:{focusout:function(n){return t.focusoutAction.apply(null,arguments)}}},[t._v("\n "+t._s(t.item.text)+"\n")]):n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.target,rel:t.rel},on:{focusout:t.focusoutAction}},[t._v("\n "+t._s(t.item.text)+"\n "),t.isBlankTarget?n("OutboundLink"):t._e()],1)}),[],!1,null,null,null);n.default=u.exports}}]); \ No newline at end of file diff --git a/assets/js/22.d6dd6838.js b/assets/js/22.d6dd6838.js new file mode 100644 index 000000000..f7a75f0ae --- /dev/null +++ b/assets/js/22.d6dd6838.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{304:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/23.7644efef.js b/assets/js/23.7644efef.js new file mode 100644 index 000000000..60b300d29 --- /dev/null +++ b/assets/js/23.7644efef.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{303:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/24.49d67207.js b/assets/js/24.49d67207.js new file mode 100644 index 000000000..10e369401 --- /dev/null +++ b/assets/js/24.49d67207.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{305:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/25.50f2775a.js b/assets/js/25.50f2775a.js new file mode 100644 index 000000000..97caaafbe --- /dev/null +++ b/assets/js/25.50f2775a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{307:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/26.499b887e.js b/assets/js/26.499b887e.js new file mode 100644 index 000000000..7252b243b --- /dev/null +++ b/assets/js/26.499b887e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{306:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench.\nThe game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/27.da876177.js b/assets/js/27.da876177.js new file mode 100644 index 000000000..e67210279 --- /dev/null +++ b/assets/js/27.da876177.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{308:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/28.8c9cd3e7.js b/assets/js/28.8c9cd3e7.js new file mode 100644 index 000000000..8d7005688 --- /dev/null +++ b/assets/js/28.8c9cd3e7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{309:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/29.cc520228.js b/assets/js/29.cc520228.js new file mode 100644 index 000000000..868f8ae68 --- /dev/null +++ b/assets/js/29.cc520228.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{310:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/3.fb24add6.js b/assets/js/3.fb24add6.js new file mode 100644 index 000000000..fa29bc748 --- /dev/null +++ b/assets/js/3.fb24add6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3,18,19],{239:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return s})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return c})),n.d(e,"b",(function(){return p})),n.d(e,"e",(function(){return d})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return g})),n.d(e,"j",(function(){return m}));n(90);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(i,"")}function l(t){return a.test(t)}function u(t){return/^mailto:/.test(t)}function c(t){return/^tel:/.test(t)}function p(t){if(l(t))return t;const e=t.match(r),n=e?e[0]:"",i=o(t);return s.test(i)?t:i+".html"+n}function d(t,e){const n=decodeURIComponent(t.hash),i=function(t){const e=t.match(r);if(e)return e[0]}(e);if(i&&n!==i)return!1;return o(t.path)===o(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const i=e.split("/");n&&i[i.length-1]||i.pop();const s=t.replace(/^\//,"").split("/");for(let t=0;tfunction t(e,n,r,i=1){if("string"==typeof e)return h(n,e,r);if(Array.isArray(e))return Object.assign(h(n,e[0],r),{title:e[1]});{const s=e.children||[];return 0===s.length&&e.path?Object.assign(h(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,initialOpenGroupIndex:e.initialOpenGroupIndex,children:s.map(e=>t(e,n,r,i+1)),collapsable:!1!==e.collapsable}}}(t,i,n)):[]}return[]}function b(t){const e=g(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}function g(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},240:function(t,e,n){},242:function(t,e,n){"use strict";n.r(e);var r={name:"DropdownTransition",methods:{setHeight(t){t.style.height=t.scrollHeight+"px"},unsetHeight(t){t.style.height=""}}},i=(n(243),n(14)),s=Object(i.a)(r,(function(){return(0,this._self._c)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.default=s.exports},243:function(t,e,n){"use strict";n(240)},245:function(t,e,n){},250:function(t,e,n){},252:function(t,e,n){"use strict";n(245)},253:function(t,e,n){"use strict";n.r(e);var r=n(266),i=n(255),s=n(239);function a(t,e){if("group"===e.type){const n=e.path&&Object(s.e)(t,e.path),r=e.children.some(e=>"group"===e.type?a(t,e):"page"===e.type&&Object(s.e)(t,e.path));return n||r}return!1}var o={name:"SidebarLinks",components:{SidebarGroup:r.default,SidebarLink:i.default},props:["items","depth","sidebarDepth","initialOpenGroupIndex"],data(){return{openGroupIndex:this.initialOpenGroupIndex||0}},watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const t=function(t,e){for(let n=0;n-1&&(this.openGroupIndex=t)},toggleGroup(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive(t){return Object(s.e)(this.$route,t.regularPath)}}},l=n(14),u=Object(l.a)(o,(function(){var t=this,e=t._self._c;return t.items.length?e("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(n,r){return e("li",{key:r},["group"===n.type?e("SidebarGroup",{attrs:{item:n,open:r===t.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(r)}}}):e("SidebarLink",{attrs:{"sidebar-depth":t.sidebarDepth,item:n}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=u.exports},255:function(t,e,n){"use strict";n.r(e);var r=n(239);function i(t,e,n,r,i){const s={props:{to:e,activeClass:"",exactActiveClass:""},class:{active:r,"sidebar-link":!0}};return i>2&&(s.style={"padding-left":i+"rem"}),t("RouterLink",s,n)}function s(t,e,n,a,o,l=1){return!e||l>o?null:t("ul",{class:"sidebar-sub-headers"},e.map(e=>{const u=Object(r.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[i(t,n+"#"+e.slug,e.title,u,e.level-1),s(t,e.children,n,a,o,l+1)])}))}var a={functional:!0,props:["item","sidebarDepth"],render(t,{parent:{$page:e,$site:n,$route:a,$themeConfig:o,$themeLocaleConfig:l},props:{item:u,sidebarDepth:c}}){const p=Object(r.e)(a,u.path),d="auto"===u.type?p||u.children.some(t=>Object(r.e)(a,u.basePath+"#"+t.slug)):p,h="external"===u.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,u.path,u.title||u.path):i(t,u.path,u.title||u.path,d),f=[e.frontmatter.sidebarDepth,c,l.sidebarDepth,o.sidebarDepth,1].find(t=>void 0!==t),b=l.displayAllHeaders||o.displayAllHeaders;if("auto"===u.type)return[h,s(t,u.children,u.basePath,a,f)];if((d||b)&&u.headers&&!r.d.test(u.path)){return[h,s(t,Object(r.c)(u.headers),u.path,a,f)]}return h}},o=(n(252),n(14)),l=Object(o.a)(a,void 0,void 0,!1,null,null,null);e.default=l.exports},263:function(t,e,n){"use strict";n(250)},266:function(t,e,n){"use strict";n.r(e);var r=n(239),i={name:"SidebarGroup",components:{DropdownTransition:n(242).default},props:["item","open","collapsable","depth"],beforeCreate(){this.$options.components.SidebarLinks=n(253).default},methods:{isActive:r.e}},s=(n(263),n(14)),a=Object(s.a)(i,(function(){var t=this,e=t._self._c;return e("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?e("RouterLink",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):e("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[e("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?e("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),e("DropdownTransition",[t.open||!t.collapsable?e("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,"sidebar-depth":t.item.sidebarDepth,"initial-open-group-index":t.item.initialOpenGroupIndex,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/30.17a0565d.js b/assets/js/30.17a0565d.js new file mode 100644 index 000000000..0251461f5 --- /dev/null +++ b/assets/js/30.17a0565d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{311:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/31.e94ebe66.js b/assets/js/31.e94ebe66.js new file mode 100644 index 000000000..b3d57db39 --- /dev/null +++ b/assets/js/31.e94ebe66.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{312:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/32.88b02eea.js b/assets/js/32.88b02eea.js new file mode 100644 index 000000000..9b85c2cf7 --- /dev/null +++ b/assets/js/32.88b02eea.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{313:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/33.11481b20.js b/assets/js/33.11481b20.js new file mode 100644 index 000000000..a7c533997 --- /dev/null +++ b/assets/js/33.11481b20.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{314:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/34.1eda958d.js b/assets/js/34.1eda958d.js new file mode 100644 index 000000000..ecf7c70c7 --- /dev/null +++ b/assets/js/34.1eda958d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{315:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/35.7cb197fa.js b/assets/js/35.7cb197fa.js new file mode 100644 index 000000000..02930ff25 --- /dev/null +++ b/assets/js/35.7cb197fa.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{316:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/36.25bab098.js b/assets/js/36.25bab098.js new file mode 100644 index 000000000..818c7194a --- /dev/null +++ b/assets/js/36.25bab098.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{317:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/37.730755ce.js b/assets/js/37.730755ce.js new file mode 100644 index 000000000..7d3063e40 --- /dev/null +++ b/assets/js/37.730755ce.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{318:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/38.0fa16594.js b/assets/js/38.0fa16594.js new file mode 100644 index 000000000..28dbe59b1 --- /dev/null +++ b/assets/js/38.0fa16594.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{319:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/39.8b7cd42f.js b/assets/js/39.8b7cd42f.js new file mode 100644 index 000000000..0479feefc --- /dev/null +++ b/assets/js/39.8b7cd42f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{320:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/4.84e1e480.js b/assets/js/4.84e1e480.js new file mode 100644 index 000000000..0586a1790 --- /dev/null +++ b/assets/js/4.84e1e480.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{277:function(t,e,n){},291:function(t,e,n){"use strict";n(277)},302:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:(t,{props:e,slots:n})=>t("span",{class:["badge",e.type],style:{verticalAlign:e.vertical}},e.text||n().default)},p=(n(291),n(14)),l=Object(p.a)(i,void 0,void 0,!1,null,"15b7b770",null);e.default=l.exports}}]); \ No newline at end of file diff --git a/assets/js/40.275ac68b.js b/assets/js/40.275ac68b.js new file mode 100644 index 000000000..2d3d0e937 --- /dev/null +++ b/assets/js/40.275ac68b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{321:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/41.e3d6e8a1.js b/assets/js/41.e3d6e8a1.js new file mode 100644 index 000000000..fbe629647 --- /dev/null +++ b/assets/js/41.e3d6e8a1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{322:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/42.d05e0adc.js b/assets/js/42.d05e0adc.js new file mode 100644 index 000000000..95e7ae8f5 --- /dev/null +++ b/assets/js/42.d05e0adc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],{323:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/43.d762e602.js b/assets/js/43.d762e602.js new file mode 100644 index 000000000..b67f8ddff --- /dev/null +++ b/assets/js/43.d762e602.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{324:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/44.2616b1bb.js b/assets/js/44.2616b1bb.js new file mode 100644 index 000000000..4acd7287b --- /dev/null +++ b/assets/js/44.2616b1bb.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{325:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/45.3531f370.js b/assets/js/45.3531f370.js new file mode 100644 index 000000000..23344c5d8 --- /dev/null +++ b/assets/js/45.3531f370.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{326:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/46.f0a7df49.js b/assets/js/46.f0a7df49.js new file mode 100644 index 000000000..2b249e92b --- /dev/null +++ b/assets/js/46.f0a7df49.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{327:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/47.91fbf833.js b/assets/js/47.91fbf833.js new file mode 100644 index 000000000..c39dcebe3 --- /dev/null +++ b/assets/js/47.91fbf833.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{328:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/48.180c583a.js b/assets/js/48.180c583a.js new file mode 100644 index 000000000..4b4961bed --- /dev/null +++ b/assets/js/48.180c583a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{329:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/49.a14742c2.js b/assets/js/49.a14742c2.js new file mode 100644 index 000000000..74db01e42 --- /dev/null +++ b/assets/js/49.a14742c2.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{330:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/5.d1364975.js b/assets/js/5.d1364975.js new file mode 100644 index 000000000..6a24baee1 --- /dev/null +++ b/assets/js/5.d1364975.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{278:function(t,e,a){},292:function(t,e,a){"use strict";a(278)},298:function(t,e,a){"use strict";a.r(e);var s={name:"CodeBlock",props:{title:{type:String,required:!0},active:{type:Boolean,default:!1}},mounted(){this.$parent&&this.$parent.loadTabs&&this.$parent.loadTabs()}},i=(a(292),a(14)),n=Object(i.a)(s,(function(){return(0,this._self._c)("div",{staticClass:"theme-code-block",class:{"theme-code-block__active":this.active}},[this._t("default")],2)}),[],!1,null,"759a7d02",null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/50.7daff065.js b/assets/js/50.7daff065.js new file mode 100644 index 000000000..a3460df19 --- /dev/null +++ b/assets/js/50.7daff065.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[50],{331:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/51.6065ffcc.js b/assets/js/51.6065ffcc.js new file mode 100644 index 000000000..93b013838 --- /dev/null +++ b/assets/js/51.6065ffcc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{332:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/52.b222be95.js b/assets/js/52.b222be95.js new file mode 100644 index 000000000..739c209f6 --- /dev/null +++ b/assets/js/52.b222be95.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{333:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/53.293f9b07.js b/assets/js/53.293f9b07.js new file mode 100644 index 000000000..6a1088153 --- /dev/null +++ b/assets/js/53.293f9b07.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{334:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/54.b0e13135.js b/assets/js/54.b0e13135.js new file mode 100644 index 000000000..c8da6e10c --- /dev/null +++ b/assets/js/54.b0e13135.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{335:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/55.31cc900a.js b/assets/js/55.31cc900a.js new file mode 100644 index 000000000..f82db599a --- /dev/null +++ b/assets/js/55.31cc900a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{336:function(t,n,o){"use strict";o.r(n);var s=o(14),e=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("使用している東方リトルメイドmodのバージョンが最新であることを確認してください。")])])])}),[],!1,null,null,null);n.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/56.5e3d6279.js b/assets/js/56.5e3d6279.js new file mode 100644 index 000000000..41b1d8f34 --- /dev/null +++ b/assets/js/56.5e3d6279.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{337:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"椅子モデルパックの詳細"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#椅子モデルパックの詳細"}},[t._v("#")]),t._v(" 椅子モデルパックの詳細")]),t._v(" "),s("ul",[s("li",[t._v("このwikiは "),s("code",[t._v("1.12.2")]),t._v(" または "),s("code",[t._v("1.16.5")]),t._v(" の最新バージョンのTouhou Little Maid modに適用されます。")]),t._v(" "),s("li",[t._v("バニラの Minecraft リソースパックの構造を理解する必要があります。")]),t._v(" "),s("li",[t._v("JSON 形式の理解が必要です。")]),t._v(" "),s("li",[t._v("現在、 "),s("strong",[t._v("1.10.0 または 1.12.0 Bedrock Edition Model")]),t._v(" のみをサポートしています。")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/57.7321eb56.js b/assets/js/57.7321eb56.js new file mode 100644 index 000000000..2cf193485 --- /dev/null +++ b/assets/js/57.7321eb56.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{338:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"祭壇レシピのカスタマイズ"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#祭壇レシピのカスタマイズ"}},[t._v("#")]),t._v(" 祭壇レシピのカスタマイズ")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("1.16.5では、祭壇のレシピを追加するためにデータパックを使用します")]),t._v(" "),s("p",[s("strong",[t._v("データパックの使用方法を理解している必要があります")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("この機能を使用する前に、 "),s("code",[t._v("CraftTweaker")]),t._v(" の基本的なスクリプト記述方法を理解していることを確認してください。")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/58.9e0f41e5.js b/assets/js/58.9e0f41e5.js new file mode 100644 index 000000000..2ec6abc30 --- /dev/null +++ b/assets/js/58.9e0f41e5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],{339:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"javascriptアニメーションのカスタマイズ"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#javascriptアニメーションのカスタマイズ"}},[t._v("#")]),t._v(" JavaScriptアニメーションのカスタマイズ")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/59.966afbae.js b/assets/js/59.966afbae.js new file mode 100644 index 000000000..746d2bb60 --- /dev/null +++ b/assets/js/59.966afbae.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{340:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"モデルパックのカスタマイズ"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#モデルパックのカスタマイズ"}},[e._v("#")]),e._v(" モデルパックのカスタマイズ")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/6.95c348a6.js b/assets/js/6.95c348a6.js new file mode 100644 index 000000000..9d63aa1f4 --- /dev/null +++ b/assets/js/6.95c348a6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{279:function(e,t,a){},293:function(e,t,a){"use strict";a(279)},299:function(e,t,a){"use strict";a.r(t);var o={name:"CodeGroup",data:()=>({codeTabs:[],activeCodeTabIndex:-1}),watch:{activeCodeTabIndex(e){this.activateCodeTab(e)}},mounted(){this.loadTabs()},methods:{changeCodeTab(e){this.activeCodeTabIndex=e},loadTabs(){this.codeTabs=(this.$slots.default||[]).filter(e=>Boolean(e.componentOptions)).map((e,t)=>(""===e.componentOptions.propsData.active&&(this.activeCodeTabIndex=t),{title:e.componentOptions.propsData.title,elm:e.elm})),-1===this.activeCodeTabIndex&&this.codeTabs.length>0&&(this.activeCodeTabIndex=0),this.activateCodeTab(0)},activateCodeTab(e){this.codeTabs.forEach(e=>{e.elm&&e.elm.classList.remove("theme-code-block__active")}),this.codeTabs[e].elm&&this.codeTabs[e].elm.classList.add("theme-code-block__active")}}},s=(a(293),a(14)),c=Object(s.a)(o,(function(){var e=this,t=e._self._c;return t("ClientOnly",[t("div",{staticClass:"theme-code-group"},[t("div",{staticClass:"theme-code-group__nav"},[t("ul",{staticClass:"theme-code-group__ul"},e._l(e.codeTabs,(function(a,o){return t("li",{key:a.title,staticClass:"theme-code-group__li"},[t("button",{staticClass:"theme-code-group__nav-tab",class:{"theme-code-group__nav-tab-active":o===e.activeCodeTabIndex},on:{click:function(t){return e.changeCodeTab(o)}}},[e._v("\n "+e._s(a.title)+"\n ")])])})),0)]),e._v(" "),e._t("default"),e._v(" "),e.codeTabs.length<1?t("pre",{staticClass:"pre-blank"},[e._v("// Make sure to add code blocks to your code group")]):e._e()],2)])}),[],!1,null,"deefee04",null);t.default=c.exports}}]); \ No newline at end of file diff --git a/assets/js/60.5709f945.js b/assets/js/60.5709f945.js new file mode 100644 index 000000000..5f1e3ad61 --- /dev/null +++ b/assets/js/60.5709f945.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[60],{341:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"メイドモデルパックの詳細"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#メイドモデルパックの詳細"}},[t._v("#")]),t._v(" メイドモデルパックの詳細")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/61.b18d2b9d.js b/assets/js/61.b18d2b9d.js new file mode 100644 index 000000000..0397c0468 --- /dev/null +++ b/assets/js/61.b18d2b9d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{342:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"プリセット-アニメーション"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#プリセット-アニメーション"}},[t._v("#")]),t._v(" プリセット アニメーション")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/62.7fd8a141.js b/assets/js/62.7fd8a141.js new file mode 100644 index 000000000..dbe489e43 --- /dev/null +++ b/assets/js/62.7fd8a141.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{361:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/63.1e44899f.js b/assets/js/63.1e44899f.js new file mode 100644 index 000000000..5e29feb88 --- /dev/null +++ b/assets/js/63.1e44899f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{343:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/64.1c6ed2aa.js b/assets/js/64.1c6ed2aa.js new file mode 100644 index 000000000..e405c00e5 --- /dev/null +++ b/assets/js/64.1c6ed2aa.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],{344:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/65.62babaf7.js b/assets/js/65.62babaf7.js new file mode 100644 index 000000000..103dbf2cd --- /dev/null +++ b/assets/js/65.62babaf7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{345:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/66.5c90a2cd.js b/assets/js/66.5c90a2cd.js new file mode 100644 index 000000000..448488a94 --- /dev/null +++ b/assets/js/66.5c90a2cd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{346:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/67.42819055.js b/assets/js/67.42819055.js new file mode 100644 index 000000000..bbe3d461e --- /dev/null +++ b/assets/js/67.42819055.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{347:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/68.3e78b586.js b/assets/js/68.3e78b586.js new file mode 100644 index 000000000..672709e82 --- /dev/null +++ b/assets/js/68.3e78b586.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[68],{348:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/69.5350aa84.js b/assets/js/69.5350aa84.js new file mode 100644 index 000000000..537d433e0 --- /dev/null +++ b/assets/js/69.5350aa84.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{399:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/7.c5b5bad4.js b/assets/js/7.c5b5bad4.js new file mode 100644 index 000000000..fad0db45e --- /dev/null +++ b/assets/js/7.c5b5bad4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{300:function(t,e,s){"use strict";s.r(e);const o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."];var n={methods:{getMsg:()=>o[Math.floor(Math.random()*o.length)]}},h=s(14),i=Object(h.a)(n,(function(){var t=this._self._c;return t("div",{staticClass:"theme-container"},[t("div",{staticClass:"theme-default-content"},[t("h1",[this._v("404")]),this._v(" "),t("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),t("RouterLink",{attrs:{to:"/"}},[this._v("\n Take me home.\n ")])],1)])}),[],!1,null,null,null);e.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/70.9db89af0.js b/assets/js/70.9db89af0.js new file mode 100644 index 000000000..fbb61c971 --- /dev/null +++ b/assets/js/70.9db89af0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{400:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/71.7e9bbfc1.js b/assets/js/71.7e9bbfc1.js new file mode 100644 index 000000000..487129679 --- /dev/null +++ b/assets/js/71.7e9bbfc1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{349:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/72.4e39d762.js b/assets/js/72.4e39d762.js new file mode 100644 index 000000000..9b3366b8c --- /dev/null +++ b/assets/js/72.4e39d762.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{350:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/73.71dad78a.js b/assets/js/73.71dad78a.js new file mode 100644 index 000000000..60da6274c --- /dev/null +++ b/assets/js/73.71dad78a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{352:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/74.ec14dd66.js b/assets/js/74.ec14dd66.js new file mode 100644 index 000000000..94cc86fd9 --- /dev/null +++ b/assets/js/74.ec14dd66.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{351:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/75.078cb3ea.js b/assets/js/75.078cb3ea.js new file mode 100644 index 000000000..ba4c00f58 --- /dev/null +++ b/assets/js/75.078cb3ea.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[75],{353:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/76.38455b18.js b/assets/js/76.38455b18.js new file mode 100644 index 000000000..c7de23cb9 --- /dev/null +++ b/assets/js/76.38455b18.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{354:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/77.7893c904.js b/assets/js/77.7893c904.js new file mode 100644 index 000000000..cfc007a5f --- /dev/null +++ b/assets/js/77.7893c904.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{355:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button.\n"),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/78.069bbc60.js b/assets/js/78.069bbc60.js new file mode 100644 index 000000000..8af558f1d --- /dev/null +++ b/assets/js/78.069bbc60.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{356:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Certifique-se de que a versão do mod Touhou Little Maid que você está usando é a mais recente.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/79.2611cbe5.js b/assets/js/79.2611cbe5.js new file mode 100644 index 000000000..3dab8ccfe --- /dev/null +++ b/assets/js/79.2611cbe5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{357:function(t,e,s){"use strict";s.r(e);var a=s(14),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"chair-model-pack-detalhas"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-detalhas"}},[t._v("#")]),t._v(" Chair Model Pack Detalhas")]),t._v(" "),e("ul",[e("li",[t._v("Esta wiki se aplica ao mod Touhou Little Maid na versão mais recente "),e("code",[t._v("1.12.2")]),t._v(" ou "),e("code",[t._v("1.16.5")]),t._v(";")]),t._v(" "),e("li",[t._v("Requer compreensão da estrutura do pacote de recursos do Minecraft;")]),t._v(" "),e("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),e("li",[t._v("Currently only supports models for "),e("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),e("li",[t._v("For file editing software, we recommend "),e("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),e("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),e("h2",{attrs:{id:"model-packs-structure"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),e("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br")])]),e("h2",{attrs:{id:"model-packs-description-files"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),e("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),e("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),e("div",{staticClass:"language-json line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br"),e("span",{staticClass:"line-number"},[t._v("22")]),e("br"),e("span",{staticClass:"line-number"},[t._v("23")]),e("br"),e("span",{staticClass:"line-number"},[t._v("24")]),e("br"),e("span",{staticClass:"line-number"},[t._v("25")]),e("br"),e("span",{staticClass:"line-number"},[t._v("26")]),e("br"),e("span",{staticClass:"line-number"},[t._v("27")]),e("br"),e("span",{staticClass:"line-number"},[t._v("28")]),e("br"),e("span",{staticClass:"line-number"},[t._v("29")]),e("br"),e("span",{staticClass:"line-number"},[t._v("30")]),e("br"),e("span",{staticClass:"line-number"},[t._v("31")]),e("br"),e("span",{staticClass:"line-number"},[t._v("32")]),e("br"),e("span",{staticClass:"line-number"},[t._v("33")]),e("br"),e("span",{staticClass:"line-number"},[t._v("34")]),e("br"),e("span",{staticClass:"line-number"},[t._v("35")]),e("br"),e("span",{staticClass:"line-number"},[t._v("36")]),e("br"),e("span",{staticClass:"line-number"},[t._v("37")]),e("br"),e("span",{staticClass:"line-number"},[t._v("38")]),e("br"),e("span",{staticClass:"line-number"},[t._v("39")]),e("br"),e("span",{staticClass:"line-number"},[t._v("40")]),e("br"),e("span",{staticClass:"line-number"},[t._v("41")]),e("br"),e("span",{staticClass:"line-number"},[t._v("42")]),e("br"),e("span",{staticClass:"line-number"},[t._v("43")]),e("br"),e("span",{staticClass:"line-number"},[t._v("44")]),e("br"),e("span",{staticClass:"line-number"},[t._v("45")]),e("br"),e("span",{staticClass:"line-number"},[t._v("46")]),e("br"),e("span",{staticClass:"line-number"},[t._v("47")]),e("br"),e("span",{staticClass:"line-number"},[t._v("48")]),e("br"),e("span",{staticClass:"line-number"},[t._v("49")]),e("br"),e("span",{staticClass:"line-number"},[t._v("50")]),e("br"),e("span",{staticClass:"line-number"},[t._v("51")]),e("br")])]),e("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),e("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),e("div",{staticClass:"language-json line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br")])]),e("p",[t._v("If we do not fill the field for "),e("code",[t._v("model")]),t._v(" or "),e("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),e("code",[t._v("model_id")]),t._v(".")]),t._v(" "),e("p",[t._v("For the example above, "),e("code",[t._v("model_id")]),t._v(" is "),e("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),e("code",[t._v("cushion.json")]),t._v(" under "),e("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),e("code",[t._v("cushion.png")]),t._v(" under "),e("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("If we filled the field for "),e("code",[t._v("model")]),t._v(" or "),e("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),e("p",[e("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("X")]),t._v(" and "),e("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),e("code",[t._v("X")]),t._v(" and "),e("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),e("h2",{attrs:{id:"animated-icon"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),e("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),e("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),e("blockquote",[e("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),e("p",[e("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),e("h2",{attrs:{id:"model-files"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),e("ul",[e("li",[t._v("This mod is using JSON files in Bedrock "),e("code",[t._v("1.10.0")]),t._v(" or "),e("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),e("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),e("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),e("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),e("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),e("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),e("h2",{attrs:{id:"internationlization"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),e("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),e("ul",[e("li",[e("code",[t._v("pack_name")]),t._v(" and "),e("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),e("li",[e("code",[t._v("name")]),t._v(" and "),e("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),e("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),e("code",[t._v("{")]),t._v(" and end it using "),e("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),e("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),e("div",{staticClass:"language-json line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-json"}},[e("code",[e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("p",[t._v("and then under model pack namespace, in the "),e("code",[t._v("lang")]),t._v(" folder we create "),e("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),e("div",{staticClass:"language-properties line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-properties"}},[e("code",[e("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),e("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),e("div",{staticClass:"language-properties line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-properties"}},[e("code",[e("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("p",[t._v("For the first example, if we did not fill the "),e("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),e("code",[t._v("model_id")]),t._v(", for example "),e("code",[t._v("model_id")]),t._v(" is "),e("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),e("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),e("p",[e("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/80.14d918d0.js b/assets/js/80.14d918d0.js new file mode 100644 index 000000000..adebb47e2 --- /dev/null +++ b/assets/js/80.14d918d0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[80],{358:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/81.47c3e1dd.js b/assets/js/81.47c3e1dd.js new file mode 100644 index 000000000..85af335c6 --- /dev/null +++ b/assets/js/81.47c3e1dd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{359:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/82.3af3eebd.js b/assets/js/82.3af3eebd.js new file mode 100644 index 000000000..4182d4c8c --- /dev/null +++ b/assets/js/82.3af3eebd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[82],{360:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/83.4d63937f.js b/assets/js/83.4d63937f.js new file mode 100644 index 000000000..0d04fe432 --- /dev/null +++ b/assets/js/83.4d63937f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{362:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/84.358433c5.js b/assets/js/84.358433c5.js new file mode 100644 index 000000000..52e0bf99d --- /dev/null +++ b/assets/js/84.358433c5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{363:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/85.ec9c12c4.js b/assets/js/85.ec9c12c4.js new file mode 100644 index 000000000..3b8c861f6 --- /dev/null +++ b/assets/js/85.ec9c12c4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[85],{364:function(t,e,o){"use strict";o.r(e);var s=o(14),n=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Make sure the version of Touhou Little Maid mod you're using is the latest.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/86.58a726e0.js b/assets/js/86.58a726e0.js new file mode 100644 index 000000000..f3fc88230 --- /dev/null +++ b/assets/js/86.58a726e0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[86],{365:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"chair-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#chair-model-pack-details"}},[t._v("#")]),t._v(" Chair Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/87.4aa8465e.js b/assets/js/87.4aa8465e.js new file mode 100644 index 000000000..fc14cfb54 --- /dev/null +++ b/assets/js/87.4aa8465e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[87],{366:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"custom-altar-recipes"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-altar-recipes"}},[t._v("#")]),t._v(" Custom Altar Recipes")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Please make sure you know how to use the Minecaft vanilla datapack")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Fixed type")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Entity type name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Additional NBT data for the entity")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The necessary power point required for crafting")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// You can write up to 6 parameters, is the ingredients for the recipe")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/88.997272f0.js b/assets/js/88.997272f0.js new file mode 100644 index 000000000..791579c9d --- /dev/null +++ b/assets/js/88.997272f0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{367:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"custom-javascript-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#custom-javascript-animation"}},[t._v("#")]),t._v(" Custom JavaScript Animation")]),t._v(" "),e("p",[t._v("Through JavaScript files, you can add custom animations for maid or chair.")]),t._v(" "),e("ul",[e("li",[t._v("This wiki is suitable for Touhou Little Maid mod in "),e("code",[t._v("1.12.2")]),t._v(" and "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Basic understanding for JavaScript language;")]),t._v(" "),e("li",[t._v("Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;")]),t._v(" "),e("li",[t._v("For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.")])]),t._v(" "),e("h2",{attrs:{id:"basic-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-format"}},[t._v("#")]),t._v(" Basic Format")]),t._v(" "),e("p",[t._v("Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the "),e("code",[t._v("animation")]),t._v(" folder.")]),t._v(" "),e("p",[t._v("Below is the general template:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Entity that requires the corresponding animation\n * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)\n * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)\n * @param ageInTicks The tick time of an entity, the value that constantly increase from 0\n * @param netHeadYaw The yaw for the head of the entity\n * @param headPitch The pitch for the head of the entity\n * @param scale Param for scaling the entity, default is 0.0625, no use found.\n * @param modelMap The group of the model saved for a hashmap\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Script for the model")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Here we have a simple example, current model has a group named "),e("code",[t._v("rotation")]),t._v(" we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'rotation' from modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through the function setRotateAngleX in the group, we set its X axis angle")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks is tick time for the entity, a value that constantly increases starting from 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Through remainder operator (which is % sign), set the value between 0~360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// And with that we achieved the animation of rotating 1 degree every tick")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Now we add another more complex motion, we have a group named "),e("code",[t._v("wing")]),t._v(", and we want a constant back and forth oscillating motion.")]),t._v(" "),e("p",[t._v("Oscillate around Y axis, at a degree between "),e("code",[t._v("-20°~40°")]),t._v(", and one cycle is completed every 5 second.")]),t._v(" "),e("p",[t._v("Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This call is only needed when you need to use GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First obtain a group named 'wing' from modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Just in case, we make a simple check to make sure this group existed")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// One complete cycle every 5 second, which is 100 tick")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Using multiplication and remainder operator we can achieve this requirement")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is using the Math function in JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Construct sine function, and obtain a periodic function between -20°~40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("All other complex motion can be achieved through the related functions.")]),t._v(" "),e("h2",{attrs:{id:"hot-reload"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#hot-reload"}},[t._v("#")]),t._v(" Hot Reload")]),t._v(" "),e("p",[t._v("Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.")]),t._v(" "),e("p",[t._v("After you load the model resource pack you made, just use the following command can reload all animation's data.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"function-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#function-documentation"}},[t._v("#")]),t._v(" Function Documentation")]),t._v(" "),e("p",[t._v("Strikethrough style means that the method is deprecated in 1.16, you can visit the "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("link here"),e("OutboundLink")],1),t._v(" to view the source code API.")]),t._v(" "),e("h3",{attrs:{id:"entity-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#entity-parameter"}},[t._v("#")]),t._v(" Entity Parameter")]),t._v(" "),e("p",[t._v("Depending on the target of the added animation, the function that can be used by "),e("code",[t._v("entity")]),t._v(" differs as well.")]),t._v(" "),e("h4",{attrs:{id:"maid"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maid"}},[t._v("#")]),t._v(" Maid")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears helmet, returns helmet item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears chestplate, returns chestplate item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears leggings, returns leggings item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("After maid wears boots, returns boots item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in begging mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("If maid is using arms, this function will return "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's swinging time")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in riding mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is in standby mode")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is carrying trolley or other entities")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding Marisa Broom")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is riding vehicle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid hold portable audio and play it")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing backpack")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's backpack level")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid wearing sasimono")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is swinging left or right arm, return "),e("code",[t._v("false")]),t._v(" if it's the right")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the left arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float[3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the right arm rotation data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the dimension where the maid is in")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's task, such as "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has mainhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid has offhand item")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid mainhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid offhand item's registry name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in water")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid in rain")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome register name")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("String")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's biome temperature enum")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on hurt")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's max health")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether maid is sleep")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get the maid's favorability")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the maid is on ground")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("double")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get maid's armor value")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"chair"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#chair"}},[t._v("#")]),t._v(" Chair")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair is sit by the player")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the chair has passenger")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's yaw")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair passenger's pitch")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("int")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's dim id")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("World")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get chair's world data")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get a fixed value, each entity is different, similar to the entity's UUID")])])])]),t._v(" "),e("h4",{attrs:{id:"world"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#world"}},[t._v("#")]),t._v(" World")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("long")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get world's time (tick, 0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is day")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is night")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is raining")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Whether the world is thundering")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/89.0fd9c84c.js b/assets/js/89.0fd9c84c.js new file mode 100644 index 000000000..f23da429d --- /dev/null +++ b/assets/js/89.0fd9c84c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{369:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/90.cf3ab8a8.js b/assets/js/90.cf3ab8a8.js new file mode 100644 index 000000000..9380daffa --- /dev/null +++ b/assets/js/90.cf3ab8a8.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[90],{368:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"maid-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-easter-eggs"}},[t._v("#")]),t._v(" Maid Easter Eggs")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"other-questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#other-questions"}},[t._v("#")]),t._v(" Other Questions")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/91.f06d630d.js b/assets/js/91.f06d630d.js new file mode 100644 index 000000000..a76469bc9 --- /dev/null +++ b/assets/js/91.f06d630d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[91],{370:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"preset-animation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#preset-animation"}},[t._v("#")]),t._v(" Preset Animation")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Position the backpack shoulder strap, it must be the root group")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/92.ae5970af.js b/assets/js/92.ae5970af.js new file mode 100644 index 000000000..9ee035915 --- /dev/null +++ b/assets/js/92.ae5970af.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[92],{371:function(t,o,n){"use strict";n.r(o);var s=n(14),e=Object(s.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Убедитесь, что вы используете самую последнюю версию Touhou Little Maid.")])])])}),[],!1,null,null,null);o.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/93.1d8b8288.js b/assets/js/93.1d8b8288.js new file mode 100644 index 000000000..ae18c9c4e --- /dev/null +++ b/assets/js/93.1d8b8288.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{372:function(t,s,a){"use strict";a.r(s);var e=a(14),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"детали-моделеи-стульев"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#детали-моделеи-стульев"}},[t._v("#")]),t._v(" Детали моделей стульев")]),t._v(" "),s("ul",[s("li",[t._v("Этот вики применяется для Touhou Little Maid "),s("code",[t._v("1.12.2")]),t._v(" и "),s("code",[t._v("1.16.5")]),t._v(" последней версии;")]),t._v(" "),s("li",[t._v("Требует понимания структуры набора ресурсов ванильного Minecraft;")]),t._v(" "),s("li",[t._v("Требует понимания формата JSON;")]),t._v(" "),s("li",[t._v("В настоящее время поддерживает только модели "),s("strong",[t._v("1.10.0 или 1.12.0 Bedrock Edition")]),t._v(".")]),t._v(" "),s("li",[t._v("Для редактирования файлов мы рекомендуем "),s("code",[t._v("Visual Studio Code")]),t._v(", все связанные файлы должны быть сохранены с помощью "),s("code",[t._v("UTF-8 без BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"структура-наборов-моделеи"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#структура-наборов-моделеи"}},[t._v("#")]),t._v(" Структура наборов моделей")]),t._v(" "),s("p",[t._v("Чтобы лучше понять, как создать пакеты моделей, мы перечислили здесь формат структуры пакетов моделей")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("папка пакетов моделей\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_chair.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cushion.json\n │ └─wheel_chair.json\n └─textures\n └─entity\n ├─cushion.png\n └─wheel_chair.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"описание-фаилов-наборов-моделеи"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#описание-фаилов-наборов-моделеи"}},[t._v("#")]),t._v(" Описание файлов наборов моделей")]),t._v(" "),s("p",[t._v("Структура полного файла ниже, только части, которые помечены как '(Обязательные)' должны быть заполнены, вы не должны заполнять всё.")]),t._v(" "),s("p",[t._v("Модель поддерживает JSON файлы с комментариями, пожалуйста, используйте их по своему усмотрению.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.3"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-08-20"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/chair_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/cushion.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/cushion.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The entity height(pixels) above ground when sat on, default is 3")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"mounted_height"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will tamed entities such as maids can sit on it, default is true")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tameable_can_ride"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Whether the chair has gravity, the default is false")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"no_gravity"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Cushion"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Just A Normal Cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, chair will not have any animation")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/chair/passenger/rotation.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br"),s("span",{staticClass:"line-number"},[t._v("46")]),s("br"),s("span",{staticClass:"line-number"},[t._v("47")]),s("br"),s("span",{staticClass:"line-number"},[t._v("48")]),s("br"),s("span",{staticClass:"line-number"},[t._v("49")]),s("br"),s("span",{staticClass:"line-number"},[t._v("50")]),s("br"),s("span",{staticClass:"line-number"},[t._v("51")]),s("br")])]),s("p",[t._v("На примере выше перечислены все возможные поля, однако для заполнения обязательны только поля с '(Required)', остальные могут быть опущены.")]),t._v(" "),s("p",[t._v("Для простоты можно написать такой файл:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Custom Chair Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:cushion"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the model file will be "),s("code",[t._v("cushion.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("cushion.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("p",[s("code",[t._v("mounted_height")]),t._v(" is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.")]),t._v(" "),s("blockquote",[s("p",[t._v("The "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" position of the riding entity will always be the center of the chair entity, please preset the "),s("code",[t._v("X")]),t._v(" and "),s("code",[t._v("Z")]),t._v(" of the chair models when designing the models.")])]),t._v(" "),s("h2",{attrs:{id:"анимированная-иконка"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#анимированная-иконка"}},[t._v("#")]),t._v(" Анимированная иконка")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"фаил-моделеи"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#фаил-моделеи"}},[t._v("#")]),t._v(" Файл моделей")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"интернационализация"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#интернационализация"}},[t._v("#")]),t._v(" Интернационализация")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_chair_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Custom Chair Model Packs")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("自定义坐垫模型包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_chair_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/94.51dfef78.js b/assets/js/94.51dfef78.js new file mode 100644 index 000000000..79486f1a4 --- /dev/null +++ b/assets/js/94.51dfef78.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[94],{374:function(t,s,a){"use strict";a.r(s);var n=a(14),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"свои-рецепты-алтаря"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#свои-рецепты-алтаря"}},[t._v("#")]),t._v(" Свои рецепты Алтаря")]),t._v(" "),s("h2",{attrs:{id:"_1-16-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-16-5"}},[t._v("#")]),t._v(" 1.16.5")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.16.5 use datapack to add altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Пожалуйста, убедитесь, что вы знаете, как использовать ванильный датапак Minecaft")])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Фиксированный тип")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:altar_crafting"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"output"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Имя типа энтити")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:item"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Доп. NBT данные для энтити")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"nbt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_gohei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Кол-во силы для крафта")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"power"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.15")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Вы можете записать до 6 параметров, это ингредиенты для рецепта")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"ingredients"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"forge:rods/wooden"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"item"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:paper"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br")])]),s("h2",{attrs:{id:"_1-12-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1-12-2"}},[t._v("#")]),t._v(" 1.12.2")]),t._v(" "),s("p",[t._v("Touhou Little Maid in 1.12.2 added compability to "),s("code",[t._v("CraftTweaker")]),t._v(", use "),s("code",[t._v("CraftTweaker")]),t._v(" to add/edit altar recipes")]),t._v(" "),s("p",[s("strong",[t._v("Before using this function, please make sure you have understood the basic script writing method for "),s("code",[t._v("CraftTweaker")]),t._v(".")])]),t._v(" "),s("div",{staticClass:"language-js line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Simplified template for recipes for importing related ZenClass")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" mods"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("touhoulittlemaid"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Altar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Adding item recipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Second parameter: Float, is the necessary power point required for crafting")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: IItemStack, is the output item for the recipe")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("camera"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("sand"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("diamond_sword"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for changable parameter")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addItemCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_apple"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("touhou_little_maid"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("apple"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("ore"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("blockGlass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn maid")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidSpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:replace_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.5")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for maid revive")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addMaidReviveCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:reborn_maid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("grass"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Example for spawn other mob")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Third parameter: entity id")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("addEntitySpawnCraftRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"test:spawn_pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"minecraft:pig"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" \n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("minecraft"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v("stone"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI")]),t._v("\nAltar"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("removeRecipe")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:craft_camera"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/95.aa13d0bc.js b/assets/js/95.aa13d0bc.js new file mode 100644 index 000000000..63cac2e88 --- /dev/null +++ b/assets/js/95.aa13d0bc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[95],{373:function(t,e,a){"use strict";a.r(e);var n=a(14),s=Object(n.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"пользовательская-анимация-javascript"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#пользовательская-анимация-javascript"}},[t._v("#")]),t._v(" Пользовательская анимация JavaScript")]),t._v(" "),e("p",[t._v("С помощью JavaScript-файлов вы можете добавлять пользовательские анимации для горничной или кресла.")]),t._v(" "),e("ul",[e("li",[t._v("Этот вики подходит для Touhou Little Maid "),e("code",[t._v("1.12.2")]),t._v(" и "),e("code",[t._v("1.16.5")]),t._v(":")]),t._v(" "),e("li",[t._v("Базовое понимание языка JavaScript;")]),t._v(" "),e("li",[t._v("Немного математических знаний из средней/старшей школы, в частности тригонометрических функций и полярных координат;")]),t._v(" "),e("li",[t._v("Для редактирования скриптов, рекомендуется использовать VSCode с сохранением в кодировке UTF-8 без BOM.")])]),t._v(" "),e("h2",{attrs:{id:"базовыи-формат"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#базовыи-формат"}},[t._v("#")]),t._v(" Базовый формат")]),t._v(" "),e("p",[t._v("Скрипт с анимацией может быть помещён в любую папку, вам нужно только указать путь к файлу для соответствующих моделей. Я рекомендую поместить его в папку "),e("code",[t._v("animation")]),t._v(".")]),t._v(" "),e("p",[t._v("Ниже приведен общий шаблон:")]),t._v(" "),e("div",{staticClass:"language-js line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-js"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Это вызывается только если вы хотите использовать GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("/**\n * @param entity Сущность/моб, к которой применяется данная анимация\n * @param limbSwing Скорость движения моба (как спидометр в машине)\n * @param limbSwingAmount Пройденная мобом дистанция (как счётчик пробега в машине)\n * @param ageInTicks Возраст моба в тиках, значение постоянно увеличивается от 0\n * @param netHeadYaw Поворот головы моба\n * @param headPitch Наклон головы моба\n * @param scale Значение масштабирования моба. По умолчанию - 0.0625. Применений не найдено.\n * @param modelMap Группа модели, сохраненная для хэш-карты\n */")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Скрипт для модели")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Простой пример: текущая модет имеет группу костей, названную "),e("code",[t._v("rotation")]),t._v(". Нам нужно, чтобы эта группа вращалась вдоль оси X со скоростью 1 градус каждый тик (18 секунд на 1 оборот). Мы можем написать анимацию так:")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Это вызывается только если вам нужно использовать GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Сперва определим грумму 'rotation' из modelMap")]),t._v("\n rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rotation"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// На всякий случай, сделаем простую проверку наличия этой группы у модели")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("rotation "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// С помощью setRotateAngleX, мы установим угол вращения по оси X")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ageInTicks - это возраст сущности, значение, постоянно увеличивающееся от 0")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// С помощью оператора % мы найдём остаток от деленияв промежутке от 0 до 360")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Так как функция принимает только радианы, умножим полученное значение на 0.017453292 чтобы превратить градусы в радианы")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// И так мы получим анимацию вращения на 1 градус каждый тик")]),t._v("\n rotation"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br")])]),e("p",[t._v("Теперь мы добавим еще одно сложное движение, у нас есть группа с именем "),e("code",[t._v("wing")]),t._v(", и мы хотим, чтобы крылья постоянно двигались вперёд-назад.")]),t._v(" "),e("p",[t._v("Поворот будет по оси Y на угол от "),e("code",[t._v("-20° до 40°")]),t._v(", и цикл будет повторяться каждые 5 секунд.")]),t._v(" "),e("p",[t._v("Тригонометрическая функция соответствует нашим нуждам, так как вы можете использовать синус или косинус, мы будем использовать функцию синуса.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Это вызывается только если вам нужно использовать GlWrapper")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" GlWrapper "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Java"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("type")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nJava"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("asJSONCompatible")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("animation")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("entity"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" limbSwingAmount"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" ageInTicks"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" netHeadYaw"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n headPitch"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" scale"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" modelMap")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Сперва найдём группу 'wing' из modelMap")]),t._v("\n wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"wing"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// На всякий случай сделаем простую проверку наличия этой группы у модели")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("wing "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Один цикл займёт 5 секунд, что равно 100 тикам")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Используя умножение и остаток от деления мы получим желаемое")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ageInTicks "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.6")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("360")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Теперь используется функция Math из JavaScript")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Используя синус, мы получим периодическую функцию в интервале от -20° до 40°")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("var")]),t._v(" func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("30")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" Math"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sin")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("time "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Так как функция принимает только радианы, умножим полученное значение на 0.017453292 чтобы превратить градусы в радианы")]),t._v("\n wing"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("func "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br")])]),e("p",[t._v("Все остальные сложные движения могут быть получены с помощью соответствующих фунций.")]),t._v(" "),e("h2",{attrs:{id:"быстрая-перезагрузка"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#быстрая-перезагрузка"}},[t._v("#")]),t._v(" Быстрая перезагрузка")]),t._v(" "),e("p",[t._v("Так как вы не можете понять, правильно ли написана анимация, только лишь посмотрев на код, мы добавили возможность быстрой перезагрузки анимации в игре.")]),t._v(" "),e("p",[t._v("После того, как вы загрузите созданный вами набор ресурсов модели, просто используйте следующую команду для перезагрузки всех данных анимации.")]),t._v(" "),e("ul",[e("li",[t._v("1.12.2: "),e("code",[t._v("/maid_res reload")])]),t._v(" "),e("li",[t._v("1.16.5: "),e("code",[t._v("/tlm pack reload")])])]),t._v(" "),e("h2",{attrs:{id:"документация-по-функциям"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#документация-по-функциям"}},[t._v("#")]),t._v(" Документация по функциям")]),t._v(" "),e("p",[t._v("Зачёркнутый стиль означает, что данные функции устарели в 1.16, вы можете посетить "),e("a",{attrs:{href:"https://github.com/TartaricAcid/TouhouLittleMaid/tree/1.16.5/src/main/java/com/github/tartaricacid/touhoulittlemaid/api/animation",target:"_blank",rel:"noopener noreferrer"}},[t._v("эту ссылку"),e("OutboundLink")],1),t._v(" чтобы увидеть исходный код.")]),t._v(" "),e("h3",{attrs:{id:"параметры-сущностеи"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#параметры-сущностеи"}},[t._v("#")]),t._v(" Параметры сущностей")]),t._v(" "),e("p",[t._v("В зависимости от цели, к которой применяется анимация, функции, используемые "),e("code",[t._v("сущностью")]),t._v(", также могут отличаться друг от друга.")]),t._v(" "),e("h4",{attrs:{id:"горничная"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#горничная"}},[t._v("#")]),t._v(" Горничная")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Имя функции")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Возвращаемое значение")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Примечание")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела шлем, возвращает "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Есди горничная надела нагрудник, возвращает "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела поножи, возвращает "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела ботинки, возвращает "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHelmet()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела шлем, возвращает имя шлема из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getChestPlate()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела нагрудник, возвращает имя нагрудника из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getLeggings()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела поножи, возвращает имя поножей из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBoots()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная надела ботинки, возвращает имя ботинок из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isBegging()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Находится ли горничная в режиме попрошайки")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingingArms()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Если горничная двигает руками, эта функция вернет "),e("code",[t._v("true")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSwingProgress()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт время анимации рук")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRiding()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Едет ли горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSitting()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Сидит ли на месте горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldTrolley()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Держит ли горничная тележку или другие объекты")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingMarisaBroom()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Сидит ли горничная на метле")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isRidingPlayer()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Едет ли горничная верхом на игроке")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isHoldVehicle()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Едет ли горничная на транспорте")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("isPortableAudioPlay()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Держит ли горничная портативное радио и играет ли оно")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasBackpack()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Одет ли на горничной рюкзак")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getBackpackLevel()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("целочисленный")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт уровень рюкзака")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("hasSasimono()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Одет ли на горничную сазимоно")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSwingLeftHand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Использует ли горничная левую руку, вернёт "),e("code",[t._v("false")]),t._v(", если правую")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getLeftHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число [3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт данные вращения левой руки")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getRightHandRotation()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число [3]")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт данные вращения правой руки")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("целочисленный")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт измерение, где находится горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("Мир")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт данные о мире")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getTask()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт занятие горничной, такое как "),e("code",[t._v("attack")]),t._v(", "),e("code",[t._v("ranged_attack")])])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Есть ли предмет в главной (правой) руке горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Есть ли предмет во вторичной (левой) руке горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemMainhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт имя предмета, находящегося в главной руке горничной, из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getItemOffhand()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт имя предмета, находящегося во вторичной руке горничной, из реестра предметов")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inWater()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("В воде ли горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("inRain()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Под дождём ли горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getAtBiome()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт из реестра имя биома, где находится горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getAtBiomeTemp()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("строковый")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт температуру биома, в котором находится горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("onHurt()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Больно ли горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт здоровье горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getMaxHealth()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт максимальное здоровье горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isSleep()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Спит ли горничная")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getFavorability()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("целочисленный")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт благоприятность горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isOnGround()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Находится ли горничная на блоке")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getArmorValue()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("большоt дробное число (double)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт значение брони горничной")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("большое целое число (long)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт фиксированное значение, уникальное для каждой сущности, схожее с UUID мобов")])])])]),t._v(" "),e("h4",{attrs:{id:"сидение"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#сидение"}},[t._v("#")]),t._v(" Сидение")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Имя функции")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Возвращаемое значение")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Примечание")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRidingPlayer()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Сидит ли за этим сидением игрок")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("hasPassenger()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Имеет ли это сидение пассажира")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт поворот пассажира")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getYaw()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт поворот сидения")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getPassengerPitch()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("дробное число")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт наклон пассажира")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("s",[e("code",[t._v("getDim()")])])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("целочисленный")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт ID измерения")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorld()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("Мир")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт данные о мире")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getSeed()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("большое целое число (long)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт фиксированное значение, уникальное для каждой сущности, схожее с UUID мобов")])])])]),t._v(" "),e("h4",{attrs:{id:"мир"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#мир"}},[t._v("#")]),t._v(" Мир")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Имя функции")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Возвращаемое значение")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Примечание")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getWorldTime()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("большое целое число (long)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Вернёт время в тиках (0-24000)")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isDay()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Сейчас день?")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isNight()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Сейчас ночь?")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isRaining()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Идёт ли дождь")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isThundering()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("логический")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Идёт ли шторм")])])])]),t._v(" "),e("h3",{attrs:{id:"limbswing-limbswingamount-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#limbswing-limbswingamount-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("limbSwing")]),t._v(" & "),e("code",[t._v("limbSwingAmount")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("These are floating points, "),e("code",[t._v("limbSwing")]),t._v(" is the walking speed of the entity (think of it as the speedometer of a car), "),e("code",[t._v("limbSwingAmount")]),t._v(" is the total walking distance of the entity (think of it as the odometer of a car).")]),t._v(" "),e("p",[t._v("These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(left hand)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount")]),t._v("(right hand)")]),t._v(" "),e("p",[e("code",[t._v("Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(left leg)")]),t._v(" "),e("p",[e("code",[t._v("-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4")]),t._v("(right leg)")]),t._v(" "),e("p",[t._v("Changing the value "),e("code",[t._v("0.6662")]),t._v(" will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses "),e("code",[t._v("1.4")]),t._v(" as the coeffecient) to change the amplitude of the swing.")]),t._v(" "),e("p",[t._v("Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.")]),t._v(" "),e("h3",{attrs:{id:"ageinticks-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ageinticks-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("ageInTicks")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.")]),t._v(" "),e("h3",{attrs:{id:"netheadyaw-and-headpitch-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#netheadyaw-and-headpitch-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("netHeadYaw")]),t._v(" and "),e("code",[t._v("headPitch")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).")]),t._v(" "),e("p",[t._v("Normally this parameter can be used as a rotation angle, you just need to change it into radian.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleX")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("headPitch "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nhead"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("setRotateAngleY")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("netHeadYaw "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("*")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.017453292")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("blockquote",[e("p",[t._v("If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.")])]),t._v(" "),e("h3",{attrs:{id:"scale-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#scale-parameter"}},[t._v("#")]),t._v(" "),e("code",[t._v("scale")]),t._v(" Parameter")]),t._v(" "),e("p",[t._v("Floating point, fixed at 0.0625.")]),t._v(" "),e("p",[t._v("A value that has unknown meaning.")]),t._v(" "),e("h3",{attrs:{id:"modelmap-parameter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modelmap-parameter"}},[t._v("#")]),t._v(" modelMap Parameter")]),t._v(" "),e("p",[t._v("A Map that saves group, using string as keys.")]),t._v(" "),e("p",[t._v("You can get the corresponding group through "),e("code",[t._v('modelMap.get("xxx")')]),t._v(". If there is no group that matches the name, return "),e("code",[t._v("undefined")])]),t._v(" "),e("p",[t._v("Let's say we want to get the target group "),e("code",[t._v("head")]),t._v(":")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then we can set various parameter using this "),e("code",[t._v("head")]),t._v(" group to make animation.")]),t._v(" "),e("p",[t._v("Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.")]),t._v(" "),e("div",{staticClass:"language-javascript line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-javascript"}},[e("code",[t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" modelMap"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"head"')]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("head "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!=")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("undefined")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Making various animation")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br")])]),e("h3",{attrs:{id:"group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#group"}},[t._v("#")]),t._v(" Group")]),t._v(" "),e("p",[t._v("We can get various group via "),e("code",[t._v('modelMap.get("xxx")')]),t._v(", the following are the functions that can be used to the obtained group.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleX(float rotateAngleX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleY(float rotateAngleY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setRotateAngleZ(float rotateAngleZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetX(float offsetX)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetY(float offsetY)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setOffsetZ(float offsetZ)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set the group's Z coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("setHidden(boolean hidden)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Set if the group is hidden")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Z angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization x rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization y rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getInitRotateAngleZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Get ModelRenderer's initialization z rotate angle")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetX()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's X coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetY()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("getOffsetZ()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("float")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Obtain the group's Y coordianate offset")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("isHidden()")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("boolean")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Check if the group is hidden")])])])]),t._v(" "),e("h3",{attrs:{id:"glwrapper"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#glwrapper"}},[t._v("#")]),t._v(" GlWrapper")]),t._v(" "),e("p",[t._v("On the top of the script we used a tool called "),e("code",[t._v("GlWrapper")]),t._v(", that can make various translation, rotation and scaling operations.")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",{staticStyle:{"text-align":"center"}},[t._v("Function name")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Return value")]),t._v(" "),e("th",{staticStyle:{"text-align":"center"}},[t._v("Note")])])]),t._v(" "),e("tbody",[e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("translate(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Move the entity to coordiate x y z")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("rotate(float angle, float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Using a straight line"),e("code",[t._v("(0, 0, 0) (x, y, z)")]),t._v(" as axis, rotate it by "),e("code",[t._v("angle")]),t._v(" degree.")])]),t._v(" "),e("tr",[e("td",{staticStyle:{"text-align":"center"}},[e("code",[t._v("scale(float x, float y, float z)")])]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("None")]),t._v(" "),e("td",{staticStyle:{"text-align":"center"}},[t._v("Scale entity on three axis by x y z times")])])])])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/96.cd7f4f5e.js b/assets/js/96.cd7f4f5e.js new file mode 100644 index 000000000..ac1b8047d --- /dev/null +++ b/assets/js/96.cd7f4f5e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[96],{375:function(e,t,a){"use strict";a.r(t);var o=a(14),i=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"custom-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#custom-model-pack"}},[e._v("#")]),e._v(" Custom Model Pack")]),e._v(" "),t("p",[e._v("Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.")]),e._v(" "),t("p",[e._v("The model packs compatible with the mod of "),t("code",[e._v("1.12.2")]),e._v(" and "),t("code",[e._v("1.16.5")]),e._v(" are exactly the same, just that the loading method is slightly different:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("1.12.2")]),e._v(": The model package needs to be loaded like the vanilla resource package.")]),e._v(" "),t("li",[t("code",[e._v("1.16.5")]),e._v(": The model package needs to be placed in the "),t("code",[e._v("tlm_custom_pack")]),e._v(" folder under the game's directory.")])]),e._v(" "),t("p",[e._v("It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:")]),e._v(" "),t("ul",[t("li",[t("p",[e._v("Blockbench: A software develped by "),t("code",[e._v("JannisX11")]),e._v(" specifically for Minecraft 3D modelling.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://blockbench.net/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The mod only supports Bedrock Edition model format, and does not support Bedrock Edition animation files.")])]),e._v(" "),t("li",[t("p",[e._v("Visual Studio Code: An Integrated Development Environment made by Microsoft.")]),e._v(" "),t("p",[e._v("Official website: "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://code.visualstudio.com/"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("Mainly used to edit language files, optional.")])])]),e._v(" "),t("p",[e._v("In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0")]),e._v(" "),t("p",[e._v("Plugin site: "),t("a",{attrs:{href:"http://page.cfpa.team/TLM-Utils-Plugins/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://page.cfpa.team/TLM-Utils-Plugins/"),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"quick-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[e._v("#")]),e._v(" Quick Start")]),e._v(" "),t("p",[e._v("First you need to understand how to use Blockbench, and second you need to install the "),t("code",[e._v("tlm-utils")]),e._v(" plugin."),t("br"),e._v("\nWhen everything is done, you can start to make a model package according to the instructions below.")]),e._v(" "),t("h2",{attrs:{id:"_1-create-a-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_1-create-a-default-model"}},[e._v("#")]),e._v(" 1. Create a default model")]),e._v(" "),t("p",[e._v("Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis."),t("br"),e._v("\nIf you choose "),t("code",[e._v("chair")]),e._v(", there is no default model.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/h6ufpuS.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_2-modify-it-to-what-you-want-based-on-the-default-model"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_2-modify-it-to-what-you-want-based-on-the-default-model"}},[e._v("#")]),e._v(" 2. Modify it to what you want based on the default model")]),e._v(" "),t("p",[e._v("Need to pay attention to several points:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("The maid animation is automatically added based on the "),t("strong",[e._v("group name")]),e._v(", so please do not delete or rename at will.")]),e._v(" "),t("blockquote",[t("p",[e._v("Want to know what group names are available? Please see the "),t("RouterLink",{attrs:{to:"/preset_animation.html"}},[e._v("Preset Animation")]),e._v(" chapter.")],1)]),e._v(" "),t("blockquote",[t("p",[e._v("You can right-click in the outliner interface to open the preset animation menu"),t("br"),e._v(" "),t("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})])])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the parent-child relationship of the group.")])]),e._v(" "),t("li",[t("p",[e._v("Pay attention to the pivot point.")])])]),e._v(" "),t("h2",{attrs:{id:"_3-create-textures"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_3-create-textures"}},[e._v("#")]),e._v(" 3. Create textures")]),e._v(" "),t("p",[e._v("You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/4JOKLMd.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_4-create-a-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_4-create-a-model-pack"}},[e._v("#")]),e._v(" 4. Create a model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/RHq9zf1.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_5-export-the-model-into-model-pack"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_5-export-the-model-into-model-pack"}},[e._v("#")]),e._v(" 5. Export the model into model pack")]),e._v(" "),t("p",[t("img",{attrs:{src:"https://i.imgur.com/Mux4TwJ.gif",alt:"img"}})]),e._v(" "),t("h2",{attrs:{id:"_6-load-the-model-pack-enjoy-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#_6-load-the-model-pack-enjoy-it"}},[e._v("#")]),e._v(" 6. Load the model pack & enjoy it!")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/97.f78bac92.js b/assets/js/97.f78bac92.js new file mode 100644 index 000000000..1cd35651c --- /dev/null +++ b/assets/js/97.f78bac92.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[97],{376:function(t,s,e){"use strict";e.r(s);var a=e(14),n=Object(a.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"maid-model-pack-details"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#maid-model-pack-details"}},[t._v("#")]),t._v(" Maid Model Pack Details")]),t._v(" "),s("ul",[s("li",[t._v("This wiki applies to Touhou Little Maid mod in "),s("code",[t._v("1.12.2")]),t._v(" or "),s("code",[t._v("1.16.5")]),t._v(" latest version;")]),t._v(" "),s("li",[t._v("Requires understanding of vanilla Minecraft's resource pack structure;")]),t._v(" "),s("li",[t._v("Requires understanding of JSON format;")]),t._v(" "),s("li",[t._v("Currently only supports models for "),s("strong",[t._v("1.10.0 or 1.12.0 Bedrock Edition Model")]),t._v(".")]),t._v(" "),s("li",[t._v("For file editing software, we recommend "),s("code",[t._v("Visual Studio Code")]),t._v(", all related files requires to be saved using "),s("code",[t._v("UTF-8 without BOM")]),t._v(".")])]),t._v(" "),s("h2",{attrs:{id:"model-packs-structure"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-structure"}},[t._v("#")]),t._v(" Model Packs Structure")]),t._v(" "),s("p",[t._v("To better understand how to create model packs, we listed here the structure format for model packs")]),t._v(" "),s("div",{staticClass:"language- line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("model pack folder\n│\n├─pack.mcmeta\n├─pack.png\n└─assets\n └─my_model_pack\n ├─maid_model.json\n ├─lang\n │ ├─en_us.lang\n │ └─zh_cn.lang\n ├─models\n │ └─entity\n │ ├─cirno.json\n │ └─daiyousei.json\n └─textures\n └─entity\n ├─cirno.png\n └─daiyousei.png\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br")])]),s("h2",{attrs:{id:"model-packs-description-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-packs-description-files"}},[t._v("#")]),t._v(" Model Packs Description Files")]),t._v(" "),s("p",[t._v("The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.")]),t._v(" "),s("p",[t._v("The model supports JSON files with comments, please use at your discretion.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Author list")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"author"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TartaricAcid"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SuccinicAcid"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Description for model packs")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Default Model Packs"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack version")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"1.0.0"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Date creation for model pack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"date"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2019-07-14"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack icon, without this, the model pack will have no icon")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"icon"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/maid_icon.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the model, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:models/entity/hakurei_reimu.json"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The path for the texture, use the full resource path")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"texture"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:textures/entity/hakurei_reimu.png"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The model size when rendering the item form, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_item_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.9")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The size when render the entity, range is between 0.2~2.0, default is 1.0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"render_entity_scale"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.75")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Reimu Hakurei"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// The description for the model")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Shrine Maiden of Hakurei"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Animation script reference, without this part, model will have some default animations")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// tlm-utils plugins can auto generate the correct animation reference based on the group name")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"animation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:animation/maid.default.js"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br"),s("span",{staticClass:"line-number"},[t._v("13")]),s("br"),s("span",{staticClass:"line-number"},[t._v("14")]),s("br"),s("span",{staticClass:"line-number"},[t._v("15")]),s("br"),s("span",{staticClass:"line-number"},[t._v("16")]),s("br"),s("span",{staticClass:"line-number"},[t._v("17")]),s("br"),s("span",{staticClass:"line-number"},[t._v("18")]),s("br"),s("span",{staticClass:"line-number"},[t._v("19")]),s("br"),s("span",{staticClass:"line-number"},[t._v("20")]),s("br"),s("span",{staticClass:"line-number"},[t._v("21")]),s("br"),s("span",{staticClass:"line-number"},[t._v("22")]),s("br"),s("span",{staticClass:"line-number"},[t._v("23")]),s("br"),s("span",{staticClass:"line-number"},[t._v("24")]),s("br"),s("span",{staticClass:"line-number"},[t._v("25")]),s("br"),s("span",{staticClass:"line-number"},[t._v("26")]),s("br"),s("span",{staticClass:"line-number"},[t._v("27")]),s("br"),s("span",{staticClass:"line-number"},[t._v("28")]),s("br"),s("span",{staticClass:"line-number"},[t._v("29")]),s("br"),s("span",{staticClass:"line-number"},[t._v("30")]),s("br"),s("span",{staticClass:"line-number"},[t._v("31")]),s("br"),s("span",{staticClass:"line-number"},[t._v("32")]),s("br"),s("span",{staticClass:"line-number"},[t._v("33")]),s("br"),s("span",{staticClass:"line-number"},[t._v("34")]),s("br"),s("span",{staticClass:"line-number"},[t._v("35")]),s("br"),s("span",{staticClass:"line-number"},[t._v("36")]),s("br"),s("span",{staticClass:"line-number"},[t._v("37")]),s("br"),s("span",{staticClass:"line-number"},[t._v("38")]),s("br"),s("span",{staticClass:"line-number"},[t._v("39")]),s("br"),s("span",{staticClass:"line-number"},[t._v("40")]),s("br"),s("span",{staticClass:"line-number"},[t._v("41")]),s("br"),s("span",{staticClass:"line-number"},[t._v("42")]),s("br"),s("span",{staticClass:"line-number"},[t._v("43")]),s("br"),s("span",{staticClass:"line-number"},[t._v("44")]),s("br"),s("span",{staticClass:"line-number"},[t._v("45")]),s("br")])]),s("p",[t._v("The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.")]),t._v(" "),s("p",[t._v("For simplicity, you could write a file like this:")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model pack name (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Packs"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model list (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Model id, no duplication allowed (Required)")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br")])]),s("p",[t._v("If we do not fill the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", it will choose the default model and texture based on "),s("code",[t._v("model_id")]),t._v(".")]),t._v(" "),s("p",[t._v("For the example above, "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:hakurei_reimu")]),t._v(", then the model file will be "),s("code",[t._v("hakurei_reimu.json")]),t._v(" under "),s("code",[t._v("models/entity")]),t._v(" folder, the texture will be "),s("code",[t._v("hakurei_reimu.png")]),t._v(" under "),s("code",[t._v("textures/entity")]),t._v(" folder.")]),t._v(" "),s("p",[t._v("If we filled the field for "),s("code",[t._v("model")]),t._v(" or "),s("code",[t._v("texture")]),t._v(", then the content has no limit, and can even share a model or texture for multiple characters.")]),t._v(" "),s("h2",{attrs:{id:"animated-icon"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#animated-icon"}},[t._v("#")]),t._v(" Animated Icon")]),t._v(" "),s("p",[t._v("Icon does not have size limit, supports both static and animated icons.")]),t._v(" "),s("p",[t._v("Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.")]),t._v(" "),s("blockquote",[s("p",[t._v("The image below is the icon in the mod, left is static icon, and right is the animated icon.")])]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/VoulqpR.png",alt:"020"}})]),t._v(" "),s("h2",{attrs:{id:"model-files"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#model-files"}},[t._v("#")]),t._v(" Model Files")]),t._v(" "),s("ul",[s("li",[t._v("This mod is using JSON files in Bedrock "),s("code",[t._v("1.10.0")]),t._v(" or "),s("code",[t._v("1.12.0")]),t._v(" for model loading, the document can be exported via model building software "),s("a",{attrs:{href:"https://blockbench.net/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blockbench"),s("OutboundLink")],1),t._v(", without additional edits.")]),t._v(" "),s("li",[t._v("There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the "),s("RouterLink",{attrs:{to:"/preset_animation.html"}},[t._v("Preset Animation")]),t._v(" chapter.")],1),t._v(" "),s("li",[t._v("Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.")])]),t._v(" "),s("h2",{attrs:{id:"internationlization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#internationlization"}},[t._v("#")]),t._v(" Internationlization")]),t._v(" "),s("p",[t._v("As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.")]),t._v(" "),s("ul",[s("li",[s("code",[t._v("pack_name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model packs support internationalization;")]),t._v(" "),s("li",[s("code",[t._v("name")]),t._v(" and "),s("code",[t._v("description")]),t._v(" field in model list support internationalization.")])]),t._v(" "),s("p",[t._v("The method of adding internationalization is pretty simple, just need to begin it using "),s("code",[t._v("{")]),t._v(" and end it using "),s("code",[t._v("}")]),t._v(", the middle section is the internationlization key, and then followed by the corresponding language file.")]),t._v(" "),s("p",[t._v("For example we wrote the description as follow (taking just a small section)")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.name}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"{pack.vanilla_touhou_model.desc}"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("and then under model pack namespace, in the "),s("code",[t._v("lang")]),t._v(" folder we create "),s("code",[t._v("en_us.lang")]),t._v(" file, and write the content below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Vanilla Touhou Model")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("Default Model Packs")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("We only added the English file, but if we want to support Chinese, we can create "),s("code",[t._v("zh_cn.lang")]),t._v(" file and write the content as below:")]),t._v(" "),s("div",{staticClass:"language-properties line-numbers-mode"},[s("pre",{pre:!0,attrs:{class:"language-properties"}},[s("code",[s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("原版东方资源包")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("pack.vanilla_touhou_model.desc")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("默认的模型包")]),t._v("\n")])]),t._v(" "),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br")])]),s("p",[t._v("For the first example, if we did not fill the "),s("code",[t._v("name")]),t._v(" file, then the system will automatically create the local key based on "),s("code",[t._v("model_id")]),t._v(", for example "),s("code",[t._v("model_id")]),t._v(" is "),s("code",[t._v("touhou_little_maid:cushion")]),t._v(", then the generated language key is "),s("code",[t._v("model.touhou_little_maid.cushion.name")]),t._v(".")]),t._v(" "),s("p",[s("code",[t._v("description")]),t._v(" file is not generated by default, you will need to fill that in.")]),t._v(" "),s("h2",{attrs:{id:"compatibility-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#compatibility-issue"}},[t._v("#")]),t._v(" Compatibility Issue")]),t._v(" "),s("p",[t._v("Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",{staticStyle:{"text-align":"center"}},[t._v("Issues")]),t._v(" "),s("th",{staticStyle:{"text-align":"center"}},[t._v("Solution")])])]),t._v(" "),s("tbody",[s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Uncoordinated animation")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write a custom JavaScript animation script")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Hold items are in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Disable showing hold items")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("As long as "),s("code",[t._v("armLeft")]),t._v(" or "),s("code",[t._v("armRight")]),t._v(" group does not exist, then the corresponding hold items will not be shown")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack is in incorrect position")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Use positional group to define the position")])]),t._v(" "),s("tr",[s("td",{staticStyle:{"text-align":"center"}},[t._v("Backpack, trolley, vehicles, broom, custom head")]),t._v(" "),s("td",{staticStyle:{"text-align":"center"}},[t._v("Write some fields as shown in the example below to close it")])])])]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_backpack"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of backpack")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_custom_head"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of maid's custom heads")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"show_hata"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent displaying of hata sasimono, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_trolley"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// prevent maid to hold the trolley, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_hold_vehicle"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to hold the vehicle, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"can_riding_broom"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Prevent maid to riding the broom, deprecated in 1.16")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br"),s("span",{staticClass:"line-number"},[t._v("11")]),s("br"),s("span",{staticClass:"line-number"},[t._v("12")]),s("br")])]),s("h2",{attrs:{id:"пасхальные-яица-горничнои"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#пасхальные-яица-горничнои"}},[t._v("#")]),t._v(" Пасхальные яйца горничной")]),t._v(" "),s("p",[t._v("We added maid naming easter egg function, specially named maid can use special models.")]),t._v(" "),s("p",[t._v("Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.")]),t._v(" "),s("h3",{attrs:{id:"normal-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#normal-easter-eggs"}},[t._v("#")]),t._v(" Normal Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the "),s("code",[t._v("tag")]),t._v(" field to use the model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"IKUN~"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br")])]),s("h3",{attrs:{id:"encrypted-easter-eggs"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#encrypted-easter-eggs"}},[t._v("#")]),t._v(" Encrypted Easter Eggs")]),t._v(" "),s("p",[t._v("Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the "),s("code",[t._v("tag")]),t._v(" below to use the model.")]),t._v(" "),s("p",[t._v("As the script below, when maid is named "),s("code",[t._v("IKUN~")]),t._v(", because the characters' SHA-1 value is "),s("code",[t._v("6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511")]),t._v(", same as "),s("code",[t._v("tag")]),t._v(" field, it will use said model.")]),t._v(" "),s("div",{staticClass:"language-json line-numbers-mode"},[s("div",{staticClass:"highlight-lines"},[s("br"),s("br"),s("br"),s("br"),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("div",{staticClass:"highlighted"},[t._v(" ")]),s("br"),s("br"),s("br")]),s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"pack_name"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Touhou Project Model Pack"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_list"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"model_id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"touhou_little_maid:hakurei_reimu"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"easter_egg"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"encrypt"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tag"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])]),s("div",{staticClass:"line-numbers-wrapper"},[s("span",{staticClass:"line-number"},[t._v("1")]),s("br"),s("span",{staticClass:"line-number"},[t._v("2")]),s("br"),s("span",{staticClass:"line-number"},[t._v("3")]),s("br"),s("span",{staticClass:"line-number"},[t._v("4")]),s("br"),s("span",{staticClass:"line-number"},[t._v("5")]),s("br"),s("span",{staticClass:"line-number"},[t._v("6")]),s("br"),s("span",{staticClass:"line-number"},[t._v("7")]),s("br"),s("span",{staticClass:"line-number"},[t._v("8")]),s("br"),s("span",{staticClass:"line-number"},[t._v("9")]),s("br"),s("span",{staticClass:"line-number"},[t._v("10")]),s("br")])]),s("h2",{attrs:{id:"другие-вопросы"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#другие-вопросы"}},[t._v("#")]),t._v(" Другие вопросы")]),t._v(" "),s("h3",{attrs:{id:"z-fighting-issue"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#z-fighting-issue"}},[t._v("#")]),t._v(" Z-fighting Issue")]),t._v(" "),s("p",[t._v("This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.")]),t._v(" "),s("p",[s("img",{attrs:{src:"https://i.imgur.com/daYk77e.png",alt:"004"}})]),t._v(" "),s("p",[t._v("For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.")]),t._v(" "),s("h3",{attrs:{id:"uppercase-lowercase"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#uppercase-lowercase"}},[t._v("#")]),t._v(" Uppercase & Lowercase")]),t._v(" "),s("p",[t._v("In Minecraft, all the file names needs to be lowercase.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/98.444a3bec.js b/assets/js/98.444a3bec.js new file mode 100644 index 000000000..824f925ca --- /dev/null +++ b/assets/js/98.444a3bec.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{377:function(t,e,i){"use strict";i.r(e);var o=i(14),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"заготовленная-анимация"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#заготовленная-анимация"}},[t._v("#")]),t._v(" Заготовленная анимация")]),t._v(" "),e("p",[t._v("There are many default animations built in the mod, you only need:")]),t._v(" "),e("ol",[e("li",[t._v("Set the correct name for the group you want to animate in Blockbench.")]),t._v(" "),e("li",[t._v("Call the animation reference of the path in the "),e("code",[t._v("animation")]),t._v(" field of the "),e("code",[t._v("maid_model.json")]),t._v(" file.")])]),t._v(" "),e("blockquote",[e("p",[t._v("The "),e("code",[t._v("tlm-utils")]),t._v(" plugin can automatically call the animation script reference based on the group name, you just need to click the "),e("code",[t._v("Re-Analyze Animation")]),t._v(" button. "),e("img",{attrs:{src:"https://i.imgur.com/iyCKwMx.gif",alt:"img"}})])]),t._v(" "),e("p",[t._v("The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu"),e("br"),t._v(" "),e("img",{attrs:{src:"https://i.imgur.com/N17PbiE.gif",alt:"img"}})]),t._v(" "),e("h2",{attrs:{id:"positioning-group"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#positioning-group"}},[t._v("#")]),t._v(" Positioning Group")]),t._v(" "),e("p",[t._v("For rendering positioning, based on the pivot point of the group, can be empty.")]),t._v(" "),e("h3",{attrs:{id:"armleftpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armleftpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armLeftPositioningBone")])]),t._v(" "),e("p",[t._v("Position the left-handed item, its parent group must be "),e("code",[t._v("armLeft")])]),t._v(" "),e("h3",{attrs:{id:"armrightpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#armrightpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("armRightPositioningBone")])]),t._v(" "),e("p",[t._v("Position the right-handed item, its parent group must be "),e("code",[t._v("armRight")])]),t._v(" "),e("h3",{attrs:{id:"backpackpositioningbone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#backpackpositioningbone"}},[t._v("#")]),t._v(" "),e("code",[t._v("backpackPositioningBone")])]),t._v(" "),e("p",[t._v("Позиция лямки рюкзака должна быть в корневой группе")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/99.3cb4e284.js b/assets/js/99.3cb4e284.js new file mode 100644 index 000000000..370b465dd --- /dev/null +++ b/assets/js/99.3cb4e284.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[99],{378:function(t,n,o){"use strict";o.r(n);var u=o(14),l=Object(u.a)({},(function(){var t=this._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("blockquote",[t("p",[this._v("Kullandığınız Touhou Little Maid modunun güncel olduğuna emin olun.")])])])}),[],!1,null,null,null);n.default=l.exports}}]); \ No newline at end of file diff --git a/assets/js/app.0d214d66.js b/assets/js/app.0d214d66.js new file mode 100644 index 000000000..4f28a7134 --- /dev/null +++ b/assets/js/app.0d214d66.js @@ -0,0 +1,16 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(e){function t(t){for(var r,i,l=t[0],s=t[1],c=t[2],p=0,d=[];p
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var s=n.render(!t),c=s.querySelector(r.barSelector),u=r.speed,p=r.easing;return s.offsetWidth,i((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,function(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}(e,u,p)),1===e?(l(s,{transition:"none",opacity:1}),s.offsetWidth,setTimeout((function(){l(s,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&d(o),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,o,a=arguments;if(2==a.length)for(n in t)void 0!==(o=t[n])&&t.hasOwnProperty(n)&&r(e,n,o);else r(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=p(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function u(e,t){var n,r=p(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){"use strict";var r=n(1),o=n(45).f,a=n(12),i=n(92),l=n(32),s=n(61),c=n(120);e.exports=function(e,t){var n,u,p,d,f,h=e.target,m=e.global,v=e.stat;if(n=m?r:v?r[h]||l(h,{}):(r[h]||{}).prototype)for(u in t){if(d=t[u],p=e.dontCallGetSet?(f=o(n,u))&&f.value:n[u],!c(m?u:h+(v?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;s(d,p)}(e.sham||p&&p.sham)&&a(d,"sham",!0),i(n,u,d,e)}}},function(e,t,n){"use strict";var r=n(25),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(e,t,n){"use strict";var r=n(3);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(46),o=n(47);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(1),o=n(0),a=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e]):r[e]&&r[e][t]}},function(e,t,n){"use strict";var r=n(0),o=n(102),a=TypeError;e.exports=function(e){if(r(e))return e;throw a(o(e)+" is not a function")}},function(e,t,n){"use strict";var r=n(1),o=n(56),a=n(7),i=n(58),l=n(54),s=n(53),c=r.Symbol,u=o("wks"),p=s?c.for||c:c&&c.withoutSetter||i;e.exports=function(e){return a(u,e)||(u[e]=l&&a(c,e)?c[e]:p("Symbol."+e)),u[e]}},function(e,t,n){"use strict";var r=n(1),o=n(32),a=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=a},function(e,t,n){"use strict";var r=n(1),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){"use strict";var r=n(47),o=Object;e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var r=n(8),o=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw a(o(e)+" is not an object")}},function(e,t,n){"use strict";var r=n(117);e.exports=function(e){return r(e.length)}},function(e,t,n){var r=n(143),o=n(10),a=Object.prototype,i=a.hasOwnProperty,l=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},function(e,t,n){var r=n(9)(n(6),"Map");e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(163),o=n(170),a=n(172),i=n(173),l=n(174);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(4),o=n(43),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(i.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(11),o=n(10);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var r=n(5),o=n(24),a=n(98),i=n(26),l=n(27),s=n(49),c=n(7),u=n(59),p=Object.getOwnPropertyDescriptor;t.f=r?p:function(e,t){if(e=l(e),t=s(t),u)try{return p(e,t)}catch(e){}if(c(e,t))return i(!o(a.f,e,t),e[t])}},function(e,t,n){"use strict";var r=n(2),o=n(3),a=n(16),i=Object,l=r("".split);e.exports=o((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?l(e,""):i(e)}:i},function(e,t,n){"use strict";var r=n(48),o=TypeError;e.exports=function(e){if(r(e))throw o("Can't call method on "+e);return e}},function(e,t,n){"use strict";e.exports=function(e){return null==e}},function(e,t,n){"use strict";var r=n(99),o=n(51);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},function(e,t,n){"use strict";var r="object"==typeof document&&document.all,o=void 0===r&&void 0!==r;e.exports={all:r,IS_HTMLDDA:o}},function(e,t,n){"use strict";var r=n(28),o=n(0),a=n(52),i=n(53),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&a(t.prototype,l(e))}},function(e,t,n){"use strict";var r=n(2);e.exports=r({}.isPrototypeOf)},function(e,t,n){"use strict";var r=n(54);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var r=n(55),o=n(3),a=n(1).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){"use strict";var r,o,a=n(1),i=n(100),l=a.process,s=a.Deno,c=l&&l.versions||s&&s.version,u=c&&c.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&i&&(!(r=i.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},function(e,t,n){"use strict";var r=n(57),o=n(31);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.1",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var r=n(2),o=0,a=Math.random(),i=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+a,36)}},function(e,t,n){"use strict";var r=n(5),o=n(3),a=n(104);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r=n(7),o=n(111),a=n(45),i=n(15);e.exports=function(e,t,n){for(var l=o(t),s=i.f,c=a.f,u=0;uu))return!1;var d=s.get(e),f=s.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,v=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e]/;e.exports=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var a="",i=0,l=0;for(i=o.index;i=t||n<0||v&&e-c>=a}function k(){var e=f();if(b(e))return w(e);l=setTimeout(k,function(e){var n=t-(e-s);return v?d(n,a-(e-c)):n}(e))}function w(e){return l=void 0,g&&r?_(e):(r=o=void 0,i)}function P(){var e=f(),n=b(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return y(s);if(v)return l=setTimeout(k,t),_(s)}return void 0===l&&(l=setTimeout(k,t)),i}return t=m(t)||0,h(n)&&(u=!!n.leading,a=(v="maxWait"in n)?p(m(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g),P.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},P.flush=function(){return void 0===l?i:w(f())},P}},function(e,t,n){"use strict";var r=n(23),o=n(33),a=n(35),i=n(124),l=n(126);r({target:"Array",proto:!0,arity:1,forced:n(3)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),n=a(t),r=arguments.length;l(n+r);for(var s=0;s79&&i<83||!a("reduce")},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!r.call({1:2},1);t.f=a?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){"use strict";var r=n(24),o=n(8),a=n(51),i=n(101),l=n(103),s=n(30),c=TypeError,u=s("toPrimitive");e.exports=function(e,t){if(!o(e)||a(e))return e;var n,s=i(e,u);if(s){if(void 0===t&&(t="default"),n=r(s,e,t),!o(n)||a(n))return n;throw c("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},function(e,t,n){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(e,t,n){"use strict";var r=n(29),o=n(48);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},function(e,t,n){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(e){return"Object"}}},function(e,t,n){"use strict";var r=n(24),o=n(0),a=n(8),i=TypeError;e.exports=function(e,t){var n,l;if("string"===t&&o(n=e.toString)&&!a(l=r(n,e)))return l;if(o(n=e.valueOf)&&!a(l=r(n,e)))return l;if("string"!==t&&o(n=e.toString)&&!a(l=r(n,e)))return l;throw i("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(1),o=n(8),a=r.document,i=o(a)&&o(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t,n){"use strict";var r=n(5),o=n(3);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){"use strict";var r=n(5),o=n(7),a=Function.prototype,i=r&&Object.getOwnPropertyDescriptor,l=o(a,"name"),s=l&&"something"===function(){}.name,c=l&&(!r||r&&i(a,"name").configurable);e.exports={EXISTS:l,PROPER:s,CONFIGURABLE:c}},function(e,t,n){"use strict";var r=n(2),o=n(0),a=n(31),i=r(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return i(e)}),e.exports=a.inspectSource},function(e,t,n){"use strict";var r,o,a,i=n(109),l=n(1),s=n(8),c=n(12),u=n(7),p=n(31),d=n(110),f=n(60),h=l.TypeError,m=l.WeakMap;if(i||p.state){var v=p.state||(p.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,r=function(e,t){if(v.has(e))throw h("Object already initialized");return t.facade=e,v.set(e,t),t},o=function(e){return v.get(e)||{}},a=function(e){return v.has(e)}}else{var g=d("state");f[g]=!0,r=function(e,t){if(u(e,g))throw h("Object already initialized");return t.facade=e,c(e,g,t),t},o=function(e){return u(e,g)?e[g]:{}},a=function(e){return u(e,g)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw h("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var r=n(1),o=n(0),a=r.WeakMap;e.exports=o(a)&&/native code/.test(String(a))},function(e,t,n){"use strict";var r=n(56),o=n(58),a=r("keys");e.exports=function(e){return a[e]||(a[e]=o(e))}},function(e,t,n){"use strict";var r=n(28),o=n(2),a=n(112),i=n(119),l=n(34),s=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(l(e)),n=i.f;return n?s(t,n(e)):t}},function(e,t,n){"use strict";var r=n(113),o=n(118).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";var r=n(2),o=n(7),a=n(27),i=n(114).indexOf,l=n(60),s=r([].push);e.exports=function(e,t){var n,r=a(e),c=0,u=[];for(n in r)!o(l,n)&&o(r,n)&&s(u,n);for(;t.length>c;)o(r,n=t[c++])&&(~i(u,n)||s(u,n));return u}},function(e,t,n){"use strict";var r=n(27),o=n(115),a=n(35),i=function(e){return function(t,n,i){var l,s=r(t),c=a(s),u=o(i,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},function(e,t,n){"use strict";var r=n(62),o=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):a(n,t)}},function(e,t,n){"use strict";var r=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?o:r)(t)}},function(e,t,n){"use strict";var r=n(62),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(3),o=n(0),a=/#|\.prototype\./,i=function(e,t){var n=s[l(e)];return n===u||n!==c&&(o(t)?r(t):!!t)},l=i.normalize=function(e){return String(e).replace(a,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(29),o=n(33),a=n(46),i=n(35),l=TypeError,s=function(e){return function(t,n,s,c){r(n);var u=o(t),p=a(u),d=i(u),f=e?d-1:0,h=e?-1:1;if(s<2)for(;;){if(f in p){c=p[f],f+=h;break}if(f+=h,e?f<0:d<=f)throw l("Reduce of empty array with no initial value")}for(;e?f>=0:d>f;f+=h)f in p&&(c=n(c,p[f],f,u));return c}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){"use strict";var r=n(1),o=n(16);e.exports="process"===o(r.process)},function(e,t,n){"use strict";var r=n(5),o=n(125),a=TypeError,i=Object.getOwnPropertyDescriptor,l=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(o(e)&&!i(e,"length").writable)throw a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},function(e,t,n){"use strict";var r=n(16);e.exports=Array.isArray||function(e){return"Array"===r(e)}},function(e,t,n){"use strict";var r=TypeError;e.exports=function(e){if(e>9007199254740991)throw r("Maximum allowed index exceeded");return e}},function(e,t,n){"use strict";var r=n(23),o=n(1),a=n(128),i=n(129),l=o.WebAssembly,s=7!==Error("e",{cause:7}).cause,c=function(e,t){var n={};n[e]=i(e,t,s),r({global:!0,constructor:!0,arity:1,forced:s},n)},u=function(e,t){if(l&&l[e]){var n={};n[e]=i("WebAssembly."+e,t,s),r({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:s},n)}};c("Error",(function(e){return function(t){return a(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return a(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return a(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return a(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return a(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return a(e,this,arguments)}})),c("URIError",(function(e){return function(t){return a(e,this,arguments)}})),u("CompileError",(function(e){return function(t){return a(e,this,arguments)}})),u("LinkError",(function(e){return function(t){return a(e,this,arguments)}})),u("RuntimeError",(function(e){return function(t){return a(e,this,arguments)}}))},function(e,t,n){"use strict";var r=n(25),o=Function.prototype,a=o.apply,i=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?i.bind(a):function(){return i.apply(a,arguments)})},function(e,t,n){"use strict";var r=n(28),o=n(7),a=n(12),i=n(52),l=n(63),s=n(61),c=n(132),u=n(133),p=n(134),d=n(137),f=n(138),h=n(5),m=n(57);e.exports=function(e,t,n,v){var g=v?2:1,_=e.split("."),y=_[_.length-1],b=r.apply(null,_);if(b){var k=b.prototype;if(!m&&o(k,"cause")&&delete k.cause,!n)return b;var w=r("Error"),P=t((function(e,t){var n=p(v?t:e,void 0),r=v?new b(e):new b;return void 0!==n&&a(r,"message",n),f(r,P,r.stack,2),this&&i(k,this)&&u(r,this,P),arguments.length>g&&d(r,arguments[g]),r}));if(P.prototype=k,"Error"!==y?l?l(P,w):s(P,w,{name:!0}):h&&"stackTraceLimit"in b&&(c(P,b,"stackTraceLimit"),c(P,b,"prepareStackTrace")),s(P,b),!m)try{k.name!==y&&a(k,"name",y),k.constructor=P}catch(e){}return P}}},function(e,t,n){"use strict";var r=n(2),o=n(29);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},function(e,t,n){"use strict";var r=n(0),o=String,a=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw a("Can't set "+o(e)+" as a prototype")}},function(e,t,n){"use strict";var r=n(15).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},function(e,t,n){"use strict";var r=n(0),o=n(8),a=n(63);e.exports=function(e,t,n){var i,l;return a&&r(i=t.constructor)&&i!==n&&o(l=i.prototype)&&l!==n.prototype&&a(e,l),e}},function(e,t,n){"use strict";var r=n(93);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},function(e,t,n){"use strict";var r=n(136),o=n(0),a=n(16),i=n(30)("toStringTag"),l=Object,s="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),i))?n:s?a(t):"Object"===(r=a(t))&&o(t.callee)?"Arguments":r}},function(e,t,n){"use strict";var r={};r[n(30)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(8),o=n(12);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},function(e,t,n){"use strict";var r=n(12),o=n(139),a=n(140),i=Error.captureStackTrace;e.exports=function(e,t,n,l){a&&(i?i(e,t):r(e,"stack",o(n,l)))}},function(e,t,n){"use strict";var r=n(2),o=Error,a=r("".replace),i=String(o("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,s=l.test(i);e.exports=function(e,t){if(s&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=a(e,l,"");return e}},function(e,t,n){"use strict";var r=n(3),o=n(26);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},function(e,t,n){var r=n(64),o=n(142);e.exports=function e(t,n,a,i,l){var s=-1,c=t.length;for(a||(a=o),l||(l=[]);++s0&&a(u)?n>1?e(u,n-1,a,i,l):r(l,u):i||(l[l.length]=u)}return l}},function(e,t,n){var r=n(13),o=n(36),a=n(4),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||o(e)||!!(i&&e&&e[i])}},function(e,t,n){var r=n(11),o=n(10);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t,n){var r=n(13),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(147),o=n(203),a=n(44),i=n(4),l=n(213);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):l(e)}},function(e,t,n){var r=n(148),o=n(202),a=n(82);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(66),o=n(70);e.exports=function(e,t,n,a){var i=n.length,l=i,s=!a;if(null==e)return!l;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i-1}},function(e,t,n){var r=n(18);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(17);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(17),o=n(37),a=n(39);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(160),a=n(38),i=n(69),l=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,u=s.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?d:l).test(i(e))}},function(e,t,n){var r,o=n(161),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(6)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(164),o=n(17),a=n(37);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(165),o=n(166),a=n(167),i=n(168),l=n(169);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(72),o=n(225),a=n(230),i=n(73),l=n(231),s=n(40);e.exports=function(e,t,n){var c=-1,u=o,p=e.length,d=!0,f=[],h=f;if(n)d=!1,u=a;else if(p>=200){var m=t?null:l(e);if(m)return s(m);d=!1,u=i,h=new r}else h=t?[]:f;e:for(;++c-1}},function(e,t,n){var r=n(227),o=n(228),a=n(229);e.exports=function(e,t,n){return t==t?a(e,t,n):r(e,o,n)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a=0&&Math.floor(t)===t&&isFinite(e)}function m(e){return i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function v(e){return null==e?"":Array.isArray(e)||d(e)&&e.toString===p?JSON.stringify(e,null,2):String(e)}function g(e){var t=parseFloat(e);return isNaN(t)?e:t}function _(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o-1)return e.splice(r,1)}}var k=Object.prototype.hasOwnProperty;function w(e,t){return k.call(e,t)}function P(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var x=/-(\w)/g,E=P((function(e){return e.replace(x,(function(e,t){return t?t.toUpperCase():""}))})),C=P((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),T=/\B([A-Z])/g,j=P((function(e){return e.replace(T,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function M(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function L(e,t){for(var n in t)e[n]=t[n];return e}function R(e){for(var t={},n=0;n0,Q=K&&K.indexOf("edge/")>0;K&&K.indexOf("android");var X=K&&/iphone|ipad|ipod|ios/.test(K);K&&/chrome\/\d+/.test(K),K&&/phantomjs/.test(K);var ee,te=K&&K.match(/firefox\/(\d+)/),ne={}.watch,re=!1;if(W)try{var oe={};Object.defineProperty(oe,"passive",{get:function(){re=!0}}),window.addEventListener("test-passive",null,oe)}catch(e){}var ae=function(){return void 0===ee&&(ee=!W&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),ee},ie=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function le(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ce="undefined"!=typeof Symbol&&le(Symbol)&&"undefined"!=typeof Reflect&&le(Reflect.ownKeys);se="undefined"!=typeof Set&&le(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ue=null;function pe(e){void 0===e&&(e=null),e||ue&&ue._scope.off(),ue=e,e&&e._scope.on()}var de=function(){function e(e,t,n,r,o,a,i,l){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=a,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=i,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=l,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),fe=function(e){void 0===e&&(e="");var t=new de;return t.text=e,t.isComment=!0,t};function he(e){return new de(void 0,void 0,void 0,String(e))}function me(e){var t=new de(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ve=0,ge=[],_e=function(){function e(){this._pending=!1,this.id=ve++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){this.subs[this.subs.indexOf(e)]=null,this._pending||(this._pending=!0,ge.push(this))},e.prototype.depend=function(t){e.target&&e.target.addDep(this)},e.prototype.notify=function(e){var t=this.subs.filter((function(e){return e}));for(var n=0,r=t.length;n0&&(Ke((c=e(c,"".concat(n||"","_").concat(r)))[0])&&Ke(p)&&(d[u]=he(p.text+c[0].text),c.shift()),d.push.apply(d,c)):s(c)?Ke(p)?d[u]=he(p.text+c):""!==c&&d.push(he(c)):Ke(c)&&Ke(p)?d[u]=he(p.text+c.text):(l(t._isVList)&&i(c.tag)&&a(c.key)&&i(n)&&(c.key="__vlist".concat(n,"_").concat(r,"__")),d.push(c)));return d}(e):void 0}function Ke(e){return i(e)&&i(e.text)&&!1===e.isComment}function Ye(e,t){var n,r,a,l,s=null;if(o(e)||"string"==typeof e)for(s=new Array(e.length),n=0,r=e.length;n0,l=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(l&&o&&o!==r&&s===o.$key&&!i&&!o.$hasNormal)return o;for(var c in a={},t)t[c]&&"$"!==c[0]&&(a[c]=mt(e,n,c,t[c]))}else a={};for(var u in n)u in a||(a[u]=vt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=a),q(a,"$stable",l),q(a,"$key",s),q(a,"$hasNormal",i),a}function mt(e,t,n,r){var a=function(){var t=ue;pe(e);var n=arguments.length?r.apply(null,arguments):r({}),a=(n=n&&"object"==typeof n&&!o(n)?[n]:We(n))&&n[0];return pe(t),n&&(!a||1===n.length&&a.isComment&&!ft(a))?void 0:n};return r.proxy&&Object.defineProperty(t,n,{get:a,enumerable:!0,configurable:!0}),a}function vt(e,t){return function(){return e[t]}}function gt(e){return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};q(t,"_v_attr_proxy",!0),_t(t,e.$attrs,r,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||_t(e._listenersProxy={},e.$listeners,r,e,"$listeners");return e._listenersProxy},get slots(){return function(e){e._slotsProxy||bt(e._slotsProxy={},e.$scopedSlots);return e._slotsProxy}(e)},emit:S(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return Fe(e,t,n)}))}}}function _t(e,t,n,r,o){var a=!1;for(var i in t)i in e?t[i]!==n[i]&&(a=!0):(a=!0,yt(e,i,r,o));for(var i in e)i in t||(a=!0,delete e[i]);return a}function yt(e,t,n,r){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return n[r][t]}})}function bt(e,t){for(var n in t)e[n]=t[n];for(var n in e)n in t||delete e[n]}var kt=null;function wt(e,t){return(e.__esModule||ce&&"Module"===e[Symbol.toStringTag])&&(e=e.default),u(e)?t.extend(e):e}function Pt(e){if(o(e))for(var t=0;tdocument.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}var un=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function pn(){var e,t;for(ln=sn(),on=!0,en.sort(un),an=0;anan&&en[n].id>e.id;)n--;en.splice(n+1,0,e)}else en.push(e);rn||(rn=!0,Nt(pn))}}function fn(e,t){if(e){for(var n=Object.create(null),r=ce?Reflect.ownKeys(e):Object.keys(e),o=0;o-1)if(a&&!w(o,"default"))i=!1;else if(""===i||i===j(e)){var s=$n(String,o.type);(s<0||l-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Yn(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var a in n){var i=n[a];if(i){var l=i.name;l&&!t(l)&&Zn(n,a,r,o)}}}function Zn(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,b(n,t)}Jn.prototype._init=function(e){var t=this;t._uid=Vn++,t._isVue=!0,t.__v_skip=!0,t._scope=new Be(!0),t._scope._vm=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Sn(qn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._provided=n?n._provided:Object.create(null),e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Wt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,o=n&&n.context;e.$slots=pt(t._renderChildren,o),e.$scopedSlots=n?ht(e.$parent,n.data.scopedSlots,e.$slots):r,e._c=function(t,n,r,o){return xt(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return xt(e,t,n,r,o,!0)};var a=n&&n.data;Le(e,"$attrs",a&&a.attrs||r,null,!0),Le(e,"$listeners",t._parentListeners||r,null,!0)}(t),Xt(t,"beforeCreate",void 0,!1),function(e){var t=fn(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach((function(n){Le(e,n,t[n])})),Te(!0))}(t),Nn(t),function(e){var t=e.$options.provide;if(t){var n=c(t)?t.call(e):t;if(!u(n))return;for(var r=Ue(e),o=ce?Reflect.ownKeys(n):Object.keys(n),a=0;a1?M(n):n;for(var r=M(arguments,1),o='event handler for "'.concat(e,'"'),a=0,i=n.length;aparseInt(this.max)&&Zn(e,t[0],t,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Zn(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){Yn(e,(function(e){return Kn(t,e)}))})),this.$watch("exclude",(function(t){Yn(e,(function(e){return!Kn(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=Pt(e),n=t&&t.componentOptions;if(n){var r=Wn(n),o=this.include,a=this.exclude;if(o&&(!r||!Kn(o,r))||a&&r&&Kn(a,r))return t;var i=this.cache,l=this.keys,s=null==t.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):t.key;i[s]?(t.componentInstance=i[s].componentInstance,b(l,s),l.push(s)):(this.vnodeToCache=t,this.keyToCache=s),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:wn,extend:L,mergeOptions:Sn,defineReactive:Le},e.set=Re,e.delete=Oe,e.nextTick=Nt,e.observable=function(e){return Me(e),e},e.options=Object.create(null),z.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,L(e.options.components,Xn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=M(arguments,1);return n.unshift(this),c(e.install)?e.install.apply(e,n):c(e)&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Sn(this.options,e),this}}(e),Gn(e),function(e){z.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&d(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&c(n)&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Jn),Object.defineProperty(Jn.prototype,"$isServer",{get:ae}),Object.defineProperty(Jn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Jn,"FunctionalRenderContext",{value:hn}),Jn.version="2.7.14";var er=_("style,class"),tr=_("input,textarea,option,select,progress"),nr=_("contenteditable,draggable,spellcheck"),rr=_("events,caret,typing,plaintext-only"),or=_("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),ar="http://www.w3.org/1999/xlink",ir=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},lr=function(e){return ir(e)?e.slice(6,e.length):""},sr=function(e){return null==e||!1===e};function cr(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=ur(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=ur(t,n.data));return function(e,t){if(i(e)||i(t))return pr(e,dr(t));return""}(t.staticClass,t.class)}function ur(e,t){return{staticClass:pr(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function pr(e,t){return e?t?e+" "+t:e:t||""}function dr(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r-1?Ir(e,t,n):or(t)?sr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):nr(t)?e.setAttribute(t,function(e,t){return sr(t)||"false"===t?"false":"contenteditable"===e&&rr(t)?t:"true"}(t,n)):ir(t)?sr(n)?e.removeAttributeNS(ar,lr(t)):e.setAttributeNS(ar,t,n):Ir(e,t,n)}function Ir(e,t,n){if(sr(n))e.removeAttribute(t);else{if(Y&&!Z&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Dr={create:Ar,update:Ar};function Nr(e,t){var n=t.elm,r=t.data,o=e.data;if(!(a(r.staticClass)&&a(r.class)&&(a(o)||a(o.staticClass)&&a(o.class)))){var l=cr(t),s=n._transitionClasses;i(s)&&(l=pr(l,dr(s))),l!==n._prevClass&&(n.setAttribute("class",l),n._prevClass=l)}}var Fr,zr={create:Nr,update:Nr};function Br(e,t,n){var r=Fr;return function o(){var a=t.apply(null,arguments);null!==a&&Vr(e,o,n,r)}}var Ur=Mt&&!(te&&Number(te[1])<=53);function Hr(e,t,n,r){if(Ur){var o=ln,a=t;t=a._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return a.apply(this,arguments)}}Fr.addEventListener(e,t,re?{capture:n,passive:r}:n)}function Vr(e,t,n,r){(r||Fr).removeEventListener(e,t._wrapper||t,n)}function qr(e,t){if(!a(e.data.on)||!a(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Fr=t.elm||e.elm,function(e){if(i(e.__r)){var t=Y?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}i(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),qe(n,r,Hr,Vr,Br,t.context),Fr=void 0}}var Jr,Gr={create:qr,update:qr,destroy:function(e){return qr(e,Pr)}};function Wr(e,t){if(!a(e.data.domProps)||!a(t.data.domProps)){var n,r,o=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in(i(c.__ob__)||l(c._v_attr_proxy))&&(c=t.data.domProps=L({},c)),s)n in c||(o[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var u=a(r)?"":String(r);Kr(o,u)&&(o.value=u)}else if("innerHTML"===n&&mr(o.tagName)&&a(o.innerHTML)){(Jr=Jr||document.createElement("div")).innerHTML="".concat(r,"");for(var p=Jr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;p.firstChild;)o.appendChild(p.firstChild)}else if(r!==s[n])try{o[n]=r}catch(e){}}}}function Kr(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return g(n)!==g(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var Yr={create:Wr,update:Wr},Zr=P((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Qr(e){var t=Xr(e.style);return e.staticStyle?L(e.staticStyle,t):t}function Xr(e){return Array.isArray(e)?R(e):"string"==typeof e?Zr(e):e}var eo,to=/^--/,no=/\s*!important$/,ro=function(e,t,n){if(to.test(t))e.style.setProperty(t,n);else if(no.test(n))e.style.setProperty(j(t),n.replace(no,""),"important");else{var r=ao(t);if(Array.isArray(n))for(var o=0,a=n.length;o-1?t.split(so).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" ".concat(e.getAttribute("class")||""," ");n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function uo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(so).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" ".concat(e.getAttribute("class")||""," "),r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function po(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&L(t,fo(e.name||"v")),L(t,e),t}return"string"==typeof e?fo(e):void 0}}var fo=P((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),ho=W&&!Z,mo="transition",vo="transitionend",go="animation",_o="animationend";ho&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(mo="WebkitTransition",vo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(go="WebkitAnimation",_o="webkitAnimationEnd"));var yo=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function bo(e){yo((function(){yo(e)}))}function ko(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),co(e,t))}function wo(e,t){e._transitionClasses&&b(e._transitionClasses,t),uo(e,t)}function Po(e,t,n){var r=Eo(e,t),o=r.type,a=r.timeout,i=r.propCount;if(!o)return n();var l="transition"===o?vo:_o,s=0,c=function(){e.removeEventListener(l,u),n()},u=function(t){t.target===e&&++s>=i&&c()};setTimeout((function(){s0&&(n="transition",u=i,p=a.length):"animation"===t?c>0&&(n="animation",u=c,p=s.length):p=(n=(u=Math.max(i,c))>0?i>c?"transition":"animation":null)?"transition"===n?a.length:s.length:0,{type:n,timeout:u,propCount:p,hasTransform:"transition"===n&&xo.test(r[mo+"Property"])}}function Co(e,t){for(;e.length1}function Ro(e,t){!0!==t.data.show&&jo(t)}var Oo=function(e){var t,n,r={},c=e.modules,u=e.nodeOps;for(t=0;th?b(e,a(n[g+1])?null:n[g+1].elm,n,f,g,r):f>g&&w(t,p,h)}(p,m,g,n,c):i(g)?(i(e.text)&&u.setTextContent(p,""),b(p,null,g,0,g.length-1,n)):i(m)?w(m,0,m.length-1):i(e.text)&&u.setTextContent(p,""):e.text!==t.text&&u.setTextContent(p,t.text),i(h)&&i(f=h.hook)&&i(f=f.postpatch)&&f(e,t)}}}function C(e,t,n){if(l(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r-1,i.selected!==a&&(i.selected=a);else if(I(No(i),r))return void(e.selectedIndex!==l&&(e.selectedIndex=l));o||(e.selectedIndex=-1)}}function Do(e,t){return t.every((function(t){return!I(t,e)}))}function No(e){return"_value"in e?e._value:e.value}function Fo(e){e.target.composing=!0}function zo(e){e.target.composing&&(e.target.composing=!1,Bo(e.target,"input"))}function Bo(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Uo(e){return!e.componentInstance||e.data&&e.data.transition?e:Uo(e.componentInstance._vnode)}var Ho={model:Ao,show:{bind:function(e,t,n){var r=t.value,o=(n=Uo(n)).data&&n.data.transition,a=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,jo(n,(function(){e.style.display=a}))):e.style.display=r?a:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Uo(n)).data&&n.data.transition?(n.data.show=!0,r?jo(n,(function(){e.style.display=e.__vOriginalDisplay})):So(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}}},Vo={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function qo(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?qo(Pt(t.children)):e}function Jo(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var r in o)t[E(r)]=o[r];return t}function Go(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Wo=function(e){return e.tag||ft(e)},Ko=function(e){return"show"===e.name},Yo={name:"transition",props:Vo,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(Wo)).length){0;var r=this.mode;0;var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=qo(o);if(!a)return o;if(this._leaving)return Go(e,o);var i="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?i+"comment":i+a.tag:s(a.key)?0===String(a.key).indexOf(i)?a.key:i+a.key:a.key;var l=(a.data||(a.data={})).transition=Jo(this),c=this._vnode,u=qo(c);if(a.data.directives&&a.data.directives.some(Ko)&&(a.data.show=!0),u&&u.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,u)&&!ft(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var p=u.data.transition=L({},l);if("out-in"===r)return this._leaving=!0,Je(p,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Go(e,o);if("in-out"===r){if(ft(a))return c;var d,f=function(){d()};Je(l,"afterEnter",f),Je(l,"enterCancelled",f),Je(p,"delayLeave",(function(e){d=e}))}}return o}}},Zo=L({tag:String,moveClass:String},Vo);function Qo(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Xo(e){e.data.newPos=e.elm.getBoundingClientRect()}function ea(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var a=e.elm.style;a.transform=a.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),a.transitionDuration="0s"}}delete Zo.mode;var ta={Transition:Yo,TransitionGroup:{props:Zo,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var o=Yt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],a=this.children=[],i=Jo(this),l=0;l-1?gr[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:gr[e]=/HTMLUnknownElement/.test(t.toString())},L(Jn.options.directives,Ho),L(Jn.options.components,ta),Jn.prototype.__patch__=W?Oo:O,Jn.prototype.$mount=function(e,t){return function(e,t,n){var r;e.$el=t,e.$options.render||(e.$options.render=fe),Xt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new Vt(e,r,O,{before:function(){e._isMounted&&!e._isDestroyed&&Xt(e,"beforeUpdate")}},!0),n=!1;var o=e._preWatchers;if(o)for(var a=0;a=0&&(t=e.slice(r),e=e.slice(0,r));var o=e.indexOf("?");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{path:e,query:n,hash:t}}(o.path||""),c=t&&t.path||"/",u=s.path?wa(s.path,c,n||o.append):c,p=function(e,t,n){void 0===t&&(t={});var r,o=n||ca;try{r=o(e||"")}catch(e){r={}}for(var a in t){var i=t[a];r[a]=Array.isArray(i)?i.map(sa):sa(i)}return r}(s.query,o.query,r&&r.options.parseQuery),d=o.hash||s.hash;return d&&"#"!==d.charAt(0)&&(d="#"+d),{_normalized:!0,path:u,query:p,hash:d}}var Ha,Va=function(){},qa={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,o=n.resolve(this.to,r,this.append),a=o.location,i=o.route,l=o.href,s={},c=n.options.linkActiveClass,u=n.options.linkExactActiveClass,p=null==c?"router-link-active":c,d=null==u?"router-link-exact-active":u,f=null==this.activeClass?p:this.activeClass,h=null==this.exactActiveClass?d:this.exactActiveClass,m=i.redirectedFrom?da(null,Ua(i.redirectedFrom),null,n):i;s[h]=ga(r,m,this.exactPath),s[f]=this.exact||this.exactPath?s[h]:function(e,t){return 0===e.path.replace(pa,"/").indexOf(t.path.replace(pa,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,m);var v=s[h]?this.ariaCurrentValue:null,g=function(e){Ja(e)&&(t.replace?n.replace(a,Va):n.push(a,Va))},_={click:Ja};Array.isArray(this.event)?this.event.forEach((function(e){_[e]=g})):_[this.event]=g;var y={class:s},b=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:l,route:i,navigate:g,isActive:s[f],isExactActive:s[h]});if(b){if(1===b.length)return b[0];if(b.length>1||!b.length)return 0===b.length?e():e("span",{},b)}if("a"===this.tag)y.on=_,y.attrs={href:l,"aria-current":v};else{var k=function e(t){var n;if(t)for(var r=0;r-1&&(l.params[d]=n.params[d]);return l.path=Ba(u.path,l.params),s(u,l,i)}if(l.path){l.params={};for(var f=0;f-1}function Pi(e,t){return wi(e)&&e._isRouter&&(null==t||e.type===t)}function xi(e,t,n){var r=function(o){o>=e.length?n():e[o]?t(e[o],(function(){r(o+1)})):r(o+1)};r(0)}function Ei(e){return function(t,n,r){var o=!1,a=0,i=null;Ci(e,(function(e,t,n,l){if("function"==typeof e&&void 0===e.cid){o=!0,a++;var s,c=Si((function(t){var o;((o=t).__esModule||ji&&"Module"===o[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:Ha.extend(t),n.components[l]=t,--a<=0&&r()})),u=Si((function(e){var t="Failed to resolve async component "+l+": "+e;i||(i=wi(e)?e:new Error(t),r(i))}));try{s=e(c,u)}catch(e){u(e)}if(s)if("function"==typeof s.then)s.then(c,u);else{var p=s.component;p&&"function"==typeof p.then&&p.then(c,u)}}})),o||r()}}function Ci(e,t){return Ti(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function Ti(e){return Array.prototype.concat.apply([],e)}var ji="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Si(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var Mi=function(e,t){this.router=e,this.base=function(e){if(!e)if(Ga){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=ha,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Li(e,t,n,r){var o=Ci(e,(function(e,r,o,a){var i=function(e,t){"function"!=typeof e&&(e=Ha.extend(e));return e.options[t]}(e,t);if(i)return Array.isArray(i)?i.map((function(e){return n(e,r,o,a)})):n(i,r,o,a)}));return Ti(r?o.reverse():o)}function Ri(e,t){if(t)return function(){return e.apply(t,arguments)}}Mi.prototype.listen=function(e){this.cb=e},Mi.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},Mi.prototype.onError=function(e){this.errorCbs.push(e)},Mi.prototype.transitionTo=function(e,t,n){var r,o=this;try{r=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var a=this.current;this.confirmTransition(r,(function(){o.updateRoute(r),t&&t(r),o.ensureURL(),o.router.afterHooks.forEach((function(e){e&&e(r,a)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(e){e(r)})))}),(function(e){n&&n(e),e&&!o.ready&&(Pi(e,gi.redirected)&&a===ha||(o.ready=!0,o.readyErrorCbs.forEach((function(t){t(e)}))))}))},Mi.prototype.confirmTransition=function(e,t,n){var r=this,o=this.current;this.pending=e;var a,i,l=function(e){!Pi(e)&&wi(e)&&(r.errorCbs.length?r.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},s=e.matched.length-1,c=o.matched.length-1;if(ga(e,o)&&s===c&&e.matched[s]===o.matched[c])return this.ensureURL(),e.hash&&ai(this.router,o,e,!1),l(((i=bi(a=o,e,gi.duplicated,'Avoided redundant navigation to current location: "'+a.fullPath+'".')).name="NavigationDuplicated",i));var u=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n0)){var t=this.router,n=t.options.scrollBehavior,r=hi&&n;r&&this.listeners.push(oi());var o=function(){var n=e.current,o=Ai(e.base);e.current===ha&&o===e._startLocation||e.transitionTo(o,(function(e){r&&ai(t,e,n,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){mi(Pa(r.base+e.fullPath)),ai(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){vi(Pa(r.base+e.fullPath)),ai(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(Ai(this.base)!==this.current.fullPath){var t=Pa(this.base+this.current.fullPath);e?mi(t):vi(t)}},t.prototype.getCurrentLocation=function(){return Ai(this.base)},t}(Mi);function Ai(e){var t=window.location.pathname,n=t.toLowerCase(),r=e.toLowerCase();return!e||n!==r&&0!==n.indexOf(Pa(r+"/"))||(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var $i=function(e){function t(t,n,r){e.call(this,t,n),r&&function(e){var t=Ai(e);if(!/^\/#/.test(t))return window.location.replace(Pa(e+"/#"+t)),!0}(this.base)||Ii()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=hi&&t;n&&this.listeners.push(oi());var r=function(){var t=e.current;Ii()&&e.transitionTo(Di(),(function(r){n&&ai(e.router,r,t,!0),hi||zi(r.fullPath)}))},o=hi?"popstate":"hashchange";window.addEventListener(o,r),this.listeners.push((function(){window.removeEventListener(o,r)}))}},t.prototype.push=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){Fi(e.fullPath),ai(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,o=this.current;this.transitionTo(e,(function(e){zi(e.fullPath),ai(r.router,e,o,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;Di()!==t&&(e?Fi(t):zi(t))},t.prototype.getCurrentLocation=function(){return Di()},t}(Mi);function Ii(){var e=Di();return"/"===e.charAt(0)||(zi("/"+e),!1)}function Di(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function Ni(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function Fi(e){hi?mi(Ni(e)):window.location.hash=e}function zi(e){hi?vi(Ni(e)):window.location.replace(Ni(e))}var Bi=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach((function(t){t&&t(r,e)}))}),(function(e){Pi(e,gi.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(Mi),Ui=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ya(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!hi&&!1!==e.fallback,this.fallback&&(t="hash"),Ga||(t="abstract"),this.mode=t,t){case"history":this.history=new Oi(this,e.base);break;case"hash":this.history=new $i(this,e.base,this.fallback);break;case"abstract":this.history=new Bi(this,e.base);break;default:0}},Hi={currentRoute:{configurable:!0}};Ui.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},Hi.currentRoute.get=function(){return this.history&&this.history.current},Ui.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof Oi||n instanceof $i){var r=function(e){n.setupListeners(),function(e){var r=n.current,o=t.options.scrollBehavior;hi&&o&&"fullPath"in e&&ai(t,e,r,!1)}(e)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},Ui.prototype.beforeEach=function(e){return qi(this.beforeHooks,e)},Ui.prototype.beforeResolve=function(e){return qi(this.resolveHooks,e)},Ui.prototype.afterEach=function(e){return qi(this.afterHooks,e)},Ui.prototype.onReady=function(e,t){this.history.onReady(e,t)},Ui.prototype.onError=function(e){this.history.onError(e)},Ui.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},Ui.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},Ui.prototype.go=function(e){this.history.go(e)},Ui.prototype.back=function(){this.go(-1)},Ui.prototype.forward=function(){this.go(1)},Ui.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},Ui.prototype.resolve=function(e,t,n){var r=Ua(e,t=t||this.history.current,n,this),o=this.match(r,t),a=o.redirectedFrom||o.fullPath;return{location:r,route:o,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?Pa(e+"/"+r):r}(this.history.base,a,this.mode),normalizedTo:r,resolved:o}},Ui.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ui.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==ha&&this.history.transitionTo(this.history.getCurrentLocation())},Ui.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==ha&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ui.prototype,Hi);var Vi=Ui;function qi(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}Ui.install=function e(t){if(!e.installed||Ha!==t){e.installed=!0,Ha=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",ba),t.component("RouterLink",qa);var o=t.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Ui.version="3.6.5",Ui.isNavigationFailure=Pi,Ui.NavigationFailureType=gi,Ui.START_LOCATION=ha,Ga&&window.Vue&&window.Vue.use(Ui);n(97);n(90),n(127);var Ji={"components/AlgoliaSearchBox":()=>Promise.all([n.e(0),n.e(13)]).then(n.bind(null,297)),"components/DropdownLink":()=>Promise.all([n.e(0),n.e(14)]).then(n.bind(null,254)),"components/DropdownTransition":()=>Promise.all([n.e(0),n.e(19)]).then(n.bind(null,242)),"components/Home":()=>Promise.all([n.e(0),n.e(16)]).then(n.bind(null,280)),"components/NavLink":()=>n.e(21).then(n.bind(null,241)),"components/NavLinks":()=>Promise.all([n.e(0),n.e(12)]).then(n.bind(null,265)),"components/Navbar":()=>Promise.all([n.e(0),n.e(1)]).then(n.bind(null,294)),"components/Page":()=>Promise.all([n.e(0),n.e(11)]).then(n.bind(null,281)),"components/PageEdit":()=>Promise.all([n.e(0),n.e(17)]).then(n.bind(null,267)),"components/PageNav":()=>Promise.all([n.e(0),n.e(15)]).then(n.bind(null,268)),"components/Sidebar":()=>Promise.all([n.e(0),n.e(10)]).then(n.bind(null,282)),"components/SidebarButton":()=>Promise.all([n.e(0),n.e(20)]).then(n.bind(null,283)),"components/SidebarGroup":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,266)),"components/SidebarLink":()=>Promise.all([n.e(0),n.e(18)]).then(n.bind(null,255)),"components/SidebarLinks":()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,253)),"global-components/Badge":()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,302)),"global-components/CodeBlock":()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,298)),"global-components/CodeGroup":()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,299)),"layouts/404":()=>n.e(7).then(n.bind(null,300)),"layouts/Layout":()=>Promise.all([n.e(0),n.e(1),n.e(2)]).then(n.bind(null,301)),NotFound:()=>n.e(7).then(n.bind(null,300)),Layout:()=>Promise.all([n.e(0),n.e(1),n.e(2)]).then(n.bind(null,301))},Gi={"v-69b4a7b0":()=>n.e(23).then(n.bind(null,303)),"v-191607df":()=>n.e(22).then(n.bind(null,304)),"v-8fd167b8":()=>n.e(24).then(n.bind(null,305)),"v-4d1ecdfc":()=>n.e(26).then(n.bind(null,306)),"v-970291c8":()=>n.e(25).then(n.bind(null,307)),"v-6c65917f":()=>n.e(27).then(n.bind(null,308)),"v-766966e0":()=>n.e(28).then(n.bind(null,309)),"v-10fff4f8":()=>n.e(29).then(n.bind(null,310)),"v-571ed7c8":()=>n.e(30).then(n.bind(null,311)),"v-7661b588":()=>n.e(31).then(n.bind(null,312)),"v-7a2d91dc":()=>n.e(32).then(n.bind(null,313)),"v-4c9cdea0":()=>n.e(33).then(n.bind(null,314)),"v-33679fbf":()=>n.e(34).then(n.bind(null,315)),"v-5a496e50":()=>n.e(35).then(n.bind(null,316)),"v-5a6b1178":()=>n.e(36).then(n.bind(null,317)),"v-c7deefc8":()=>n.e(37).then(n.bind(null,318)),"v-cac29d88":()=>n.e(38).then(n.bind(null,319)),"v-3208f5dc":()=>n.e(39).then(n.bind(null,320)),"v-b668bf40":()=>n.e(40).then(n.bind(null,321)),"v-8fd8ad82":()=>n.e(41).then(n.bind(null,322)),"v-689d84d0":()=>n.e(42).then(n.bind(null,323)),"v-8b5d2478":()=>n.e(43).then(n.bind(null,324)),"v-685effc8":()=>n.e(44).then(n.bind(null,325)),"v-58588d88":()=>n.e(45).then(n.bind(null,326)),"v-01f08ddc":()=>n.e(46).then(n.bind(null,327)),"v-40d51240":()=>n.e(47).then(n.bind(null,328)),"v-5c3471ff":()=>n.e(48).then(n.bind(null,329)),"v-7eb067e0":()=>n.e(49).then(n.bind(null,330)),"v-6cd22504":()=>n.e(50).then(n.bind(null,331)),"v-39f487c8":()=>n.e(51).then(n.bind(null,332)),"v-5e50fd3c":()=>n.e(52).then(n.bind(null,333)),"v-820ecc48":()=>n.e(53).then(n.bind(null,334)),"v-21d6c3c0":()=>n.e(54).then(n.bind(null,335)),"v-a1282abe":()=>n.e(55).then(n.bind(null,336)),"v-5b0b98ee":()=>n.e(56).then(n.bind(null,337)),"v-817d1f3c":()=>n.e(57).then(n.bind(null,338)),"v-7424eabc":()=>n.e(58).then(n.bind(null,339)),"v-09842ac8":()=>n.e(59).then(n.bind(null,340)),"v-61a8d7fc":()=>n.e(60).then(n.bind(null,341)),"v-1babb004":()=>n.e(61).then(n.bind(null,342)),"v-50a6b796":()=>n.e(63).then(n.bind(null,343)),"v-27cead0a":()=>n.e(64).then(n.bind(null,344)),"v-8f897388":()=>n.e(65).then(n.bind(null,345)),"v-531541c8":()=>n.e(66).then(n.bind(null,346)),"v-b29c0508":()=>n.e(67).then(n.bind(null,347)),"v-54dafab4":()=>n.e(68).then(n.bind(null,348)),"v-6be406f8":()=>n.e(71).then(n.bind(null,349)),"v-e7fd37c8":()=>n.e(72).then(n.bind(null,350)),"v-6a7821dc":()=>n.e(74).then(n.bind(null,351)),"v-4b475588":()=>n.e(73).then(n.bind(null,352)),"v-08a015a0":()=>n.e(75).then(n.bind(null,353)),"v-7b1d165c":()=>n.e(76).then(n.bind(null,354)),"v-168e0fc0":()=>n.e(77).then(n.bind(null,355)),"v-25fc24b2":()=>n.e(78).then(n.bind(null,356)),"v-783e0330":()=>n.e(79).then(n.bind(null,357)),"v-2b2c0d48":()=>n.e(80).then(n.bind(null,358)),"v-557c109c":()=>n.e(81).then(n.bind(null,359)),"v-90024e88":()=>n.e(82).then(n.bind(null,360)),"v-3f975df9":()=>n.e(62).then(n.bind(null,361)),"v-7da4645c":()=>n.e(83).then(n.bind(null,362)),"v-49c21478":()=>n.e(84).then(n.bind(null,363)),"v-95118182":()=>n.e(85).then(n.bind(null,364)),"v-6b232260":()=>n.e(86).then(n.bind(null,365)),"v-eecc5078":()=>n.e(87).then(n.bind(null,366)),"v-5603601c":()=>n.e(88).then(n.bind(null,367)),"v-7425eddc":()=>n.e(90).then(n.bind(null,368)),"v-18d64d88":()=>n.e(89).then(n.bind(null,369)),"v-46d53e40":()=>n.e(91).then(n.bind(null,370)),"v-327a1fff":()=>n.e(92).then(n.bind(null,371)),"v-c88ec3e0":()=>n.e(93).then(n.bind(null,372)),"v-be9fc7c8":()=>n.e(95).then(n.bind(null,373)),"v-ef2f11f8":()=>n.e(94).then(n.bind(null,374)),"v-1eea9d3c":()=>n.e(96).then(n.bind(null,375)),"v-ae810c48":()=>n.e(97).then(n.bind(null,376)),"v-831f1fc0":()=>n.e(98).then(n.bind(null,377)),"v-6a9943bf":()=>n.e(99).then(n.bind(null,378)),"v-7c2aca50":()=>n.e(100).then(n.bind(null,379)),"v-1c3e5978":()=>n.e(101).then(n.bind(null,380)),"v-9c686fc8":()=>n.e(102).then(n.bind(null,381)),"v-03491d88":()=>n.e(103).then(n.bind(null,382)),"v-6c4b35dc":()=>n.e(104).then(n.bind(null,383)),"v-8ad20740":()=>n.e(105).then(n.bind(null,384)),"v-db879196":()=>n.e(106).then(n.bind(null,385)),"v-3ebb994c":()=>n.e(107).then(n.bind(null,386)),"v-575d6864":()=>n.e(108).then(n.bind(null,387)),"v-e3f19e08":()=>n.e(109).then(n.bind(null,388)),"v-ac978748":()=>n.e(110).then(n.bind(null,389)),"v-6921ad88":()=>n.e(111).then(n.bind(null,390)),"v-4ed6c46a":()=>n.e(112).then(n.bind(null,391)),"v-62d9ee85":()=>n.e(113).then(n.bind(null,392)),"v-6aa1d80a":()=>n.e(114).then(n.bind(null,393)),"v-94039704":()=>n.e(115).then(n.bind(null,394)),"v-664fd9fc":()=>n.e(116).then(n.bind(null,395)),"v-ef981948":()=>n.e(117).then(n.bind(null,396)),"v-5872be3c":()=>n.e(118).then(n.bind(null,397)),"v-d4c21dcc":()=>n.e(119).then(n.bind(null,398)),"v-52accb02":()=>n.e(69).then(n.bind(null,399)),"v-28440390":()=>n.e(70).then(n.bind(null,400))};function Wi(e){const t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}const Ki=/-(\w)/g,Yi=Wi(e=>e.replace(Ki,(e,t)=>t?t.toUpperCase():"")),Zi=/\B([A-Z])/g,Qi=Wi(e=>e.replace(Zi,"-$1").toLowerCase()),Xi=Wi(e=>e.charAt(0).toUpperCase()+e.slice(1));function el(e,t){if(!t)return;if(e(t))return e(t);return t.includes("-")?e(Xi(Yi(t))):e(Xi(t))||e(Qi(t))}const tl=Object.assign({},Ji,Gi),nl=e=>tl[e],rl=e=>Gi[e],ol=e=>Ji[e],al=e=>Jn.component(e);function il(e){return el(rl,e)}function ll(e){return el(ol,e)}function sl(e){return el(nl,e)}function cl(e){return el(al,e)}function ul(...e){return Promise.all(e.filter(e=>e).map(async e=>{if(!cl(e)&&sl(e)){const t=await sl(e)();Jn.component(e,t.default)}}))}function pl(e,t){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[e]=t)}var dl=n(87),fl=n.n(dl),hl=n(88),ml=n.n(hl),vl={created(){if(this.siteMeta=this.$site.headTags.filter(([e])=>"meta"===e).map(([e,t])=>t),this.$ssrContext){const t=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(e=t)?e.map(e=>{let t="{t+=` ${n}="${ml()(e[n])}"`}),t+">"}).join("\n "):"",this.$ssrContext.canonicalLink=_l(this.$canonicalUrl)}var e},mounted(){this.currentMetaTags=[...document.querySelectorAll("meta")],this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta(){document.title=this.$title,document.documentElement.lang=this.$lang;const e=this.getMergedMetaTags();this.currentMetaTags=yl(e,this.currentMetaTags)},getMergedMetaTags(){const e=this.$page.frontmatter.meta||[];return fl()([{name:"description",content:this.$description}],e,this.siteMeta,bl)},updateCanonicalLink(){gl(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",_l(this.$canonicalUrl))}},watch:{$page(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy(){yl(null,this.currentMetaTags),gl()}};function gl(){const e=document.querySelector("link[rel='canonical']");e&&e.remove()}function _l(e=""){return e?``:""}function yl(e,t){if(t&&[...t].filter(e=>e.parentNode===document.head).forEach(e=>document.head.removeChild(e)),e)return e.map(e=>{const t=document.createElement("meta");return Object.keys(e).forEach(n=>{t.setAttribute(n,e[n])}),document.head.appendChild(t),t})}function bl(e){for(const t of["name","property","itemprop"])if(e.hasOwnProperty(t))return e[t]+t;return JSON.stringify(e)}var kl=n(89),wl={mounted(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(kl)()((function(){this.setActiveHash()}),300),setActiveHash(){const e=[].slice.call(document.querySelectorAll(".sidebar-link")),t=[].slice.call(document.querySelectorAll(".header-anchor")).filter(t=>e.some(e=>e.hash===t.hash)),n=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),r=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+n;for(let e=0;e=a.parentElement.offsetTop+10&&(!i||n{this.$nextTick(()=>{this.$vuepress.$set("disableScrollBehavior",!1)})})}}}},beforeDestroy(){window.removeEventListener("scroll",this.onScroll)}},Pl=n(22),xl=n.n(Pl),El=[vl,wl,{mounted(){xl.a.configure({showSpinner:!1}),this.$router.beforeEach((e,t,n)=>{e.path===t.path||Jn.component(e.name)||xl.a.start(),n()}),this.$router.afterEach(()=>{xl.a.done(),this.isSidebarOpen=!1})}}],Cl={name:"GlobalLayout",computed:{layout(){const e=this.getLayout();return pl("layout",e),Jn.component(e)}},methods:{getLayout(){if(this.$page.path){const e=this.$page.frontmatter.layout;return e&&(this.$vuepress.getLayoutAsyncComponent(e)||this.$vuepress.getVueComponent(e))?e:"Layout"}return"NotFound"}}},Tl=n(14),jl=Object(Tl.a)(Cl,(function(){return(0,this._self._c)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(e,t,n){switch(t){case"components":e[t]||(e[t]={}),Object.assign(e[t],n);break;case"mixins":e[t]||(e[t]=[]),e[t].push(...n);break;default:throw new Error("Unknown option name.")}}(jl,"mixins",El);const Sl=[{name:"v-69b4a7b0",path:"/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-69b4a7b0").then(n)}},{name:"v-191607df",path:"/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-191607df").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-8fd167b8",path:"/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-8fd167b8").then(n)}},{name:"v-4d1ecdfc",path:"/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-4d1ecdfc").then(n)}},{name:"v-970291c8",path:"/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-970291c8").then(n)}},{name:"v-6c65917f",path:"/de_DE/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6c65917f").then(n)}},{path:"/de_DE/index.html",redirect:"/de_DE/"},{name:"v-766966e0",path:"/de_DE/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-766966e0").then(n)}},{name:"v-10fff4f8",path:"/de_DE/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-10fff4f8").then(n)}},{name:"v-571ed7c8",path:"/de_DE/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-571ed7c8").then(n)}},{name:"v-7661b588",path:"/de_DE/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7661b588").then(n)}},{name:"v-7a2d91dc",path:"/de_DE/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7a2d91dc").then(n)}},{name:"v-4c9cdea0",path:"/de_DE/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-4c9cdea0").then(n)}},{name:"v-33679fbf",path:"/es_ES/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-33679fbf").then(n)}},{path:"/es_ES/index.html",redirect:"/es_ES/"},{name:"v-5a496e50",path:"/es_ES/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5a496e50").then(n)}},{name:"v-5a6b1178",path:"/es_ES/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5a6b1178").then(n)}},{name:"v-c7deefc8",path:"/es_ES/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-c7deefc8").then(n)}},{name:"v-cac29d88",path:"/es_ES/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-cac29d88").then(n)}},{name:"v-3208f5dc",path:"/es_ES/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-3208f5dc").then(n)}},{name:"v-b668bf40",path:"/es_ES/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-b668bf40").then(n)}},{name:"v-8fd8ad82",path:"/fr_FR/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-8fd8ad82").then(n)}},{path:"/fr_FR/index.html",redirect:"/fr_FR/"},{name:"v-689d84d0",path:"/fr_FR/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-689d84d0").then(n)}},{name:"v-8b5d2478",path:"/fr_FR/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-8b5d2478").then(n)}},{name:"v-685effc8",path:"/fr_FR/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-685effc8").then(n)}},{name:"v-58588d88",path:"/fr_FR/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-58588d88").then(n)}},{name:"v-01f08ddc",path:"/fr_FR/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-01f08ddc").then(n)}},{name:"v-40d51240",path:"/fr_FR/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-40d51240").then(n)}},{name:"v-5c3471ff",path:"/it_IT/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5c3471ff").then(n)}},{path:"/it_IT/index.html",redirect:"/it_IT/"},{name:"v-7eb067e0",path:"/it_IT/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7eb067e0").then(n)}},{name:"v-6cd22504",path:"/it_IT/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6cd22504").then(n)}},{name:"v-39f487c8",path:"/it_IT/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-39f487c8").then(n)}},{name:"v-5e50fd3c",path:"/it_IT/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5e50fd3c").then(n)}},{name:"v-820ecc48",path:"/it_IT/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-820ecc48").then(n)}},{name:"v-21d6c3c0",path:"/it_IT/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-21d6c3c0").then(n)}},{name:"v-a1282abe",path:"/ja_JP/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-a1282abe").then(n)}},{path:"/ja_JP/index.html",redirect:"/ja_JP/"},{name:"v-5b0b98ee",path:"/ja_JP/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5b0b98ee").then(n)}},{name:"v-817d1f3c",path:"/ja_JP/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-817d1f3c").then(n)}},{name:"v-7424eabc",path:"/ja_JP/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7424eabc").then(n)}},{name:"v-09842ac8",path:"/ja_JP/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-09842ac8").then(n)}},{name:"v-61a8d7fc",path:"/ja_JP/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-61a8d7fc").then(n)}},{name:"v-1babb004",path:"/ja_JP/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-1babb004").then(n)}},{name:"v-50a6b796",path:"/ko_KR/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-50a6b796").then(n)}},{name:"v-27cead0a",path:"/ko_KR/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-27cead0a").then(n)}},{name:"v-8f897388",path:"/ko_KR/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-8f897388").then(n)}},{name:"v-531541c8",path:"/ko_KR/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-531541c8").then(n)}},{name:"v-b29c0508",path:"/ko_KR/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-b29c0508").then(n)}},{name:"v-54dafab4",path:"/ko_KR/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-54dafab4").then(n)}},{name:"v-6be406f8",path:"/la_LA/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6be406f8").then(n)}},{name:"v-e7fd37c8",path:"/la_LA/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-e7fd37c8").then(n)}},{name:"v-6a7821dc",path:"/la_LA/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6a7821dc").then(n)}},{name:"v-4b475588",path:"/la_LA/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-4b475588").then(n)}},{name:"v-08a015a0",path:"/la_LA/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-08a015a0").then(n)}},{name:"v-7b1d165c",path:"/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7b1d165c").then(n)}},{name:"v-168e0fc0",path:"/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-168e0fc0").then(n)}},{name:"v-25fc24b2",path:"/pt_BR/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-25fc24b2").then(n)}},{path:"/pt_BR/index.html",redirect:"/pt_BR/"},{name:"v-783e0330",path:"/pt_BR/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-783e0330").then(n)}},{name:"v-2b2c0d48",path:"/pt_BR/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-2b2c0d48").then(n)}},{name:"v-557c109c",path:"/pt_BR/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-557c109c").then(n)}},{name:"v-90024e88",path:"/pt_BR/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-90024e88").then(n)}},{name:"v-3f975df9",path:"/ko_KR/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-3f975df9").then(n)}},{path:"/ko_KR/index.html",redirect:"/ko_KR/"},{name:"v-7da4645c",path:"/pt_BR/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7da4645c").then(n)}},{name:"v-49c21478",path:"/pt_BR/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-49c21478").then(n)}},{name:"v-95118182",path:"/pt_PT/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-95118182").then(n)}},{path:"/pt_PT/index.html",redirect:"/pt_PT/"},{name:"v-6b232260",path:"/pt_PT/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6b232260").then(n)}},{name:"v-eecc5078",path:"/pt_PT/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-eecc5078").then(n)}},{name:"v-5603601c",path:"/pt_PT/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5603601c").then(n)}},{name:"v-7425eddc",path:"/pt_PT/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7425eddc").then(n)}},{name:"v-18d64d88",path:"/pt_PT/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-18d64d88").then(n)}},{name:"v-46d53e40",path:"/pt_PT/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-46d53e40").then(n)}},{name:"v-327a1fff",path:"/ru_RU/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-327a1fff").then(n)}},{path:"/ru_RU/index.html",redirect:"/ru_RU/"},{name:"v-c88ec3e0",path:"/ru_RU/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-c88ec3e0").then(n)}},{name:"v-be9fc7c8",path:"/ru_RU/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-be9fc7c8").then(n)}},{name:"v-ef2f11f8",path:"/ru_RU/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-ef2f11f8").then(n)}},{name:"v-1eea9d3c",path:"/ru_RU/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-1eea9d3c").then(n)}},{name:"v-ae810c48",path:"/ru_RU/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-ae810c48").then(n)}},{name:"v-831f1fc0",path:"/ru_RU/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-831f1fc0").then(n)}},{name:"v-6a9943bf",path:"/tr_TR/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6a9943bf").then(n)}},{path:"/tr_TR/index.html",redirect:"/tr_TR/"},{name:"v-7c2aca50",path:"/tr_TR/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-7c2aca50").then(n)}},{name:"v-1c3e5978",path:"/tr_TR/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-1c3e5978").then(n)}},{name:"v-9c686fc8",path:"/tr_TR/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-9c686fc8").then(n)}},{name:"v-03491d88",path:"/tr_TR/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-03491d88").then(n)}},{name:"v-6c4b35dc",path:"/tr_TR/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6c4b35dc").then(n)}},{name:"v-8ad20740",path:"/tr_TR/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-8ad20740").then(n)}},{name:"v-db879196",path:"/vi_VN/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-db879196").then(n)}},{path:"/vi_VN/index.html",redirect:"/vi_VN/"},{name:"v-3ebb994c",path:"/vi_VN/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-3ebb994c").then(n)}},{name:"v-575d6864",path:"/vi_VN/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-575d6864").then(n)}},{name:"v-e3f19e08",path:"/vi_VN/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-e3f19e08").then(n)}},{name:"v-ac978748",path:"/vi_VN/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-ac978748").then(n)}},{name:"v-6921ad88",path:"/vi_VN/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6921ad88").then(n)}},{name:"v-4ed6c46a",path:"/vi_VN/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-4ed6c46a").then(n)}},{name:"v-62d9ee85",path:"/zh_CN/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-62d9ee85").then(n)}},{path:"/zh_CN/index.html",redirect:"/zh_CN/"},{name:"v-6aa1d80a",path:"/zh_CN/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-6aa1d80a").then(n)}},{name:"v-94039704",path:"/zh_CN/custom_altar_recipes.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-94039704").then(n)}},{name:"v-664fd9fc",path:"/zh_CN/custom_javascript_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-664fd9fc").then(n)}},{name:"v-ef981948",path:"/zh_CN/custom_model_pack.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-ef981948").then(n)}},{name:"v-5872be3c",path:"/zh_CN/maid_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-5872be3c").then(n)}},{name:"v-d4c21dcc",path:"/zh_CN/preset_animation.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-d4c21dcc").then(n)}},{name:"v-52accb02",path:"/la_LA/",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-52accb02").then(n)}},{path:"/la_LA/index.html",redirect:"/la_LA/"},{name:"v-28440390",path:"/la_LA/chair_model_pack_details.html",component:jl,beforeEnter:(e,t,n)=>{ul("Layout","v-28440390").then(n)}},{path:"*",component:jl}],Ml={title:"Touhou Little Maid Dev Wiki",description:"There is a wiki related to Touhou Little Maid mod development",base:"/TouhouLittleMaid/",headTags:[],pages:[{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/chair_model_pack_details.html",relativePath:"chair_model_pack_details.md",key:"v-69b4a7b0",path:"/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/",relativePath:"README.md",key:"v-191607df",path:"/"},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/custom_altar_recipes.html",relativePath:"custom_altar_recipes.md",key:"v-8fd167b8",path:"/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/custom_model_pack.html",relativePath:"custom_model_pack.md",key:"v-4d1ecdfc",path:"/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/custom_javascript_animation.html",relativePath:"custom_javascript_animation.md",key:"v-970291c8",path:"/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/de_DE/",relativePath:"de_DE/README.md",key:"v-6c65917f",path:"/de_DE/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/de_DE/chair_model_pack_details.html",relativePath:"de_DE/chair_model_pack_details.md",key:"v-766966e0",path:"/de_DE/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/de_DE/custom_altar_recipes.html",relativePath:"de_DE/custom_altar_recipes.md",key:"v-10fff4f8",path:"/de_DE/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/de_DE/custom_javascript_animation.html",relativePath:"de_DE/custom_javascript_animation.md",key:"v-571ed7c8",path:"/de_DE/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/de_DE/custom_model_pack.html",relativePath:"de_DE/custom_model_pack.md",key:"v-7661b588",path:"/de_DE/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/de_DE/maid_model_pack_details.html",relativePath:"de_DE/maid_model_pack_details.md",key:"v-7a2d91dc",path:"/de_DE/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/de_DE/preset_animation.html",relativePath:"de_DE/preset_animation.md",key:"v-4c9cdea0",path:"/de_DE/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/es_ES/",relativePath:"es_ES/README.md",key:"v-33679fbf",path:"/es_ES/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/es_ES/chair_model_pack_details.html",relativePath:"es_ES/chair_model_pack_details.md",key:"v-5a496e50",path:"/es_ES/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/es_ES/custom_altar_recipes.html",relativePath:"es_ES/custom_altar_recipes.md",key:"v-5a6b1178",path:"/es_ES/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/es_ES/custom_javascript_animation.html",relativePath:"es_ES/custom_javascript_animation.md",key:"v-c7deefc8",path:"/es_ES/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/es_ES/custom_model_pack.html",relativePath:"es_ES/custom_model_pack.md",key:"v-cac29d88",path:"/es_ES/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/es_ES/maid_model_pack_details.html",relativePath:"es_ES/maid_model_pack_details.md",key:"v-3208f5dc",path:"/es_ES/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/es_ES/preset_animation.html",relativePath:"es_ES/preset_animation.md",key:"v-b668bf40",path:"/es_ES/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/fr_FR/",relativePath:"fr_FR/README.md",key:"v-8fd8ad82",path:"/fr_FR/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/fr_FR/chair_model_pack_details.html",relativePath:"fr_FR/chair_model_pack_details.md",key:"v-689d84d0",path:"/fr_FR/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/fr_FR/custom_altar_recipes.html",relativePath:"fr_FR/custom_altar_recipes.md",key:"v-8b5d2478",path:"/fr_FR/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/fr_FR/custom_javascript_animation.html",relativePath:"fr_FR/custom_javascript_animation.md",key:"v-685effc8",path:"/fr_FR/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/fr_FR/custom_model_pack.html",relativePath:"fr_FR/custom_model_pack.md",key:"v-58588d88",path:"/fr_FR/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/fr_FR/maid_model_pack_details.html",relativePath:"fr_FR/maid_model_pack_details.md",key:"v-01f08ddc",path:"/fr_FR/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/fr_FR/preset_animation.html",relativePath:"fr_FR/preset_animation.md",key:"v-40d51240",path:"/fr_FR/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/it_IT/",relativePath:"it_IT/README.md",key:"v-5c3471ff",path:"/it_IT/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/it_IT/chair_model_pack_details.html",relativePath:"it_IT/chair_model_pack_details.md",key:"v-7eb067e0",path:"/it_IT/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/it_IT/custom_altar_recipes.html",relativePath:"it_IT/custom_altar_recipes.md",key:"v-6cd22504",path:"/it_IT/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/it_IT/custom_javascript_animation.html",relativePath:"it_IT/custom_javascript_animation.md",key:"v-39f487c8",path:"/it_IT/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/it_IT/custom_model_pack.html",relativePath:"it_IT/custom_model_pack.md",key:"v-5e50fd3c",path:"/it_IT/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/it_IT/maid_model_pack_details.html",relativePath:"it_IT/maid_model_pack_details.md",key:"v-820ecc48",path:"/it_IT/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/it_IT/preset_animation.html",relativePath:"it_IT/preset_animation.md",key:"v-21d6c3c0",path:"/it_IT/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"東方リトルメイドwiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"東方リトルメイドmodの開発に関するwikiがあります",actionText:"はじめに→",actionLink:"/ja_JP/custom_model_pack",features:[{title:"カスタムモデル",details:"カスタムメイドや椅子のモデルパッケージの作り方"},{title:"レシピの変更",details:"データパックでのレシピの変更方法"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/ja_JP/",relativePath:"ja_JP/README.md",key:"v-a1282abe",path:"/ja_JP/"},{title:"椅子モデルパックの詳細",frontmatter:{},regularPath:"/ja_JP/chair_model_pack_details.html",relativePath:"ja_JP/chair_model_pack_details.md",key:"v-5b0b98ee",path:"/ja_JP/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"祭壇レシピのカスタマイズ",frontmatter:{},regularPath:"/ja_JP/custom_altar_recipes.html",relativePath:"ja_JP/custom_altar_recipes.md",key:"v-817d1f3c",path:"/ja_JP/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"JavaScriptアニメーションのカスタマイズ",frontmatter:{},regularPath:"/ja_JP/custom_javascript_animation.html",relativePath:"ja_JP/custom_javascript_animation.md",key:"v-7424eabc",path:"/ja_JP/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"モデルパックのカスタマイズ",frontmatter:{},regularPath:"/ja_JP/custom_model_pack.html",relativePath:"ja_JP/custom_model_pack.md",key:"v-09842ac8",path:"/ja_JP/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"メイドモデルパックの詳細",frontmatter:{},regularPath:"/ja_JP/maid_model_pack_details.html",relativePath:"ja_JP/maid_model_pack_details.md",key:"v-61a8d7fc",path:"/ja_JP/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"プリセット アニメーション",frontmatter:{},regularPath:"/ja_JP/preset_animation.html",relativePath:"ja_JP/preset_animation.md",key:"v-1babb004",path:"/ja_JP/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/ko_KR/chair_model_pack_details.html",relativePath:"ko_KR/chair_model_pack_details.md",key:"v-50a6b796",path:"/ko_KR/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/ko_KR/custom_altar_recipes.html",relativePath:"ko_KR/custom_altar_recipes.md",key:"v-27cead0a",path:"/ko_KR/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/ko_KR/custom_javascript_animation.html",relativePath:"ko_KR/custom_javascript_animation.md",key:"v-8f897388",path:"/ko_KR/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/ko_KR/custom_model_pack.html",relativePath:"ko_KR/custom_model_pack.md",key:"v-531541c8",path:"/ko_KR/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/ko_KR/maid_model_pack_details.html",relativePath:"ko_KR/maid_model_pack_details.md",key:"v-b29c0508",path:"/ko_KR/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/ko_KR/preset_animation.html",relativePath:"ko_KR/preset_animation.md",key:"v-54dafab4",path:"/ko_KR/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/la_LA/custom_altar_recipes.html",relativePath:"la_LA/custom_altar_recipes.md",key:"v-6be406f8",path:"/la_LA/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/la_LA/custom_javascript_animation.html",relativePath:"la_LA/custom_javascript_animation.md",key:"v-e7fd37c8",path:"/la_LA/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/la_LA/maid_model_pack_details.html",relativePath:"la_LA/maid_model_pack_details.md",key:"v-6a7821dc",path:"/la_LA/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/la_LA/custom_model_pack.html",relativePath:"la_LA/custom_model_pack.md",key:"v-4b475588",path:"/la_LA/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/la_LA/preset_animation.html",relativePath:"la_LA/preset_animation.md",key:"v-08a015a0",path:"/la_LA/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/maid_model_pack_details.html",relativePath:"maid_model_pack_details.md",key:"v-7b1d165c",path:"/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/preset_animation.html",relativePath:"preset_animation.md",key:"v-168e0fc0",path:"/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"Existe uma wiki relacionado ao desenvolvimento do mod Touhou Little Maid",actionText:"Começando →",actionLink:"/pt_BR/custom_model_pack",features:[{title:"Modelo Personalizado",details:"Como fazer um pacote de modelo personalizado da empregada ou cadeira"},{title:"Modificar Receitas",details:"Como modificar receitas por pacote de dados"},{title:"Desenvolver Mod",details:"Como compatibilizar o mod Touhou Little Maid ou desenvolver uma adição"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/pt_BR/",relativePath:"pt_BR/README.md",key:"v-25fc24b2",path:"/pt_BR/"},{title:"Chair Model Pack Detalhas",frontmatter:{},regularPath:"/pt_BR/chair_model_pack_details.html",relativePath:"pt_BR/chair_model_pack_details.md",key:"v-783e0330",path:"/pt_BR/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/pt_BR/custom_altar_recipes.html",relativePath:"pt_BR/custom_altar_recipes.md",key:"v-2b2c0d48",path:"/pt_BR/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/pt_BR/custom_javascript_animation.html",relativePath:"pt_BR/custom_javascript_animation.md",key:"v-557c109c",path:"/pt_BR/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/pt_BR/custom_model_pack.html",relativePath:"pt_BR/custom_model_pack.md",key:"v-90024e88",path:"/pt_BR/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/ko_KR/",relativePath:"ko_KR/README.md",key:"v-3f975df9",path:"/ko_KR/"},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/pt_BR/maid_model_pack_details.html",relativePath:"pt_BR/maid_model_pack_details.md",key:"v-7da4645c",path:"/pt_BR/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/pt_BR/preset_animation.html",relativePath:"pt_BR/preset_animation.md",key:"v-49c21478",path:"/pt_BR/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/pt_PT/",relativePath:"pt_PT/README.md",key:"v-95118182",path:"/pt_PT/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/pt_PT/chair_model_pack_details.html",relativePath:"pt_PT/chair_model_pack_details.md",key:"v-6b232260",path:"/pt_PT/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/pt_PT/custom_altar_recipes.html",relativePath:"pt_PT/custom_altar_recipes.md",key:"v-eecc5078",path:"/pt_PT/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/pt_PT/custom_javascript_animation.html",relativePath:"pt_PT/custom_javascript_animation.md",key:"v-5603601c",path:"/pt_PT/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/pt_PT/maid_model_pack_details.html",relativePath:"pt_PT/maid_model_pack_details.md",key:"v-7425eddc",path:"/pt_PT/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/pt_PT/custom_model_pack.html",relativePath:"pt_PT/custom_model_pack.md",key:"v-18d64d88",path:"/pt_PT/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/pt_PT/preset_animation.html",relativePath:"pt_PT/preset_animation.md",key:"v-46d53e40",path:"/pt_PT/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Вики",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"Вики, связанная с разработкой Touhou Little Maid",actionText:"Начать →",actionLink:"/ru_RU/custom_model_pack",features:[{title:"Пользовательская модель",details:"Как сделать свою горничную, или модель стула"},{title:"Изменить рецепты",details:"Как изменить рецепты по набору данных"},{title:"Разработка мода",details:"Как совместить Touhou Little Maid, или разработать дополнение"}],footer:"MIT Лицензировано | Авторское право © 2021-present TartaricAcid"},regularPath:"/ru_RU/",relativePath:"ru_RU/README.md",key:"v-327a1fff",path:"/ru_RU/"},{title:"Детали моделей стульев",frontmatter:{},regularPath:"/ru_RU/chair_model_pack_details.html",relativePath:"ru_RU/chair_model_pack_details.md",key:"v-c88ec3e0",path:"/ru_RU/chair_model_pack_details.html",headers:[{level:2,title:"Структура наборов моделей",slug:"структура-наборов-моделеи"},{level:2,title:"Описание файлов наборов моделей",slug:"описание-фаилов-наборов-моделеи"},{level:2,title:"Анимированная иконка",slug:"анимированная-иконка"},{level:2,title:"Файл моделей",slug:"фаил-моделеи"},{level:2,title:"Интернационализация",slug:"интернационализация"}]},{title:"Пользовательская анимация JavaScript",frontmatter:{},regularPath:"/ru_RU/custom_javascript_animation.html",relativePath:"ru_RU/custom_javascript_animation.md",key:"v-be9fc7c8",path:"/ru_RU/custom_javascript_animation.html",headers:[{level:2,title:"Базовый формат",slug:"базовыи-формат"},{level:2,title:"Быстрая перезагрузка",slug:"быстрая-перезагрузка"},{level:2,title:"Документация по функциям",slug:"документация-по-функциям"},{level:3,title:"Параметры сущностей",slug:"параметры-сущностеи"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Свои рецепты Алтаря",frontmatter:{},regularPath:"/ru_RU/custom_altar_recipes.html",relativePath:"ru_RU/custom_altar_recipes.md",key:"v-ef2f11f8",path:"/ru_RU/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/ru_RU/custom_model_pack.html",relativePath:"ru_RU/custom_model_pack.md",key:"v-1eea9d3c",path:"/ru_RU/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/ru_RU/maid_model_pack_details.html",relativePath:"ru_RU/maid_model_pack_details.md",key:"v-ae810c48",path:"/ru_RU/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Пасхальные яйца горничной",slug:"пасхальные-яица-горничнои"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Другие вопросы",slug:"другие-вопросы"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Заготовленная анимация",frontmatter:{},regularPath:"/ru_RU/preset_animation.html",relativePath:"ru_RU/preset_animation.md",key:"v-831f1fc0",path:"/ru_RU/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Lisanslı | Telif hakkı © 2021-günümüz TartaricAcid"},regularPath:"/tr_TR/",relativePath:"tr_TR/README.md",key:"v-6a9943bf",path:"/tr_TR/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/tr_TR/chair_model_pack_details.html",relativePath:"tr_TR/chair_model_pack_details.md",key:"v-7c2aca50",path:"/tr_TR/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/tr_TR/custom_altar_recipes.html",relativePath:"tr_TR/custom_altar_recipes.md",key:"v-1c3e5978",path:"/tr_TR/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/tr_TR/custom_javascript_animation.html",relativePath:"tr_TR/custom_javascript_animation.md",key:"v-9c686fc8",path:"/tr_TR/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/tr_TR/custom_model_pack.html",relativePath:"tr_TR/custom_model_pack.md",key:"v-03491d88",path:"/tr_TR/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/tr_TR/maid_model_pack_details.html",relativePath:"tr_TR/maid_model_pack_details.md",key:"v-6c4b35dc",path:"/tr_TR/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Preset Animation",frontmatter:{},regularPath:"/tr_TR/preset_animation.html",relativePath:"tr_TR/preset_animation.md",key:"v-8ad20740",path:"/tr_TR/preset_animation.html",headers:[{level:2,title:"Positioning Group",slug:"positioning-group"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid: Tài nguyên cho lập trình viên",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"Sau đây là các thông tin liên quan đến việc tạo dựng nên mod Touhou Little Maid",actionText:"Bắt đầu →",actionLink:"/vi_VN/custom_model_pack",features:[{title:"Mô hình tự tạo",details:"Cách để tự tạo gói mô hình cho maid hoặc ghế"},{title:"Thay đổi công thức",details:"Cách để thay đổi công thức chế tạo với gói dữ liệu"},{title:"Tạo dựng mod",details:"Cách để tích hợp mod Touhou Little Maid, hoặc tạo nên mod con"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/vi_VN/",relativePath:"vi_VN/README.md",key:"v-db879196",path:"/vi_VN/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/vi_VN/chair_model_pack_details.html",relativePath:"vi_VN/chair_model_pack_details.md",key:"v-3ebb994c",path:"/vi_VN/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]},{title:"Custom Altar Recipes",frontmatter:{},regularPath:"/vi_VN/custom_altar_recipes.html",relativePath:"vi_VN/custom_altar_recipes.md",key:"v-575d6864",path:"/vi_VN/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"Custom JavaScript Animation",frontmatter:{},regularPath:"/vi_VN/custom_javascript_animation.html",relativePath:"vi_VN/custom_javascript_animation.md",key:"v-e3f19e08",path:"/vi_VN/custom_javascript_animation.html",headers:[{level:2,title:"Basic Format",slug:"basic-format"},{level:2,title:"Hot Reload",slug:"hot-reload"},{level:2,title:"Function Documentation",slug:"function-documentation"},{level:3,title:"Entity Parameter",slug:"entity-parameter"},{level:3,title:"limbSwing & limbSwingAmount Parameter",slug:"limbswing-limbswingamount-parameter"},{level:3,title:"ageInTicks Parameter",slug:"ageinticks-parameter"},{level:3,title:"netHeadYaw and headPitch Parameter",slug:"netheadyaw-and-headpitch-parameter"},{level:3,title:"scale Parameter",slug:"scale-parameter"},{level:3,title:"modelMap Parameter",slug:"modelmap-parameter"},{level:3,title:"Group",slug:"group"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"Custom Model Pack",frontmatter:{},regularPath:"/vi_VN/custom_model_pack.html",relativePath:"vi_VN/custom_model_pack.md",key:"v-ac978748",path:"/vi_VN/custom_model_pack.html",headers:[{level:2,title:"1. Create a default model",slug:"_1-create-a-default-model"},{level:2,title:"2. Modify it to what you want based on the default model",slug:"_2-modify-it-to-what-you-want-based-on-the-default-model"},{level:2,title:"3. Create textures",slug:"_3-create-textures"},{level:2,title:"4. Create a model pack",slug:"_4-create-a-model-pack"},{level:2,title:"5. Export the model into model pack",slug:"_5-export-the-model-into-model-pack"},{level:2,title:"6. Load the model pack & enjoy it!",slug:"_6-load-the-model-pack-enjoy-it"}]},{title:"Maid Model Pack Details",frontmatter:{},regularPath:"/vi_VN/maid_model_pack_details.html",relativePath:"vi_VN/maid_model_pack_details.md",key:"v-6921ad88",path:"/vi_VN/maid_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"},{level:2,title:"Compatibility Issue",slug:"compatibility-issue"},{level:2,title:"Maid Easter Eggs",slug:"maid-easter-eggs"},{level:3,title:"Normal Easter Eggs",slug:"normal-easter-eggs"},{level:3,title:"Encrypted Easter Eggs",slug:"encrypted-easter-eggs"},{level:2,title:"Other Questions",slug:"other-questions"},{level:3,title:"Z-fighting Issue",slug:"z-fighting-issue"},{level:3,title:"Uppercase & Lowercase",slug:"uppercase-lowercase"}]},{title:"Hoạt ảnh có sẵn",frontmatter:{},regularPath:"/vi_VN/preset_animation.html",relativePath:"vi_VN/preset_animation.md",key:"v-4ed6c46a",path:"/vi_VN/preset_animation.html",headers:[{level:2,title:"Sắp xếp các nhóm",slug:"sap-xep-cac-nhom"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid 开发 Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"有关于车万女仆的开发文档",actionText:"点击开始 →",actionLink:"/zh_CN/custom_model_pack",features:[{title:"自定义模型",details:"如何制作自定义的女仆、坐垫模型"},{title:"合成修改",details:"如何通过数据包修改合成"},{title:"开发模组",details:"如何为 Touhou Little Maid 模组添加兼容,或者会做附属模组"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/zh_CN/",relativePath:"zh_CN/README.md",key:"v-62d9ee85",path:"/zh_CN/"},{title:"坐垫模型包详解",frontmatter:{},regularPath:"/zh_CN/chair_model_pack_details.html",relativePath:"zh_CN/chair_model_pack_details.md",key:"v-6aa1d80a",path:"/zh_CN/chair_model_pack_details.html",headers:[{level:2,title:"模型包结构",slug:"模型包结构"},{level:2,title:"模型包描述文件",slug:"模型包描述文件"},{level:2,title:"动态图标",slug:"动态图标"},{level:2,title:"模型文件",slug:"模型文件"},{level:2,title:"国际化",slug:"国际化"}]},{title:"自定义祭坛合成",frontmatter:{},regularPath:"/zh_CN/custom_altar_recipes.html",relativePath:"zh_CN/custom_altar_recipes.md",key:"v-94039704",path:"/zh_CN/custom_altar_recipes.html",headers:[{level:2,title:"1.16.5",slug:"_1-16-5"},{level:2,title:"1.12.2",slug:"_1-12-2"}]},{title:"自定义 JavaScript 动画",frontmatter:{},regularPath:"/zh_CN/custom_javascript_animation.html",relativePath:"zh_CN/custom_javascript_animation.md",key:"v-664fd9fc",path:"/zh_CN/custom_javascript_animation.html",headers:[{level:2,title:"基本格式",slug:"基本格式"},{level:2,title:"游戏内热重载功能",slug:"游戏内热重载功能"},{level:2,title:"函数文档",slug:"函数文档"},{level:3,title:"实体参数",slug:"实体参数"},{level:3,title:"limbSwing 和 limbSwingAmount 参数",slug:"limbswing-和-limbswingamount-参数"},{level:3,title:"ageInTicks 参数",slug:"ageinticks-参数"},{level:3,title:"netHeadYaw 和 headPitch 参数",slug:"netheadyaw-和-headpitch-参数"},{level:3,title:"scale 参数",slug:"scale-参数"},{level:3,title:"modelMap 参数",slug:"modelmap-参数"},{level:3,title:"组",slug:"组"},{level:3,title:"GlWrapper",slug:"glwrapper"}]},{title:"自定义模型包",frontmatter:{},regularPath:"/zh_CN/custom_model_pack.html",relativePath:"zh_CN/custom_model_pack.md",key:"v-ef981948",path:"/zh_CN/custom_model_pack.html",headers:[{level:2,title:"1. 创建默认模型",slug:"_1-创建默认模型"},{level:2,title:"2. 基于默认模型,随心所欲的修改它",slug:"_2-基于默认模型-随心所欲的修改它"},{level:2,title:"3. 创建材质",slug:"_3-创建材质"},{level:2,title:"4. 创建一个模型包",slug:"_4-创建一个模型包"},{level:2,title:"5. 将模型导出到模型包",slug:"_5-将模型导出到模型包"},{level:2,title:"6. 愉快的加载模型吧!",slug:"_6-愉快的加载模型吧"}]},{title:"女仆模型包详解",frontmatter:{},regularPath:"/zh_CN/maid_model_pack_details.html",relativePath:"zh_CN/maid_model_pack_details.md",key:"v-5872be3c",path:"/zh_CN/maid_model_pack_details.html",headers:[{level:2,title:"模型包结构",slug:"模型包结构"},{level:2,title:"模型包描述文件",slug:"模型包描述文件"},{level:2,title:"动态图标",slug:"动态图标"},{level:2,title:"模型文件",slug:"模型文件"},{level:2,title:"国际化",slug:"国际化"},{level:2,title:"兼容性问题",slug:"兼容性问题"},{level:2,title:"女仆彩蛋",slug:"女仆彩蛋"},{level:3,title:"普通彩蛋",slug:"普通彩蛋"},{level:3,title:"加密彩蛋",slug:"加密彩蛋"},{level:2,title:"其他问题",slug:"其他问题"},{level:3,title:"贴图闪烁(Z-fighting)问题",slug:"贴图闪烁-z-fighting-问题"},{level:3,title:"文件名大小写问题",slug:"文件名大小写问题"}]},{title:"预设动画",frontmatter:{},regularPath:"/zh_CN/preset_animation.html",relativePath:"zh_CN/preset_animation.md",key:"v-d4c21dcc",path:"/zh_CN/preset_animation.html",headers:[{level:2,title:"定位组",slug:"定位组"},{level:3,title:"armLeftPositioningBone",slug:"armleftpositioningbone"},{level:3,title:"armRightPositioningBone",slug:"armrightpositioningbone"},{level:3,title:"backpackPositioningBone",slug:"backpackpositioningbone"}]},{title:"Home",frontmatter:{home:!0,heroText:"Touhou Little Maid Dev Wiki",heroImage:"https://i.imgur.com/SqIMw3U.png",tagline:"There is a wiki related to Touhou Little Maid mod development",actionText:"Get Started →",actionLink:"/custom_model_pack",features:[{title:"Custom Model",details:"How to make a custom maid or chair model package"},{title:"Modify Recipes",details:"How to modification of recipes by data packet"},{title:"Develop Mod",details:"How to compat Touhou Little Maid mod, or develop an addition"}],footer:"MIT Licensed | Copyright © 2021-present TartaricAcid"},regularPath:"/la_LA/",relativePath:"la_LA/README.md",key:"v-52accb02",path:"/la_LA/"},{title:"Chair Model Pack Details",frontmatter:{},regularPath:"/la_LA/chair_model_pack_details.html",relativePath:"la_LA/chair_model_pack_details.md",key:"v-28440390",path:"/la_LA/chair_model_pack_details.html",headers:[{level:2,title:"Model Packs Structure",slug:"model-packs-structure"},{level:2,title:"Model Packs Description Files",slug:"model-packs-description-files"},{level:2,title:"Animated Icon",slug:"animated-icon"},{level:2,title:"Model Files",slug:"model-files"},{level:2,title:"Internationlization",slug:"internationlization"}]}],themeConfig:{locales:{"/":{selectText:"Languages",label:"English",ariaLabel:"Languages",lastUpdated:"Last Updated",nav:[{text:"Home",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.curseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"Custom Model",children:[["./custom_model_pack","Custom Model Pack"],["./maid_model_pack_details","Maid Model Pack Details"],["./chair_model_pack_details","Chair Model Pack Details"],["./custom_javascript_animation","Custom JavaScript Animation"],["./preset_animation","Preset Animation"]]},{title:"Modify Recipes",children:[["./custom_altar_recipes","Custom Altar Recipes"]]}]},"/es_ES/":{selectText:"",label:"",ariaLabel:"",lastUpdated:"",nav:[{text:"",link:""},{text:"",link:""},{text:"",link:""}],sidebar:[{title:"",children:[["",""],["",""],["",""],["",""],["",""]]},{title:"",children:[["",""]]}]},"/ja_JP/":{selectText:"言語",label:"日本語",ariaLabel:"言語",lastUpdated:"最終アップデート",nav:[{text:"Home",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.cursseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"カスタムモデル",children:[["./ja_JP/custom_model_pack","カスタムモデルパック"],["./ja_JP/maid_model_pack_details","メイドモデルパックの詳細"],["./ja_JP/chair_model_pack_details","椅子モデルパックの詳細"],["./ja_JP/custom_javascript_animation","JavaScriptアニメーションのカスタマイズ"],["./ja_JP/preset_animation","プリセット アニメーション"]]},{title:"レシピの変更",children:[["./ja_JP/custom_altar_recipes","祭壇レシピの変更"]]}]},"/pt_BR/":{selectText:"Línguas",label:"Português (Brasil)",ariaLabel:"Línguas",lastUpdated:"Última Atualização",nav:[{text:"Casa",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.curseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"Modelo Personalizado",children:[["./pt_BR/custom_model_pack","Pacote de Modelo Personalizado"],["./pt_BR/maid_model_pack_details","Detalhes do Pacote de Modelo da Empregada"],["./pt_BR/chair_model_pack_details","Detalhes do Pacote de Modelos da Cadeira"],["./pt_BR/custom_javascript_animation","Animação de JavaScript Personalizada"],["./pt_BR/preset_animation","Animação Predefinida"]]},{title:"Modificar Receitas",children:[["./pt_BR/custom_altar_recipes","Receitas de Altar Personalizadas"]]}]},"/ru_RU/":{selectText:"Языки",label:"Русский",ariaLabel:"Языки",lastUpdated:"Последнее обновление",nav:[{text:"Главная",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.curseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"Пользовательская модель",children:[["./ru_RU/custom_model_pack","Пользовательский набор моделей"],["./ru_RU/maid_model_pack_details","Подробная информация о наборе моделей"],["./ru_RU/chair_model_pack_details","Детали моделей стульев"],["./ru_RU/custom_javascript_animation","Пользовательская анимация JavaScript"],["./ru_RU/preset_animation","Анимация пресета"]]},{title:"Изменить рецепты",children:[["./ru_RU/custom_altar_recipes","Свои рецепты Алтаря"]]}]},"/vi_VN/":{selectText:"Ngôn ngữ",label:"Tiếng Việt",ariaLabel:"Languages",lastUpdated:"Cập nhật lần cuối",nav:[{text:"Trang chủ",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.curseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"Mô hình tự tạo",children:[["./vi_VN/custom_model_pack","Gói mô hình tự tạo"],["./vi_VN/maid_model_pack_details","Chi tiết gói mô hình"],["./vi_VN/chair_model_pack_details","Chi tiết gói mô hình ghế"],["./vi_VN/custom_javascript_animation","Hoạt ảnh JavaScript tự tạo"],["./vi_VN/preset_animation","Hoạt ảnh có sẵn"]]},{title:"Thay đổi công thức",children:[["./vi_VN/custom_altar_recipes","Công thức tuỳ chỉnh trên bàn thờ"]]}]},"/zh_CN/":{selectText:"选择语言",label:"简体中文",ariaLabel:"Languages",lastUpdated:"上次更新",nav:[{text:"主页",link:"./"},{text:"GitHub",link:"https://github.com/TartaricAcid/TouhouLittleMaid"},{text:"CurseForge",link:"https://www.curseforge.com/minecraft/mc-mods/touhou-little-maid"}],sidebar:[{title:"自定义模型",children:[["./zh_CN/custom_model_pack","自定义模型包"],["./zh_CN/maid_model_pack_details","女仆模型包详解"],["./zh_CN/chair_model_pack_details","坐垫模型包详解"],["./zh_CN/custom_javascript_animation","自定义动画脚本"],["./zh_CN/preset_animation","预设动画"]]},{title:"合成修改",children:[["./zh_CN/custom_altar_recipes","自定义祭坛合成"]]}]}}},locales:{"/":{lang:"en-US",title:"Touhou Little Maid Dev Wiki",description:"There is a wiki related to Touhou Little Maid mod development",path:"/"},"/es_ES/":{lang:"es-ES",title:"Touhou Little Maid: Principal",description:"",path:"/es_ES/"},"/ja_JP/":{lang:"ja-JP",title:"東方リトルメイドwiki",description:"東方リトルメイドmodの開発に関するwikiがあります",path:"/ja_JP/"},"/pt_BR/":{lang:"pt-BR",title:"Touhou Little Maid Dev Wiki",description:"Existe um wiki relacionado ao desenvolvimento do mod Touhou Little Maid",path:"/pt_BR/"},"/ru_RU/":{lang:"ru-RU",title:"Touhou Little Maid Вики",description:"Вики, связанная с разработкой Touhou Little Maid",path:"/ru_RU/"},"/vi_VN/":{lang:"vi-VN",title:"Touhou Little Maid: Tài nguyên cho lập trình viên",description:"Sau đây là các thông tin liên quan đến việc tạo dựng nên mod Touhou Little Maid",path:"/vi_VN/"},"/zh_CN/":{lang:"zh-CN",title:"Touhou Little Maid 开发 Wiki",description:"有关于车万女仆的开发文档",path:"/zh_CN/"}}};n(234);Jn.component("Badge",()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,302))),Jn.component("CodeBlock",()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,298))),Jn.component("CodeGroup",()=>Promise.all([n.e(0),n.e(6)]).then(n.bind(null,299)));n(235);var Ll=[{},({Vue:e})=>{e.mixin({computed:{$dataBlock(){return this.$options.__data__block__}}})},{},{}],Rl=[];class Ol extends class{constructor(){this.store=new Jn({data:{state:{}}})}$get(e){return this.store.state[e]}$set(e,t){Jn.set(this.store.state,e,t)}$emit(...e){this.store.$emit(...e)}$on(...e){this.store.$on(...e)}}{}Object.assign(Ol.prototype,{getPageAsyncComponent:il,getLayoutAsyncComponent:ll,getAsyncComponent:sl,getVueComponent:cl});var Al={install(e){const t=new Ol;e.$vuepress=t,e.prototype.$vuepress=t}};function $l(e,t){const n=t.toLowerCase();return e.options.routes.some(e=>e.path.toLowerCase()===n)}var Il={props:{pageKey:String,slotKey:{type:String,default:"default"}},render(e){const t=this.pageKey||this.$parent.$page.key;return pl("pageKey",t),Jn.component(t)||Jn.component(t,il(t)),Jn.component(t)?e(t):e("")}},Dl={functional:!0,props:{slotKey:String,required:!0},render:(e,{props:t,slots:n})=>e("div",{class:["content__"+t.slotKey]},n()[t.slotKey])},Nl={computed:{openInNewWindowTitle(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Fl=(n(236),n(237),Object(Tl.a)(Nl,(function(){var e=this._self._c;return e("span",[e("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[e("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),e("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),e("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports),zl={functional:!0,render(e,{parent:t,children:n}){if(t._isMounted)return n;t.$once("hook:mounted",()=>{t.$forceUpdate()})}};Jn.config.productionTip=!1,Jn.use(Vi),Jn.use(Al),Jn.mixin(function(e,t,n=Jn){!function(e){e.locales&&Object.keys(e.locales).forEach(t=>{e.locales[t].path=t});Object.freeze(e)}(t),n.$vuepress.$set("siteData",t);const r=new(e(n.$vuepress.$get("siteData"))),o=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(r)),a={};return Object.keys(o).reduce((e,t)=>(t.startsWith("$")&&(e[t]=o[t].get),e),a),{computed:a}}(e=>class{setPage(e){this.__page=e}get $site(){return e}get $themeConfig(){return this.$site.themeConfig}get $frontmatter(){return this.$page.frontmatter}get $localeConfig(){const{locales:e={}}=this.$site;let t,n;for(const r in e)"/"===r?n=e[r]:0===this.$page.path.indexOf(r)&&(t=e[r]);return t||n||{}}get $siteTitle(){return this.$localeConfig.title||this.$site.title||""}get $canonicalUrl(){const{canonicalUrl:e}=this.$page.frontmatter;return"string"==typeof e&&e}get $title(){const e=this.$page,{metaTitle:t}=this.$page.frontmatter;if("string"==typeof t)return t;const n=this.$siteTitle,r=e.frontmatter.home?null:e.frontmatter.title||e.title;return n?r?r+" | "+n:n:r||"VuePress"}get $description(){const e=function(e){if(e){const t=e.filter(e=>"description"===e.name)[0];if(t)return t.content}}(this.$page.frontmatter.meta);return e||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}get $lang(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}get $localePath(){return this.$localeConfig.path||"/"}get $themeLocaleConfig(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}get $page(){return this.__page?this.__page:function(e,t){for(let n=0;nn||(e.hash?!Jn.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(e.hash)}:{x:0,y:0})});!function(e){e.beforeEach((t,n,r)=>{if($l(e,t.path))r();else if(/(\/|\.html)$/.test(t.path))if(/\/$/.test(t.path)){const n=t.path.replace(/\/$/,"")+".html";$l(e,n)?r(n):r()}else r();else{const n=t.path+"/",o=t.path+".html";$l(e,o)?r(o):$l(e,n)?r(n):r()}})}(n);const r={};try{await Promise.all(Ll.filter(e=>"function"==typeof e).map(t=>t({Vue:Jn,options:r,router:n,siteData:Ml,isServer:e})))}catch(e){console.error(e)}return{app:new Jn(Object.assign(r,{router:n,render:e=>e("div",{attrs:{id:"app"}},[e("RouterView",{ref:"layout"}),e("div",{class:"global-ui"},Rl.map(t=>e(t)))])})),router:n}}(!1).then(({app:e,router:t})=>{t.onReady(()=>{e.$mount("#app")})})}]); \ No newline at end of file diff --git a/assets/js/vendors~docsearch.5e19b665.js b/assets/js/vendors~docsearch.5e19b665.js new file mode 100644 index 000000000..d461918e6 --- /dev/null +++ b/assets/js/vendors~docsearch.5e19b665.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{295:function(t,e,n){ +/*! docsearch 2.6.3 | © Algolia | github.com/algolia/docsearch */ +var r;"undefined"!=typeof self&&self,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e,n){"use strict";var r,i=n(1);function s(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}t.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(t){if(void 0===t&&(t=navigator.userAgent),/(msie|trident)/i.test(t)){var e=t.match(/(msie |rv:)(\d+(.\d+)?)/i);if(e)return e[2]}return!1},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(t){return"number"==typeof t},toStr:function(t){return null==t?"":t+""},cloneDeep:function(t){var e=this.mixin({},t),n=this;return this.each(e,(function(t,r){t&&(n.isArray(t)?e[r]=[].concat(t):n.isObject(t)&&(e[r]=n.cloneDeep(t)))})),e},error:function(t){throw new Error(t)},every:function(t,e){var n=!0;return t?(this.each(t,(function(r,i){n&&(n=e.call(null,r,i,t)&&n)})),!!n):n},any:function(t,e){var n=!1;return t?(this.each(t,(function(r,i){if(e.call(null,r,i,t))return n=!0,!1})),n):n},getUniqueId:(r=0,function(){return r++}),templatify:function(t){if(this.isFunction(t))return t;var e=i.element(t);return"SCRIPT"===e.prop("tagName")?function(){return e.text()}:function(){return String(t)}},defer:function(t){setTimeout(t,0)},noop:function(){},formatPrefix:function(t,e){return e?"":t+"-"},className:function(t,e,n){return(n?"":".")+t+e},escapeHighlightedString:function(t,e,n){e=e||"";var r=document.createElement("div");r.appendChild(document.createTextNode(e)),n=n||"";var i=document.createElement("div");i.appendChild(document.createTextNode(n));var o=document.createElement("div");return o.appendChild(document.createTextNode(t)),o.innerHTML.replace(RegExp(s(r.innerHTML),"g"),e).replace(RegExp(s(i.innerHTML),"g"),n)}}},function(t,e,n){"use strict";t.exports={element:null}},function(t,e){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var s=t.length;if(s===+s)for(var o=0;o was loaded but did not call our provided callback"),JSONPScriptError:s("JSONPScriptError"," + + diff --git a/custom_altar_recipes.html b/custom_altar_recipes.html new file mode 100644 index 000000000..920c1abe3 --- /dev/null +++ b/custom_altar_recipes.html @@ -0,0 +1,134 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/custom_javascript_animation.html b/custom_javascript_animation.html new file mode 100644 index 000000000..bb63b51ba --- /dev/null +++ b/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/custom_model_pack.html b/custom_model_pack.html new file mode 100644 index 000000000..82f0bce83 --- /dev/null +++ b/custom_model_pack.html @@ -0,0 +1,65 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. +The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/de_DE/chair_model_pack_details.html b/de_DE/chair_model_pack_details.html new file mode 100644 index 000000000..9758ac241 --- /dev/null +++ b/de_DE/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/de_DE/custom_altar_recipes.html b/de_DE/custom_altar_recipes.html new file mode 100644 index 000000000..8f0d26d6d --- /dev/null +++ b/de_DE/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/de_DE/custom_javascript_animation.html b/de_DE/custom_javascript_animation.html new file mode 100644 index 000000000..8243fb9b0 --- /dev/null +++ b/de_DE/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/de_DE/custom_model_pack.html b/de_DE/custom_model_pack.html new file mode 100644 index 000000000..31a651e6c --- /dev/null +++ b/de_DE/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/de_DE/index.html b/de_DE/index.html new file mode 100644 index 000000000..dcf980204 --- /dev/null +++ b/de_DE/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/de_DE/maid_model_pack_details.html b/de_DE/maid_model_pack_details.html new file mode 100644 index 000000000..4bc2e9ee2 --- /dev/null +++ b/de_DE/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/de_DE/preset_animation.html b/de_DE/preset_animation.html new file mode 100644 index 000000000..900cb05a5 --- /dev/null +++ b/de_DE/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/es_ES/chair_model_pack_details.html b/es_ES/chair_model_pack_details.html new file mode 100644 index 000000000..2e9f91b1f --- /dev/null +++ b/es_ES/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid: Principal + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/es_ES/custom_altar_recipes.html b/es_ES/custom_altar_recipes.html new file mode 100644 index 000000000..9f945f4be --- /dev/null +++ b/es_ES/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid: Principal + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/es_ES/custom_javascript_animation.html b/es_ES/custom_javascript_animation.html new file mode 100644 index 000000000..801c62b91 --- /dev/null +++ b/es_ES/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid: Principal + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/es_ES/custom_model_pack.html b/es_ES/custom_model_pack.html new file mode 100644 index 000000000..2df54df71 --- /dev/null +++ b/es_ES/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid: Principal + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/es_ES/index.html b/es_ES/index.html new file mode 100644 index 000000000..3d4f4d9cc --- /dev/null +++ b/es_ES/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid: Principal + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/es_ES/maid_model_pack_details.html b/es_ES/maid_model_pack_details.html new file mode 100644 index 000000000..8cb4d446c --- /dev/null +++ b/es_ES/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid: Principal + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/es_ES/preset_animation.html b/es_ES/preset_animation.html new file mode 100644 index 000000000..78ef020b3 --- /dev/null +++ b/es_ES/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid: Principal + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/fr_FR/chair_model_pack_details.html b/fr_FR/chair_model_pack_details.html new file mode 100644 index 000000000..103f52867 --- /dev/null +++ b/fr_FR/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/fr_FR/custom_altar_recipes.html b/fr_FR/custom_altar_recipes.html new file mode 100644 index 000000000..057901dc9 --- /dev/null +++ b/fr_FR/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/fr_FR/custom_javascript_animation.html b/fr_FR/custom_javascript_animation.html new file mode 100644 index 000000000..9c8dcd980 --- /dev/null +++ b/fr_FR/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/fr_FR/custom_model_pack.html b/fr_FR/custom_model_pack.html new file mode 100644 index 000000000..c381f9788 --- /dev/null +++ b/fr_FR/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/fr_FR/index.html b/fr_FR/index.html new file mode 100644 index 000000000..880668048 --- /dev/null +++ b/fr_FR/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/fr_FR/maid_model_pack_details.html b/fr_FR/maid_model_pack_details.html new file mode 100644 index 000000000..2a050e8b0 --- /dev/null +++ b/fr_FR/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/fr_FR/preset_animation.html b/fr_FR/preset_animation.html new file mode 100644 index 000000000..ae778c14c --- /dev/null +++ b/fr_FR/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/index.html b/index.html new file mode 100644 index 000000000..6dfedcc58 --- /dev/null +++ b/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/it_IT/chair_model_pack_details.html b/it_IT/chair_model_pack_details.html new file mode 100644 index 000000000..7f49f72c7 --- /dev/null +++ b/it_IT/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/it_IT/custom_altar_recipes.html b/it_IT/custom_altar_recipes.html new file mode 100644 index 000000000..4a64eeee9 --- /dev/null +++ b/it_IT/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/it_IT/custom_javascript_animation.html b/it_IT/custom_javascript_animation.html new file mode 100644 index 000000000..80f91b06a --- /dev/null +++ b/it_IT/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/it_IT/custom_model_pack.html b/it_IT/custom_model_pack.html new file mode 100644 index 000000000..7039748c8 --- /dev/null +++ b/it_IT/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/it_IT/index.html b/it_IT/index.html new file mode 100644 index 000000000..f053e5b0a --- /dev/null +++ b/it_IT/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/it_IT/maid_model_pack_details.html b/it_IT/maid_model_pack_details.html new file mode 100644 index 000000000..56fdc1c9d --- /dev/null +++ b/it_IT/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/it_IT/preset_animation.html b/it_IT/preset_animation.html new file mode 100644 index 000000000..f06cce844 --- /dev/null +++ b/it_IT/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/ja_JP/chair_model_pack_details.html b/ja_JP/chair_model_pack_details.html new file mode 100644 index 000000000..620a40fe3 --- /dev/null +++ b/ja_JP/chair_model_pack_details.html @@ -0,0 +1,152 @@ + + + + + + 椅子モデルパックの詳細 | 東方リトルメイドwiki + + + + + + + + +

# 椅子モデルパックの詳細

  • このwikiは 1.12.2 または 1.16.5 の最新バージョンのTouhou Little Maid modに適用されます。
  • バニラの Minecraft リソースパックの構造を理解する必要があります。
  • JSON 形式の理解が必要です。
  • 現在、 1.10.0 または 1.12.0 Bedrock Edition Model のみをサポートしています。
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/ja_JP/custom_altar_recipes.html b/ja_JP/custom_altar_recipes.html new file mode 100644 index 000000000..f746f17a5 --- /dev/null +++ b/ja_JP/custom_altar_recipes.html @@ -0,0 +1,134 @@ + + + + + + 祭壇レシピのカスタマイズ | 東方リトルメイドwiki + + + + + + + + +

# 祭壇レシピのカスタマイズ

# 1.16.5

1.16.5では、祭壇のレシピを追加するためにデータパックを使用します

データパックの使用方法を理解している必要があります

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

この機能を使用する前に、 CraftTweaker の基本的なスクリプト記述方法を理解していることを確認してください。

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/ja_JP/custom_javascript_animation.html b/ja_JP/custom_javascript_animation.html new file mode 100644 index 000000000..d2876ed84 --- /dev/null +++ b/ja_JP/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + JavaScriptアニメーションのカスタマイズ | 東方リトルメイドwiki + + + + + + + + +

# JavaScriptアニメーションのカスタマイズ

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/ja_JP/custom_model_pack.html b/ja_JP/custom_model_pack.html new file mode 100644 index 000000000..828caa5a7 --- /dev/null +++ b/ja_JP/custom_model_pack.html @@ -0,0 +1,64 @@ + + + + + + モデルパックのカスタマイズ | 東方リトルメイドwiki + + + + + + + + +

# モデルパックのカスタマイズ

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/ja_JP/index.html b/ja_JP/index.html new file mode 100644 index 000000000..f6c8ab02e --- /dev/null +++ b/ja_JP/index.html @@ -0,0 +1,66 @@ + + + + + + 東方リトルメイドwiki + + + + + + + + +
hero

+ 東方リトルメイドwiki +

+ 東方リトルメイドmodの開発に関するwikiがあります +

+ はじめに→ +

カスタムモデル

カスタムメイドや椅子のモデルパッケージの作り方

レシピの変更

データパックでのレシピの変更方法

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

使用している東方リトルメイドmodのバージョンが最新であることを確認してください。

+ + + diff --git a/ja_JP/maid_model_pack_details.html b/ja_JP/maid_model_pack_details.html new file mode 100644 index 000000000..664237563 --- /dev/null +++ b/ja_JP/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + メイドモデルパックの詳細 | 東方リトルメイドwiki + + + + + + + + +

# メイドモデルパックの詳細

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/ja_JP/preset_animation.html b/ja_JP/preset_animation.html new file mode 100644 index 000000000..63444e04d --- /dev/null +++ b/ja_JP/preset_animation.html @@ -0,0 +1,66 @@ + + + + + + プリセット アニメーション | 東方リトルメイドwiki + + + + + + + + +

# プリセット アニメーション

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/ko_KR/chair_model_pack_details.html b/ko_KR/chair_model_pack_details.html new file mode 100644 index 000000000..eb2b38470 --- /dev/null +++ b/ko_KR/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/ko_KR/custom_altar_recipes.html b/ko_KR/custom_altar_recipes.html new file mode 100644 index 000000000..a7dab1e4d --- /dev/null +++ b/ko_KR/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/ko_KR/custom_javascript_animation.html b/ko_KR/custom_javascript_animation.html new file mode 100644 index 000000000..565c6b9f7 --- /dev/null +++ b/ko_KR/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/ko_KR/custom_model_pack.html b/ko_KR/custom_model_pack.html new file mode 100644 index 000000000..5834bd211 --- /dev/null +++ b/ko_KR/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/ko_KR/index.html b/ko_KR/index.html new file mode 100644 index 000000000..421a7c2f0 --- /dev/null +++ b/ko_KR/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/ko_KR/maid_model_pack_details.html b/ko_KR/maid_model_pack_details.html new file mode 100644 index 000000000..8af954502 --- /dev/null +++ b/ko_KR/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/ko_KR/preset_animation.html b/ko_KR/preset_animation.html new file mode 100644 index 000000000..a6b0e0aef --- /dev/null +++ b/ko_KR/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/la_LA/chair_model_pack_details.html b/la_LA/chair_model_pack_details.html new file mode 100644 index 000000000..3622026d0 --- /dev/null +++ b/la_LA/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/la_LA/custom_altar_recipes.html b/la_LA/custom_altar_recipes.html new file mode 100644 index 000000000..f321e7cff --- /dev/null +++ b/la_LA/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/la_LA/custom_javascript_animation.html b/la_LA/custom_javascript_animation.html new file mode 100644 index 000000000..a818a44b6 --- /dev/null +++ b/la_LA/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/la_LA/custom_model_pack.html b/la_LA/custom_model_pack.html new file mode 100644 index 000000000..e1816255b --- /dev/null +++ b/la_LA/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/la_LA/index.html b/la_LA/index.html new file mode 100644 index 000000000..cefdf0bb2 --- /dev/null +++ b/la_LA/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/la_LA/maid_model_pack_details.html b/la_LA/maid_model_pack_details.html new file mode 100644 index 000000000..c8e067e24 --- /dev/null +++ b/la_LA/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/la_LA/preset_animation.html b/la_LA/preset_animation.html new file mode 100644 index 000000000..f4cf9c7fa --- /dev/null +++ b/la_LA/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/maid_model_pack_details.html b/maid_model_pack_details.html new file mode 100644 index 000000000..3dc5ef0e5 --- /dev/null +++ b/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/preset_animation.html b/preset_animation.html new file mode 100644 index 000000000..88aca0ad2 --- /dev/null +++ b/preset_animation.html @@ -0,0 +1,67 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. +img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/pt_BR/chair_model_pack_details.html b/pt_BR/chair_model_pack_details.html new file mode 100644 index 000000000..5a358e226 --- /dev/null +++ b/pt_BR/chair_model_pack_details.html @@ -0,0 +1,152 @@ + + + + + + Chair Model Pack Detalhas | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Detalhas

  • Esta wiki se aplica ao mod Touhou Little Maid na versão mais recente 1.12.2 ou 1.16.5;
  • Requer compreensão da estrutura do pacote de recursos do Minecraft;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/pt_BR/custom_altar_recipes.html b/pt_BR/custom_altar_recipes.html new file mode 100644 index 000000000..35ea40d1e --- /dev/null +++ b/pt_BR/custom_altar_recipes.html @@ -0,0 +1,134 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/pt_BR/custom_javascript_animation.html b/pt_BR/custom_javascript_animation.html new file mode 100644 index 000000000..27c37ae3c --- /dev/null +++ b/pt_BR/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/pt_BR/custom_model_pack.html b/pt_BR/custom_model_pack.html new file mode 100644 index 000000000..5addeb433 --- /dev/null +++ b/pt_BR/custom_model_pack.html @@ -0,0 +1,64 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/pt_BR/index.html b/pt_BR/index.html new file mode 100644 index 000000000..b6e184bc4 --- /dev/null +++ b/pt_BR/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ Existe uma wiki relacionado ao desenvolvimento do mod Touhou Little Maid +

+ Começando → +

Modelo Personalizado

Como fazer um pacote de modelo personalizado da empregada ou cadeira

Modificar Receitas

Como modificar receitas por pacote de dados

Desenvolver Mod

Como compatibilizar o mod Touhou Little Maid ou desenvolver uma adição

Certifique-se de que a versão do mod Touhou Little Maid que você está usando é a mais recente.

+ + + diff --git a/pt_BR/maid_model_pack_details.html b/pt_BR/maid_model_pack_details.html new file mode 100644 index 000000000..956ebe61d --- /dev/null +++ b/pt_BR/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/pt_BR/preset_animation.html b/pt_BR/preset_animation.html new file mode 100644 index 000000000..5f0ce98da --- /dev/null +++ b/pt_BR/preset_animation.html @@ -0,0 +1,66 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/pt_PT/chair_model_pack_details.html b/pt_PT/chair_model_pack_details.html new file mode 100644 index 000000000..f6bf896e1 --- /dev/null +++ b/pt_PT/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/pt_PT/custom_altar_recipes.html b/pt_PT/custom_altar_recipes.html new file mode 100644 index 000000000..7fdb1496d --- /dev/null +++ b/pt_PT/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/pt_PT/custom_javascript_animation.html b/pt_PT/custom_javascript_animation.html new file mode 100644 index 000000000..7f38373f2 --- /dev/null +++ b/pt_PT/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/pt_PT/custom_model_pack.html b/pt_PT/custom_model_pack.html new file mode 100644 index 000000000..373e1af1b --- /dev/null +++ b/pt_PT/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/pt_PT/index.html b/pt_PT/index.html new file mode 100644 index 000000000..6631c1d0d --- /dev/null +++ b/pt_PT/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Make sure the version of Touhou Little Maid mod you're using is the latest.

+ + + diff --git a/pt_PT/maid_model_pack_details.html b/pt_PT/maid_model_pack_details.html new file mode 100644 index 000000000..622e6a27f --- /dev/null +++ b/pt_PT/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/pt_PT/preset_animation.html b/pt_PT/preset_animation.html new file mode 100644 index 000000000..09a186302 --- /dev/null +++ b/pt_PT/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/ru_RU/chair_model_pack_details.html b/ru_RU/chair_model_pack_details.html new file mode 100644 index 000000000..966c0cd11 --- /dev/null +++ b/ru_RU/chair_model_pack_details.html @@ -0,0 +1,152 @@ + + + + + + Детали моделей стульев | Touhou Little Maid Вики + + + + + + + + +

# Детали моделей стульев

  • Этот вики применяется для Touhou Little Maid 1.12.2 и 1.16.5 последней версии;
  • Требует понимания структуры набора ресурсов ванильного Minecraft;
  • Требует понимания формата JSON;
  • В настоящее время поддерживает только модели 1.10.0 или 1.12.0 Bedrock Edition.
  • Для редактирования файлов мы рекомендуем Visual Studio Code, все связанные файлы должны быть сохранены с помощью UTF-8 без BOM.

# Структура наборов моделей

Чтобы лучше понять, как создать пакеты моделей, мы перечислили здесь формат структуры пакетов моделей

папка пакетов моделей
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Описание файлов наборов моделей

Структура полного файла ниже, только части, которые помечены как '(Обязательные)' должны быть заполнены, вы не должны заполнять всё.

Модель поддерживает JSON файлы с комментариями, пожалуйста, используйте их по своему усмотрению.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

На примере выше перечислены все возможные поля, однако для заполнения обязательны только поля с '(Required)', остальные могут быть опущены.

Для простоты можно написать такой файл:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Анимированная иконка

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Файл моделей

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Интернационализация

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/ru_RU/custom_altar_recipes.html b/ru_RU/custom_altar_recipes.html new file mode 100644 index 000000000..53b2ecff9 --- /dev/null +++ b/ru_RU/custom_altar_recipes.html @@ -0,0 +1,134 @@ + + + + + + Свои рецепты Алтаря | Touhou Little Maid Вики + + + + + + + + +

# Свои рецепты Алтаря

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Пожалуйста, убедитесь, что вы знаете, как использовать ванильный датапак Minecaft

{
+  // Фиксированный тип
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Имя типа энтити
+    "type": "minecraft:item",
+    // Доп. NBT данные для энтити
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // Кол-во силы для крафта
+  "power": 0.15,
+  // Вы можете записать до 6 параметров, это ингредиенты для рецепта
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/ru_RU/custom_javascript_animation.html b/ru_RU/custom_javascript_animation.html new file mode 100644 index 000000000..41c5e4d0a --- /dev/null +++ b/ru_RU/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + Пользовательская анимация JavaScript | Touhou Little Maid Вики + + + + + + + + +

# Пользовательская анимация JavaScript

С помощью JavaScript-файлов вы можете добавлять пользовательские анимации для горничной или кресла.

  • Этот вики подходит для Touhou Little Maid 1.12.2 и 1.16.5:
  • Базовое понимание языка JavaScript;
  • Немного математических знаний из средней/старшей школы, в частности тригонометрических функций и полярных координат;
  • Для редактирования скриптов, рекомендуется использовать VSCode с сохранением в кодировке UTF-8 без BOM.

# Базовый формат

Скрипт с анимацией может быть помещён в любую папку, вам нужно только указать путь к файлу для соответствующих моделей. Я рекомендую поместить его в папку animation.

Ниже приведен общий шаблон:

// Это вызывается только если вы хотите использовать GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Сущность/моб, к которой применяется данная анимация
+     * @param limbSwing Скорость движения моба (как спидометр в машине)
+     * @param limbSwingAmount Пройденная мобом дистанция (как счётчик пробега в машине)
+     * @param ageInTicks Возраст моба в тиках, значение постоянно увеличивается от 0
+     * @param netHeadYaw Поворот головы моба
+     * @param headPitch Наклон головы моба
+     * @param scale Значение масштабирования моба. По умолчанию - 0.0625. Применений не найдено.
+     * @param modelMap Группа модели, сохраненная для хэш-карты
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Скрипт для модели
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Простой пример: текущая модет имеет группу костей, названную rotation. Нам нужно, чтобы эта группа вращалась вдоль оси X со скоростью 1 градус каждый тик (18 секунд на 1 оборот). Мы можем написать анимацию так:

// Это вызывается только если вам нужно использовать GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Сперва определим грумму 'rotation' из modelMap
+        rotation = modelMap.get("rotation");
+        // На всякий случай, сделаем простую проверку наличия этой группы у модели
+        if (rotation != undefined) {
+            // С помощью setRotateAngleX, мы установим угол вращения по оси X
+            // ageInTicks - это возраст сущности, значение, постоянно увеличивающееся от 0
+            // С помощью оператора % мы найдём остаток от деленияв промежутке от 0 до 360
+            // Так как функция принимает только радианы, умножим полученное значение на 0.017453292 чтобы превратить градусы в радианы
+            // И так мы получим анимацию вращения на 1 градус каждый тик
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Теперь мы добавим еще одно сложное движение, у нас есть группа с именем wing, и мы хотим, чтобы крылья постоянно двигались вперёд-назад.

Поворот будет по оси Y на угол от -20° до 40°, и цикл будет повторяться каждые 5 секунд.

Тригонометрическая функция соответствует нашим нуждам, так как вы можете использовать синус или косинус, мы будем использовать функцию синуса.

// Это вызывается только если вам нужно использовать GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // Сперва найдём группу 'wing' из modelMap
+        wing = modelMap.get("wing");
+        // На всякий случай сделаем простую проверку наличия этой группы у модели
+        if (wing != undefined) {
+            // Один цикл займёт 5 секунд, что равно 100 тикам
+            // Используя умножение и остаток от деления мы получим желаемое
+            var time = (ageInTicks * 3.6) % 360;
+            // Теперь используется функция Math из JavaScript
+            // Используя синус, мы получим периодическую функцию в интервале от -20° до 40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Так как функция принимает только радианы, умножим полученное значение на 0.017453292 чтобы превратить градусы в радианы
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Все остальные сложные движения могут быть получены с помощью соответствующих фунций.

# Быстрая перезагрузка

Так как вы не можете понять, правильно ли написана анимация, только лишь посмотрев на код, мы добавили возможность быстрой перезагрузки анимации в игре.

После того, как вы загрузите созданный вами набор ресурсов модели, просто используйте следующую команду для перезагрузки всех данных анимации.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Документация по функциям

Зачёркнутый стиль означает, что данные функции устарели в 1.16, вы можете посетить эту ссылку (opens new window) чтобы увидеть исходный код.

# Параметры сущностей

В зависимости от цели, к которой применяется анимация, функции, используемые сущностью, также могут отличаться друг от друга.

# Горничная

Имя функции Возвращаемое значение Примечание
hasHelmet() логический Если горничная надела шлем, возвращает true
hasChestPlate() логический Есди горничная надела нагрудник, возвращает true
hasLeggings() логический Если горничная надела поножи, возвращает true
hasBoots() логический Если горничная надела ботинки, возвращает true
getHelmet() строковый Если горничная надела шлем, возвращает имя шлема из реестра предметов
getChestPlate() строковый Если горничная надела нагрудник, возвращает имя нагрудника из реестра предметов
getLeggings() строковый Если горничная надела поножи, возвращает имя поножей из реестра предметов
getBoots() строковый Если горничная надела ботинки, возвращает имя ботинок из реестра предметов
isBegging() логический Находится ли горничная в режиме попрошайки
isSwingingArms() логический Если горничная двигает руками, эта функция вернет true
getSwingProgress() дробное число Вернёт время анимации рук
isRiding() логический Едет ли горничная
isSitting() логический Сидит ли на месте горничная
isHoldTrolley() логический Держит ли горничная тележку или другие объекты
isRidingMarisaBroom() логический Сидит ли горничная на метле
isRidingPlayer() логический Едет ли горничная верхом на игроке
isHoldVehicle() логический Едет ли горничная на транспорте
isPortableAudioPlay() логический Держит ли горничная портативное радио и играет ли оно
hasBackpack() логический Одет ли на горничной рюкзак
getBackpackLevel() целочисленный Вернёт уровень рюкзака
hasSasimono() логический Одет ли на горничную сазимоно
isSwingLeftHand() логический Использует ли горничная левую руку, вернёт false, если правую
getLeftHandRotation() дробное число [3] Вернёт данные вращения левой руки
getRightHandRotation() дробное число [3] Вернёт данные вращения правой руки
getDim() целочисленный Вернёт измерение, где находится горничная
getWorld() Мир Вернёт данные о мире
getTask() строковый Вернёт занятие горничной, такое как attack, ranged_attack
hasItemMainhand() логический Есть ли предмет в главной (правой) руке горничной
hasItemOffhand() логический Есть ли предмет во вторичной (левой) руке горничной
getItemMainhand() строковый Вернёт имя предмета, находящегося в главной руке горничной, из реестра предметов
getItemOffhand() строковый Вернёт имя предмета, находящегося во вторичной руке горничной, из реестра предметов
inWater() логический В воде ли горничная
inRain() логический Под дождём ли горничная
getAtBiome() строковый Вернёт из реестра имя биома, где находится горничная
getAtBiomeTemp() строковый Вернёт температуру биома, в котором находится горничная
onHurt() логический Больно ли горничной
getHealth() дробное число Вернёт здоровье горничной
getMaxHealth() дробное число Вернёт максимальное здоровье горничной
isSleep() логический Спит ли горничная
getFavorability() целочисленный Вернёт благоприятность горничной
isOnGround() логический Находится ли горничная на блоке
getArmorValue() большоt дробное число (double) Вернёт значение брони горничной
getSeed() большое целое число (long) Вернёт фиксированное значение, уникальное для каждой сущности, схожее с UUID мобов

# Сидение

Имя функции Возвращаемое значение Примечание
isRidingPlayer() логический Сидит ли за этим сидением игрок
hasPassenger() логический Имеет ли это сидение пассажира
getPassengerYaw() дробное число Вернёт поворот пассажира
getYaw() дробное число Вернёт поворот сидения
getPassengerPitch() дробное число Вернёт наклон пассажира
getDim() целочисленный Вернёт ID измерения
getWorld() Мир Вернёт данные о мире
getSeed() большое целое число (long) Вернёт фиксированное значение, уникальное для каждой сущности, схожее с UUID мобов

# Мир

Имя функции Возвращаемое значение Примечание
getWorldTime() большое целое число (long) Вернёт время в тиках (0-24000)
isDay() логический Сейчас день?
isNight() логический Сейчас ночь?
isRaining() логический Идёт ли дождь
isThundering() логический Идёт ли шторм

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/ru_RU/custom_model_pack.html b/ru_RU/custom_model_pack.html new file mode 100644 index 000000000..3735ff93f --- /dev/null +++ b/ru_RU/custom_model_pack.html @@ -0,0 +1,64 @@ + + + + + + Custom Model Pack | Touhou Little Maid Вики + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/ru_RU/index.html b/ru_RU/index.html new file mode 100644 index 000000000..b554d1eeb --- /dev/null +++ b/ru_RU/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Вики + + + + + + + + +
hero

+ Touhou Little Maid Вики +

+ Вики, связанная с разработкой Touhou Little Maid +

+ Начать → +

Пользовательская модель

Как сделать свою горничную, или модель стула

Изменить рецепты

Как изменить рецепты по набору данных

Разработка мода

Как совместить Touhou Little Maid, или разработать дополнение

Убедитесь, что вы используете самую последнюю версию Touhou Little Maid.

+ + + diff --git a/ru_RU/maid_model_pack_details.html b/ru_RU/maid_model_pack_details.html new file mode 100644 index 000000000..e127c9cff --- /dev/null +++ b/ru_RU/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Вики + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Пасхальные яйца горничной

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Другие вопросы

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/ru_RU/preset_animation.html b/ru_RU/preset_animation.html new file mode 100644 index 000000000..c160dd57d --- /dev/null +++ b/ru_RU/preset_animation.html @@ -0,0 +1,66 @@ + + + + + + Заготовленная анимация | Touhou Little Maid Вики + + + + + + + + +

# Заготовленная анимация

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Позиция лямки рюкзака должна быть в корневой группе

+ + + diff --git a/tr_TR/chair_model_pack_details.html b/tr_TR/chair_model_pack_details.html new file mode 100644 index 000000000..43bbcfc3c --- /dev/null +++ b/tr_TR/chair_model_pack_details.html @@ -0,0 +1,144 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/tr_TR/custom_altar_recipes.html b/tr_TR/custom_altar_recipes.html new file mode 100644 index 000000000..eebe7aa96 --- /dev/null +++ b/tr_TR/custom_altar_recipes.html @@ -0,0 +1,130 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/tr_TR/custom_javascript_animation.html b/tr_TR/custom_javascript_animation.html new file mode 100644 index 000000000..c5755b338 --- /dev/null +++ b/tr_TR/custom_javascript_animation.html @@ -0,0 +1,124 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/tr_TR/custom_model_pack.html b/tr_TR/custom_model_pack.html new file mode 100644 index 000000000..0476ab298 --- /dev/null +++ b/tr_TR/custom_model_pack.html @@ -0,0 +1,60 @@ + + + + + + Custom Model Pack | Touhou Little Maid Dev Wiki + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/tr_TR/index.html b/tr_TR/index.html new file mode 100644 index 000000000..826b96f17 --- /dev/null +++ b/tr_TR/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid Dev Wiki + + + + + + + + +
hero

+ Touhou Little Maid Dev Wiki +

+ There is a wiki related to Touhou Little Maid mod development +

+ Get Started → +

Custom Model

How to make a custom maid or chair model package

Modify Recipes

How to modification of recipes by data packet

Develop Mod

How to compat Touhou Little Maid mod, or develop an addition

Kullandığınız Touhou Little Maid modunun güncel olduğuna emin olun.

+ + + diff --git a/tr_TR/maid_model_pack_details.html b/tr_TR/maid_model_pack_details.html new file mode 100644 index 000000000..9571a4802 --- /dev/null +++ b/tr_TR/maid_model_pack_details.html @@ -0,0 +1,169 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid Dev Wiki + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/tr_TR/preset_animation.html b/tr_TR/preset_animation.html new file mode 100644 index 000000000..bab9a5d01 --- /dev/null +++ b/tr_TR/preset_animation.html @@ -0,0 +1,58 @@ + + + + + + Preset Animation | Touhou Little Maid Dev Wiki + + + + + + + + +

# Preset Animation

There are many default animations built in the mod, you only need:

  1. Set the correct name for the group you want to animate in Blockbench.
  2. Call the animation reference of the path in the animation field of the maid_model.json file.

The tlm-utils plugin can automatically call the animation script reference based on the group name, you just need to click the Re-Analyze Animation button. img

The Blockbench plugin provides all available preset animations, you can right-click in the outliner interface to open the preset animation menu
img

# Positioning Group

For rendering positioning, based on the pivot point of the group, can be empty.

# armLeftPositioningBone

Position the left-handed item, its parent group must be armLeft

# armRightPositioningBone

Position the right-handed item, its parent group must be armRight

# backpackPositioningBone

Position the backpack shoulder strap, it must be the root group

+ + + diff --git a/vi_VN/chair_model_pack_details.html b/vi_VN/chair_model_pack_details.html new file mode 100644 index 000000000..4524f8c36 --- /dev/null +++ b/vi_VN/chair_model_pack_details.html @@ -0,0 +1,152 @@ + + + + + + Chair Model Pack Details | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Chair Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.3",
+    // Date creation for model pack
+    "date": "2019-08-20",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // The entity height(pixels) above ground when sat on, default is 3
+            "mounted_height": 3,
+            // Will tamed entities such as maids can sit on it, default is true
+            "tameable_can_ride": false,
+            // Whether the chair has gravity, the default is false
+            "no_gravity": true,
+            // Model name
+            "name": "Cushion",
+            // The description for the model
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // Animation script reference, without this part, chair will not have any animation
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Custom Chair Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:cushion, then the model file will be cushion.json under models/entity folder, the texture will be cushion.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

mounted_height is the height of the entity when it is riding the model, the unit is the pixels above ground, you can use decimals.

The X and Z position of the riding entity will always be the center of the chair entity, please preset the X and Z of the chair models when designing the models.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

+ + + diff --git a/vi_VN/custom_altar_recipes.html b/vi_VN/custom_altar_recipes.html new file mode 100644 index 000000000..08287dd77 --- /dev/null +++ b/vi_VN/custom_altar_recipes.html @@ -0,0 +1,134 @@ + + + + + + Custom Altar Recipes | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Custom Altar Recipes

# 1.16.5

Touhou Little Maid in 1.16.5 use datapack to add altar recipes

Please make sure you know how to use the Minecaft vanilla datapack

{
+  // Fixed type
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // Entity type name
+    "type": "minecraft:item",
+    // Additional NBT data for the entity
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // The necessary power point required for crafting
+  "power": 0.15,
+  // You can write up to 6 parameters, is the ingredients for the recipe
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid in 1.12.2 added compability to CraftTweaker, use CraftTweaker to add/edit altar recipes

Before using this function, please make sure you have understood the basic script writing method for CraftTweaker.

// Simplified template for recipes for importing related ZenClass
+import mods.touhoulittlemaid.Altar;
+
+// Adding item recipes
+// First parameter: String, is the recipe ID, recommend you write in the format of xxxx:xxxx, and make sure it does not share names with other receipes
+// Second parameter: Float, is the necessary power point required for crafting
+// Third parameter: IItemStack, is the output item for the recipe
+// Other parameters: IIngredient, you can write up to 6 parameters, is the input for the recipe
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// Example for changable parameter
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+
+// Example for spawn maid
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for maid revive
+// This recipes can only write 1-5 items, the garage kit items are directly forced to be embedded in the recipes
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// Example for spawn other mob
+// Third parameter: entity id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// To delete a recipe, you can delete through recipe id, this is also why we mentioned you need to set unique recipe id above
+// There is only one parameter, which is recipe id, you can check the included recipe ID through JEI
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
+ + + diff --git a/vi_VN/custom_javascript_animation.html b/vi_VN/custom_javascript_animation.html new file mode 100644 index 000000000..90c37bbe6 --- /dev/null +++ b/vi_VN/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + Custom JavaScript Animation | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Custom JavaScript Animation

Through JavaScript files, you can add custom animations for maid or chair.

  • This wiki is suitable for Touhou Little Maid mod in 1.12.2 and 1.16.5:
  • Basic understanding for JavaScript language;
  • Some high school mathematical knowledge, especially towards Trigonometric function and polar coordinates;
  • For editing script software, VSCode is recommended, all related script files requires to be saved using UTF-8 without BOM.

# Basic Format

Animation script can be put in any location of the folder, you only need to call the file path on the corresponding models. I recommend putting it in the animation folder.

Below is the general template:

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    /**
+     * @param entity Entity that requires the corresponding animation
+     * @param limbSwing The walking speed of the entity (think of it as the speedometer of a car)
+     * @param limbSwingAmount The total walking distance of the entity (think of it as the odometer of a car)
+     * @param ageInTicks The tick time of an entity, the value that constantly increase from 0
+     * @param netHeadYaw The yaw for the head of the entity
+     * @param headPitch The pitch for the head of the entity
+     * @param scale Param for scaling the entity, default is 0.0625, no use found.
+     * @param modelMap The group of the model saved for a hashmap
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // Script for the model
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Here we have a simple example, current model has a group named rotation we want this group to make a rotational movement around the X axis, the movement speed is around 1 degree every tick (18 sec/r), we can write it as below.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // First obtain a group named 'rotation' from modelMap
+        rotation = modelMap.get("rotation");
+        // Just in case, we make a simple check to make sure this group existed
+        if (rotation != undefined) {
+            // Through the function setRotateAngleX in the group, we set its X axis angle
+            // ageInTicks is tick time for the entity, a value that constantly increases starting from 0
+            // Through remainder operator (which is % sign), set the value between 0~360
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            // And with that we achieved the animation of rotating 1 degree every tick
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Now we add another more complex motion, we have a group named wing, and we want a constant back and forth oscillating motion.

Oscillate around Y axis, at a degree between -20°~40°, and one cycle is completed every 5 second.

Trigonometry function fits our need, as you can use sine or cosine for this, we will be using sine function.

// This call is only needed when you need to use GlWrapper
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // First obtain a group named 'wing' from modelMap
+        wing = modelMap.get("wing");
+        // Just in case, we make a simple check to make sure this group existed
+        if (wing != undefined) {
+            // One complete cycle every 5 second, which is 100 tick
+            // Using multiplication and remainder operator we can achieve this requirement
+            var time = (ageInTicks * 3.6) % 360;
+            // This is using the Math function in JavaScript
+            // Construct sine function, and obtain a periodic function between -20°~40°
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // Since this method only accepts radian, we need to multiply it by 0.017453292 to convert into radian
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

All other complex motion can be achieved through the related functions.

# Hot Reload

Since you can't determine if the animation is correct just by looking at the functions, we added a function to hot reload the animation ingame.

After you load the model resource pack you made, just use the following command can reload all animation's data.

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# Function Documentation

Strikethrough style means that the method is deprecated in 1.16, you can visit the link here (opens new window) to view the source code API.

# Entity Parameter

Depending on the target of the added animation, the function that can be used by entity differs as well.

# Maid

Function name Return value Note
hasHelmet() boolean After maid wears helmet, returns true
hasChestPlate() boolean After maid wears chestplate, returns true
hasLeggings() boolean After maid wears leggings, returns true
hasBoots() boolean After maid wears boots, returns true
getHelmet() String After maid wears helmet, returns helmet item's registry name
getChestPlate() String After maid wears chestplate, returns chestplate item's registry name
getLeggings() String After maid wears leggings, returns leggings item's registry name
getBoots() String After maid wears boots, returns boots item's registry name
isBegging() boolean Whether maid is in begging mode
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean Whether maid is in riding mode
isSitting() boolean Whether maid is in standby mode
isHoldTrolley() boolean Whether maid is carrying trolley or other entities
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float Get maid's health
getMaxHealth() float Get maid's max health
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# Chair

Function name Return value Note
isRidingPlayer() boolean Whether the chair is sit by the player
hasPassenger() boolean Whether the chair has passenger
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long Get a fixed value, each entity is different, similar to the entity's UUID

# World

Function name Return value Note
getWorldTime() long Get world's time (tick, 0-24000)
isDay() boolean Whether the world is day
isNight() boolean Whether the world is night
isRaining() boolean Whether the world is raining
isThundering() boolean Whether the world is thundering

# limbSwing & limbSwingAmount Parameter

These are floating points, limbSwing is the walking speed of the entity (think of it as the speedometer of a car), limbSwingAmount is the total walking distance of the entity (think of it as the odometer of a car).

These two data are mainly used on the rotation of the legs and limbs, Minecraft vanilla uses these two basic data to calculate the animation of the arm and leg swinging.

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

Changing the value 0.6662 will control the frequency of the swing, multiplied by the coeffecient of the formula (for example, the leg uses 1.4 as the coeffecient) to change the amplitude of the swing.

Using the vanilla Minecraft formula for arm and leg swinging can make a more natural swinging animation.

# ageInTicks Parameter

Floating point, a variable that self-increase from 0 every tick, a self-changing parameter that's used in most animation function.

# netHeadYaw and headPitch Parameter

Both are floating point, and are degrees value (this is how vanilla Minecraft is designed).

Normally this parameter can be used as a rotation angle, you just need to change it into radian.

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

If the coeffiecient in this section is set to be larger than '0.017453292', there may have some error issue.

# scale Parameter

Floating point, fixed at 0.0625.

A value that has unknown meaning.

# modelMap Parameter

A Map that saves group, using string as keys.

You can get the corresponding group through modelMap.get("xxx"). If there is no group that matches the name, return undefined

Let's say we want to get the target group head:

head = modelMap.get("head");
+
1

Then we can set various parameter using this head group to make animation.

Of course, as a precaution, it's best to set a check for this group, to make sure it's existed.

head = modelMap.get("head");
+if (head != undefined) {
+    // Making various animation
+}
+
1
2
3
4

# Group

We can get various group via modelMap.get("xxx"), the following are the functions that can be used to the obtained group.

Function name Return value Note
setRotateAngleX(float rotateAngleX) None Set the group's X angle
setRotateAngleY(float rotateAngleY) None Set the group's Y angle
setRotateAngleZ(float rotateAngleZ) None Set the group's Z angle
setOffsetX(float offsetX) None Set the group's X coordianate offset
setOffsetY(float offsetY) None Set the group's Y coordianate offset
setOffsetZ(float offsetZ) None Set the group's Z coordianate offset
setHidden(boolean hidden) None Set if the group is hidden
getRotateAngleX() float Obtain the group's X angle
getRotateAngleY() float Obtain the group's Y angle
getRotateAngleZ() float Obtain the group's Z angle
getInitRotateAngleX() float Get ModelRenderer's initialization x rotate angle
getInitRotateAngleY() float Get ModelRenderer's initialization y rotate angle
getInitRotateAngleZ() float Get ModelRenderer's initialization z rotate angle
getOffsetX() float Obtain the group's X coordianate offset
getOffsetY() float Obtain the group's Y coordianate offset
getOffsetZ() float Obtain the group's Y coordianate offset
isHidden() boolean Check if the group is hidden

# GlWrapper

On the top of the script we used a tool called GlWrapper, that can make various translation, rotation and scaling operations.

Function name Return value Note
translate(float x, float y, float z) None Move the entity to coordiate x y z
rotate(float angle, float x, float y, float z) None Using a straight line(0, 0, 0) (x, y, z) as axis, rotate it by angle degree.
scale(float x, float y, float z) None Scale entity on three axis by x y z times
+ + + diff --git a/vi_VN/custom_model_pack.html b/vi_VN/custom_model_pack.html new file mode 100644 index 000000000..62b5dc2f0 --- /dev/null +++ b/vi_VN/custom_model_pack.html @@ -0,0 +1,64 @@ + + + + + + Custom Model Pack | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Custom Model Pack

Touhou Little Maid mod supports custom model packs, you can quickly make your favorite models through software like Blockbench. The game can read the model package in zip compressed file format, or directly read the folder.

The model packs compatible with the mod of 1.12.2 and 1.16.5 are exactly the same, just that the loading method is slightly different:

  • 1.12.2: The model package needs to be loaded like the vanilla resource package.
  • 1.16.5: The model package needs to be placed in the tlm_custom_pack folder under the game's directory.

It is not difficult to make a custom model package from scratch, even if you are a novice. You only need the following free software:

In addition, I also wrote a blockbench plugin for exporting custom models, only applicable to Blockbench 4.0

Plugin site: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# Quick Start

First you need to understand how to use Blockbench, and second you need to install the tlm-utils plugin.
+When everything is done, you can start to make a model package according to the instructions below.

# 1. Create a default model

Create a default model, it will automatically create a default Bedrock Edition model, you can modify on this basis.
+If you choose chair, there is no default model.

img

# 2. Modify it to what you want based on the default model

Need to pay attention to several points:

  1. The maid animation is automatically added based on the group name, so please do not delete or rename at will.

    Want to know what group names are available? Please see the Preset Animation chapter.

    You can right-click in the outliner interface to open the preset animation menu
    img

  2. Pay attention to the parent-child relationship of the group.

  3. Pay attention to the pivot point.

# 3. Create textures

You can edit the textures directly in Blockbench, or you can edit the textures through other image editors.

img

# 4. Create a model pack

img

# 5. Export the model into model pack

img

# 6. Load the model pack & enjoy it!

+ + + diff --git a/vi_VN/index.html b/vi_VN/index.html new file mode 100644 index 000000000..ff7a7618c --- /dev/null +++ b/vi_VN/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +
hero

+ Touhou Little Maid: Tài nguyên cho lập trình viên +

+ Sau đây là các thông tin liên quan đến việc tạo dựng nên mod Touhou Little Maid +

+ Bắt đầu → +

Mô hình tự tạo

Cách để tự tạo gói mô hình cho maid hoặc ghế

Thay đổi công thức

Cách để thay đổi công thức chế tạo với gói dữ liệu

Tạo dựng mod

Cách để tích hợp mod Touhou Little Maid, hoặc tạo nên mod con

Hãy đảm bào rằng phiên bản của Touhou Little Maid mà bạn đang dùng là bản mới nhất.

+ + + diff --git a/vi_VN/maid_model_pack_details.html b/vi_VN/maid_model_pack_details.html new file mode 100644 index 000000000..5421a7b21 --- /dev/null +++ b/vi_VN/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + Maid Model Pack Details | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Maid Model Pack Details

  • This wiki applies to Touhou Little Maid mod in 1.12.2 or 1.16.5 latest version;
  • Requires understanding of vanilla Minecraft's resource pack structure;
  • Requires understanding of JSON format;
  • Currently only supports models for 1.10.0 or 1.12.0 Bedrock Edition Model.
  • For file editing software, we recommend Visual Studio Code, all related files requires to be saved using UTF-8 without BOM.

# Model Packs Structure

To better understand how to create model packs, we listed here the structure format for model packs

model pack folder
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Model Packs Description Files

The file complete structure is as below, only the parts marked '(Required)' requires to be filled, you don't have to fill everything.

The model supports JSON files with comments, please use at your discretion.

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Author list
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // Description for model packs
+    "description": [
+        "Default Model Packs"
+    ],
+    // Model pack version
+    "version": "1.0.0",
+    // Date creation for model pack
+    "date": "2019-07-14",
+    // Model pack icon, without this, the model pack will have no icon
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // The path for the model, use the full resource path
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // The path for the texture, use the full resource path
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // The model size when rendering the item form, default is 1.0
+            "render_item_scale": 0.9,
+            // The size when render the entity, range is between 0.2~2.0, default is 1.0
+            "render_entity_scale": 0.75,
+            // Model name
+            "name": "Reimu Hakurei",
+            // The description for the model
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // Animation script reference, without this part, model will have some default animations
+            // tlm-utils plugins can auto generate the correct animation reference based on the group name
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

The example above listed all usable field, only the field with '(Required)' are needed, the rest can be omitted.

For simplicity, you could write a file like this:

{
+    // Model pack name (Required)
+    "pack_name": "Touhou Project Model Packs",
+    // Model list (Required)
+    "model_list": [
+        {
+            // Model id, no duplication allowed (Required)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

If we do not fill the field for model or texture, it will choose the default model and texture based on model_id.

For the example above, model_id is touhou_little_maid:hakurei_reimu, then the model file will be hakurei_reimu.json under models/entity folder, the texture will be hakurei_reimu.png under textures/entity folder.

If we filled the field for model or texture, then the content has no limit, and can even share a model or texture for multiple characters.

# Animated Icon

Icon does not have size limit, supports both static and animated icons.

Any icon with a scale of 1:1 will be interpreted as static icon. Any long icon that is not 1:1 scale, will be displayed slowly with a 0.1 second interval, which creates the animated effect.

The image below is the icon in the mod, left is static icon, and right is the animated icon.

020

# Model Files

  • This mod is using JSON files in Bedrock 1.10.0 or 1.12.0 for model loading, the document can be exported via model building software Blockbench (opens new window), without additional edits.
  • There are many preset animations, you only need to name a specific group, and then the plugin will automatically generate the corresponding animation script reference when exporting the model. For all available names, please see the Preset Animation chapter.
  • Model also support JavaScript custom animations, you can find the introduction in the custom animation chapter.

# Internationlization

As a game that are facing internationlization, part of the contents of model packs also have internationalization compability.

  • pack_name and description field in model packs support internationalization;
  • name and description field in model list support internationalization.

The method of adding internationalization is pretty simple, just need to begin it using { and end it using }, the middle section is the internationlization key, and then followed by the corresponding language file.

For example we wrote the description as follow (taking just a small section)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

and then under model pack namespace, in the lang folder we create en_us.lang file, and write the content below:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

We only added the English file, but if we want to support Chinese, we can create zh_cn.lang file and write the content as below:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

For the first example, if we did not fill the name file, then the system will automatically create the local key based on model_id, for example model_id is touhou_little_maid:cushion, then the generated language key is model.touhou_little_maid.cushion.name.

description file is not generated by default, you will need to fill that in.

# Compatibility Issue

Since models made by some authors are more unique, they may have some compability issues with maids' various addtional appearance parts. Here we address the issue with these non-standard models and how you can overcome it:

Issues Solution
Uncoordinated animation Write a custom JavaScript animation script
Hold items are in incorrect position Use positional group to define the position
Disable showing hold items As long as armLeft or armRight group does not exist, then the corresponding hold items will not be shown
Backpack is in incorrect position Use positional group to define the position
Backpack, trolley, vehicles, broom, custom head Write some fields as shown in the example below to close it




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // Prevent displaying of backpack
+        "show_custom_head": false,   // Prevent displaying of maid's custom heads
+        "show_hata": false,          // Prevent displaying of hata sasimono, deprecated in 1.16
+        "can_hold_trolley": false,   // prevent maid to hold the trolley, deprecated in 1.16
+        "can_hold_vehicle": false,   // Prevent maid to hold the vehicle, deprecated in 1.16
+        "can_riding_broom": false    // Prevent maid to riding the broom, deprecated in 1.16
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# Maid Easter Eggs

We added maid naming easter egg function, specially named maid can use special models.

Writing easter egg script is pretty simple, the model will automatically detect it as easter egg models, and it won't show in skin menu.

# Normal Easter Eggs

Below is the script for normal naming easter egg. Under normal naming easter egg, maid only need to be named as shown in the tag field to use the model.





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# Encrypted Easter Eggs

Below is the script for encrypted naming easter egg. For encrypted naming easter egg, maid has to be specially named, the naming has to be the same as SHA-1 value in the tag below to use the model.

As the script below, when maid is named IKUN~, because the characters' SHA-1 value is 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511, same as tag field, it will use said model.





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# Other Questions

# Z-fighting Issue

This is an issue with OpenGL itself, during the process of creating models if we used flat or two coinciding solids, we will have this issue.

004

For the issue of one flat cube, you can add texture to one of the sides and keep the others empty, it will solve the issue; for two coinciding cube, move the cube slightly, or delete the coinciding cube.

# Uppercase & Lowercase

In Minecraft, all the file names needs to be lowercase.

+ + + diff --git a/vi_VN/preset_animation.html b/vi_VN/preset_animation.html new file mode 100644 index 000000000..ce280df22 --- /dev/null +++ b/vi_VN/preset_animation.html @@ -0,0 +1,66 @@ + + + + + + Hoạt ảnh có sẵn | Touhou Little Maid: Tài nguyên cho lập trình viên + + + + + + + + +

# Hoạt ảnh có sẵn

Có rất nhiều hoạt ảnh mặc định sẵn có trong mod, bạn chỉ cần:

  1. Đặt đúng tên cho nhóm mà bạn muốn tạo hoạt động trong Blockbench.
  2. Gọi tên đường dẫn đến vùng animation của tệp maid_model.json.

Plugin tlm-utils có thể tự động gọi tên đường dẫn đến hoạt ảnh dựa vào tên nhóm mô hình, bạn chỉ cần nhấp vào nút Re-Analyze Animation. img

Plugin này trên Blockbench cung cấp toàn bộ hoạt ảnh có sẵn khả dụng, bạn có thể nhấp chuột phải trong vùng outliner để mở giao diện hoạt ảnh có sẵn
img

# Sắp xếp các nhóm

Dành cho việc render, các trục pivot của các nhóm có thể được bỏ trống.

# armLeftPositioningBone

Để sắp xếp vị trí cho vật phẩm cầm trên tay trái, nhóm mô hình của nó phải là armLeft

# armRightPositioningBone

Để sắp xếp vị trí cho vật phẩm cầm trên tay phải, nhóm mô hình của nó phải là armRight

# backpackPositioningBone

Để sắp xếp vị trí cho ba lô đeo trên lưng, nhóm mô hình của nó phải là root

+ + + diff --git a/zh_CN/chair_model_pack_details.html b/zh_CN/chair_model_pack_details.html new file mode 100644 index 000000000..3f99c3bdc --- /dev/null +++ b/zh_CN/chair_model_pack_details.html @@ -0,0 +1,152 @@ + + + + + + 坐垫模型包详解 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 坐垫模型包详解

  • 本 wiki 适用于 Touhou Little Maid 模组 1.12.21.16.5 最新版;
  • 需要了解原版 Minecraft 的资源包结构;
  • 需要了解 JSON 格式;
  • 当前仅支持 1.10.0 和 1.12.0 版本基岩版模型
  • 对于文本编辑软件,我们推荐使用 Visual Studio Code,所有的文件都需要以 UTF-8 无 BOM 编码保存。

# 模型包结构

为了更好地理解如何创建模型包,我们在此列出了模型包的结构

模型包文件夹
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_chair.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cushion.json
+        │            └─wheel_chair.json
+        └─textures
+                 └─entity
+                        ├─cushion.png
+                        └─wheel_chair.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 模型包描述文件

文件完整的结构如下,只有标记为“(必须)”的部分才是必须的,你不必填写所有内容。

模型支持带有注释的 JSON 文件,请酌情使用。

{
+    // 模型包名(必须)
+    "pack_name": "Custom Chair Model Packs",
+    // 作者列表
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // 模型包描述文本
+    "description": [
+        "Default Model Packs"
+    ],
+    // 模型包版本
+    "version": "1.0.3",
+    // 创建模型包的日期
+    "date": "2019-08-20",
+    // 模型包图标,没有此字段,模型包将没有图标
+    "icon": "touhou_little_maid:textures/chair_icon.png",
+    // 模型列表(必须)
+    "model_list": [
+        {
+            // 模型 id,不允许重复(必须)
+            "model_id": "touhou_little_maid:cushion",
+            // 模型的路径,请使用完整路径名
+            "model": "touhou_little_maid:models/entity/cushion.json",
+            // 材质的路径,请使用完整路径名
+            "texture": "touhou_little_maid:textures/entity/cushion.png",
+            // 以物品形式渲染时的缩放大小,默认为 1.0
+            "render_item_scale": 0.9,
+            // 以实体形式渲染时的缩放大小,范围为 0.2~2.0,默认为 1.0
+            "render_entity_scale": 0.75,
+            // 坐上去的实体距离地面的高度,单位为距离地面的像素点数,默认为 3
+            "mounted_height": 3,
+            // 女仆等可驯服生物会主动坐上去,默认为 true
+            "tameable_can_ride": false,
+            // 坐垫是否受重力影响,默认为 false
+            "no_gravity": true,
+            // 模型名
+            "name": "Cushion",
+            // 该模型的描述文本
+            "description": [
+                "Just A Normal Cushion"
+            ],
+            // 动画脚本,如果没有此字段,坐垫将不会拥有任何动画
+            // tlm-utils 插件会自动依据组名分析动画脚本引用
+            "animation": [
+                "touhou_little_maid:animation/chair/passenger/rotation.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

上面的示例列出了所有可用字段,只需要带有“(必须)”的字段,其余部分可以省略。

为了简单起见,你可以写一个像这样的文件:

{
+    // 模型包包名(必须)
+    "pack_name": "Custom Chair Model Packs",
+    // 模型列表(必须)
+    "model_list": [
+        {
+            // 模型 id,不允许重复(必须)
+            "model_id": "touhou_little_maid:cushion"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

如果我们不填写 modeltexture,它将基于 model_id 选择默认的模型和材质。

比如上述案例中 model_idtouhou_little_maid:cushion,那么此时模型文件就为该资源域下的 models/entity 文件夹下名为 cushion.json 的文件,材质就为该资源域下的 textures/entity 文件夹下名为 cushion.png 的文件。

如果我们书写了 model 或者 texture 字段,那么其内容并无限制,你甚至可以调用其他模型包中的模型,只需要书写对资源地址即可。

mounted_height 为实体坐上该模型时所处的高度,单位为距离地面的像素点,可以为小数。

需要注意的是坐上的生物的 XZ 位置总是会在坐垫实体所处位置的正中央,请在设计模型时就预设好坐垫模型的 XZ 位置。

# 动态图标

图标没有尺寸限制,支持静态和动态图标。

任何长宽比为 1:1 的图标将被解析为静态图标。 非 1:1 长宽比的长图标将会以 0.1 秒间隔循环显示,从而产生动态效果。

下面的图像是模组中的图标,左边是静态图标,右边是动态图标。

020

# 模型文件

  • 本模组使用基岩版 1.10.01.12.0 JSON 文件来进行模型的加载,该文件可以通过建模软件 Blockbench (opens new window) 直接导出,不需要对其做任何修改。
  • 我们提供了许多预设动画,你只需要创建一个特殊名称的组,那么插件就会在导出模型是依据组名生成对应的动画脚本引用。 想要了解所有可用动画,请查看 预设动画 篇章。
  • 模型也支持 JavaScript 自定义动画,你可以在自定义动画章节中找到对应介绍。

# 国际化

作为一个面向国际化的游戏,模型包的部分内容自然也兼容国际化。

  • 模型包中的 pack_namedescription 字段支持国际化;
  • 模型列表的 namedescription 字段支持国际化。

国际化的添加方式很简单,只需要书写以 { 开头,} 结尾的字符串即可,中间部分为语言文件的 Key,而后书写对应语言文件即可。

比如我们书写了如下的内容(只截取了一小段)

"pack_name": "{pack.vanilla_chair_model.name}",
+"description": ["{pack.vanilla_chair_model.desc}"]
+
1
2

而后在模型包资源域下的 lang 文件夹下创建 en_us.lang 文件,书写如下内容即可:

pack.vanilla_chair_model.name=Custom Chair Model Packs
+pack.vanilla_chair_model.desc=Default Model Packs
+
1
2

我们只添加了英文文件,如果还想再支持中文,创建 zh_cn.lang 文件书写如下内容即可:

pack.vanilla_chair_model.name=自定义坐垫模型包
+pack.vanilla_chair_model.desc=默认的模型包
+
1
2

在前面的案例中,如果我们没有书写 name 字段,那么系统会依据 model_id 自动生成本地化 key,比如 model_idtouhou_little_maid:cushion,那么生成的语言文件 key 为 model.touhou_little_maid.cushion.name

description 字段默认不生成,需要自行主动书写。

+ + + diff --git a/zh_CN/custom_altar_recipes.html b/zh_CN/custom_altar_recipes.html new file mode 100644 index 000000000..992b663ad --- /dev/null +++ b/zh_CN/custom_altar_recipes.html @@ -0,0 +1,133 @@ + + + + + + 自定义祭坛合成 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 自定义祭坛合成

# 1.16.5

Touhou Little Maid在 1.16.5 使用数据包添加祭坛配方

请确保您知道如何使用 Minecaft 原版数据包

{
+  // 固定类型
+  "type": "touhou_little_maid:altar_crafting",
+  "output": {
+    // 实体类型名称
+    "type": "minecraft:item",
+    // 实体附加的 NBT 数据
+    "nbt": {
+      "Item": {
+        "id": "touhou_little_maid:hakurei_gohei",
+        "Count": 1
+      }
+    }
+  },
+  // 合成所必须的 Power 值
+  "power": 0.15,
+  // 你最多可以写 6 个参数,全是合成的输入物品
+  "ingredients": [
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "tag": "forge:rods/wooden"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    },
+    {
+      "item": "minecraft:paper"
+    }
+  ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

# 1.12.2

Touhou Little Maid 在 1.12.2 中添加对 CraftTweaker 的兼容,现在可以通过 CraftTweaker 进行祭坛物品合成的修改了。

使用此功能前请确保你已经了解基本的 CraftTweaker 脚本书写方式。

// 导入相关的 ZenClass,简化后面合成的书写
+import mods.touhoulittlemaid.Altar;
+
+// 添加物品合成
+// 第一个参数:字符串,表明该合成的 ID,建议书写格式 xxxx:xxxx,且最好与其他合成不重名
+// 第二个参数:浮点数,表明该合成需要消耗的 P 点
+// 第三个参数:IItemStack 类型,该合成的输出物品
+// 后续几个为可变参数,可书写 1-6 个参数,均为 IIngredient 类型,表示该合成的输入物品
+Altar.addItemCraftRecipe("touhou_little_maid:craft_camera", 0.2,
+                         <touhou_little_maid:camera>*2,
+                         <ore:blockGlass>, <ore:sand>, <minecraft:diamond_sword>);
+
+// 可变参数的示例,这里仅写成一个合成的输入物品
+Altar.addItemCraftRecipe("touhou_little_maid:craft_apple", 0.2,
+                         <touhou_little_maid:apple>*2,
+                         <ore:blockGlass>);
+// 生成女仆的合成添加
+Altar.addMaidSpawnCraftRecipe("test:replace_maid", 0.5, 
+                              <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// 女仆手办复活的合成添加
+// 这个合成只能书写 1-5 个物品,手办物品是直接强制内嵌在合成中的
+Altar.addMaidReviveCraftRecipe("test:reborn_maid", 0.3, 
+                               <minecraft:grass>, <minecraft:grass>, <minecraft:grass>);
+
+// 其他生物的合成
+// 第三个参数需要书写完整的实体 id
+Altar.addEntitySpawnCraftRecipe("test:spawn_pig", 0.2, "minecraft:pig", 
+                                <minecraft:stone>, <minecraft:stone>, <minecraft:stone>);
+
+// 删除合成,通过合成的 id 来删除合成,这也是为什么上面多次提到需要设置独立合成 id 的原因
+// 只有一个参数,即合成的 id,只需要通过 JEI 就能查到模组自带合成的 id
+Altar.removeRecipe("touhou_little_maid:craft_camera");
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
+ + + diff --git a/zh_CN/custom_javascript_animation.html b/zh_CN/custom_javascript_animation.html new file mode 100644 index 000000000..7b7da1426 --- /dev/null +++ b/zh_CN/custom_javascript_animation.html @@ -0,0 +1,132 @@ + + + + + + 自定义 JavaScript 动画 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 自定义 JavaScript 动画

通过 JavaScript 文件,你可以为女仆或坐垫添加自定义动画。

  • 本 wiki 适用于 Touhou Little Maid 模组 1.12.21.16.5 版本;
  • 需要对 JavaScript 基本语法有简单的了解;
  • 需要高中及以上数学知识,尤其是对三角函数和极坐标的理解。
  • 文本编辑软件推荐 VSCode,相关文本文件均需要用 UTF-8 无 BOM 编码进行存储。

# 基本格式

动画脚本放置在文件夹任意位置均可,只需要在对应模型字段处声明动画文件位置即可。 我建议将它放入 animation 文件夹中。

下面是通用模板:

// 当你需要使用 GlWrapper 时才需要声明这一段代码
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+     /**
+     * @param entity 需要应用动画的实体对象
+     * @param limbSwing 实体在行走过程中的速度(可以理解为汽车的速度表)
+     * @param limbSwingAmount 实体行走的总里程数(可以理解为汽车的里程表)
+     * @param ageInTicks 实体的 tick 时间,一个从 0 开始一直增加的数值
+     * @param netHeadYaw 实体头部的偏航
+     * @param headPitch 实体头部的俯仰
+     * @param scale 实体缩放参数,默认为 0.0625,未发现任何使用的地方
+     * @param modelMap 为一个 map,存储了该模型所有的骨骼
+     */
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // 相关动画的书写
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

这里我们举一个简单的例子,当前模型有一个带有名为 rotation 的骨骼,我们想要把让这个骨骼绕着 X 轴持续的做旋转运动,运动的速度大约为每 tick 1 度(也就是 18 秒转一圈),我们可以这样写动画。

// 当你需要使用 GlWrapper 时才需要声明这一段代码
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+                          headPitch, scale, modelMap) {
+        // 先从 modelMap 中尝试获取名为 rotation 的骨骼
+        rotation = modelMap.get("rotation");
+        // 以防万一,我们做个简单的判定,确保此骨骼一定存在
+        if (rotation != undefined) {
+            // 通过骨骼的 setRotateAngleX 函数设置其 X 轴角度
+            // ageInTicks 为实体的 tick 时间,一个从 0 开始一直增加的数值
+            // 通过取余运算(也就是 % 符号)将这个数限定在 0~360 之间
+            // 因为该方法只接收弧度值,所以需要乘以 0.017453292 转换成对应弧度
+            // 这样我们就实现了每 tick 旋转 1 度的动画
+            rotation.setRotateAngleX(ageInTicks % 360 * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

现在我们再进行一个更加复杂的运动,我们有一个名为 wing 的骨骼,我们想要其能够持续的来回摆动。

摆动围绕 Y 轴,摆动角度在 -20°~40° 之间,每 5 秒做一次完整的往复运动。

这一块恰好需要用到高中所学的三角函数知识,这一块选取正弦或者余弦均可,我们使用正弦函数。

// 当你需要使用 GlWrapper 时才需要声明这一段代码
+var GlWrapper = Java.type("com.github.tartaricacid.touhoulittlemaid.client.animation.script.GlWrapper");
+
+Java.asJSONCompatible({
+    animation: function (entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw,
+        headPitch, scale, modelMap) {
+        // 先从 modelMap 中尝试获取名为 wing 的骨骼
+        wing = modelMap.get("wing");
+        // 以防万一,我们做个简单的判定,确保此骨骼一定存在
+        if (wing != undefined) {
+            // 每 5 秒完整的往复一次,也就是 100 tick
+            // 通过乘法和求余来实现这个功能
+            var time = (ageInTicks * 3.6) % 360;
+            // 这一块调用了 JavaScript 的 Math 函数
+            // 构建正弦函数,获得数值为 -20~40 的周期函数
+            var func = 30 * Math.sin(time * 0.017453292) + 10;
+            // 最后进行参数的应用
+            wing.setRotateAngleY(func * 0.017453292);
+        }
+    }
+})
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

其他复杂的运动均可通过相关函数来实现。

# 游戏内热重载功能

因为干巴巴的函数式并不能确定该动画是否表现正确,我们添加了游戏内的动画热重载功能。

加载模型资源包后,只需使用以下命令即可重新加载所有动画数据。

  • 1.12.2: /maid_res reload
  • 1.16.5: /tlm pack reload

# 函数文档

删除线样式的表示此函数已在 1.16 中被废弃,你可以访问此处连接 (opens new window)查看源码 API。

# 实体参数

依据附加动画的对象不同,entity 参数可用的函数也不相同。

# 女仆

函数名 返回值 备注
hasHelmet() boolean 女仆穿戴头盔后,返回 true
hasChestPlate() boolean 女仆穿戴胸甲后,返回 true
hasLeggings() boolean 女仆穿戴护腿后,返回 true
hasBoots() boolean 女仆穿戴靴子后,返回 true
getHelmet() String 当女仆佩戴头盔后,返回头盔物品的注册名称。
getChestPlate() String 当女仆佩戴胸甲后,返回胸甲物品的注册名称。
getLeggings() String 当女仆佩戴护腿后,返回护腿物品的注册名称。
getBoots() String 当女仆佩戴靴子后,返回头盔物品的注册名称。
isBegging() boolean 女仆是否处于祈求模式
isSwingingArms() boolean If maid is using arms, this function will return true
getSwingProgress() float Get maid's swinging time
isRiding() boolean 女仆是否处于骑乘模式
isSitting() boolean 女仆是否处于待命模式
isHoldTrolley() boolean 女仆是否携带手推车或其他实体。
isRidingMarisaBroom() boolean Whether maid is riding Marisa Broom
isRidingPlayer() boolean Whether maid is riding player
isHoldVehicle() boolean Whether maid is riding vehicle
isPortableAudioPlay() boolean Whether the maid hold portable audio and play it
hasBackpack() boolean Whether maid wearing backpack
getBackpackLevel() int Get maid's backpack level
hasSasimono() boolean Whether maid wearing sasimono
isSwingLeftHand() boolean Whether the maid is swinging left or right arm, return false if it's the right
getLeftHandRotation() float[3] Get the left arm rotation data
getRightHandRotation() float[3] Get the right arm rotation data
getDim() int Get the dimension where the maid is in
getWorld() World Get maid's world data
getTask() String Get maid's task, such as attack, ranged_attack
hasItemMainhand() boolean Whether maid has mainhand item
hasItemOffhand() boolean Whether maid has offhand item
getItemMainhand() String Get maid mainhand item's registry name
getItemOffhand() String Get maid offhand item's registry name
inWater() boolean Whether maid in water
inRain() boolean Whether maid in rain
getAtBiome() String Get maid's biome register name
getAtBiomeTemp() String Get maid's biome temperature enum
onHurt() boolean Whether the maid is on hurt
getHealth() float 获取女仆的生命值
getMaxHealth() float 获取女仆的最大生命值
isSleep() boolean Whether maid is sleep
getFavorability() int Get the maid's favorability
isOnGround() boolean Whether the maid is on ground
getArmorValue() double Get maid's armor value
getSeed() long 获取一个固定值,每个实体都是不同的,类似于该实体的 UUID

# 坐垫

函数名 返回值 备注
isRidingPlayer() boolean 坐垫是否被玩家所坐
hasPassenger() boolean 坐垫是否有乘客
getPassengerYaw() float Get chair passenger's yaw
getYaw() float Get chair's yaw
getPassengerPitch() float Get chair passenger's pitch
getDim() int Get chair's dim id
getWorld() World Get chair's world data
getSeed() long 获取一个固定值,每个实体都是不同的,类似于该实体的 UUID

# 世界

函数名 返回值 备注
getWorldTime() long 获取当前世界的时间(tick,0-24000)
isDay() boolean 当前世界是否为白天
isNight() boolean 当前世界是否为黑夜
isRaining() boolean 当前世界是否在降雨
isThundering() boolean 当前世界是否处于雷雨中

# limbSwinglimbSwingAmount 参数

这些都是浮点数,limbSwing是实体的行走速度(可以将其视为汽车的速度计),limbSwingAmount是实体的总行走距离(可以将其视为汽车的里程表)。

这两个数据主要用于腿部和肢体的旋转,Minecraft原版使用这两个基本数据来计算手臂和腿部摆动的动画。

Math.cos(limbSwing * 0.6662) * limbSwingAmount(left hand)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount(right hand)

Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(left leg)

-Math.cos(limbSwing * 0.6662) * limbSwingAmount * 1.4(right leg)

改变值0.6662将控制摆动的频率,乘以公式的系数 (例如,腿部使用1.4作为系数) 来改变摆动的幅度。

使用原版Minecraft的手臂和腿摆动公式可以使摆动动画更加自然。

# ageInTicks 参数

浮点数,一个从 0 开始每 tick 都会自加的变量,大多数动画中都会用到的自变量。

# netHeadYawheadPitch 参数

二者均为浮点数,单位为角度(这是原版 Minecraft 所设计的)。

通常此参数可以用作旋转角度,你只需要将其更改为弧度。

head.setRotateAngleX(headPitch * 0.017453292);
+head.setRotateAngleY(netHeadYaw * 0.017453292);
+
1
2

如果在此部分设置的系数大于'0.017453292',可能会出现一些错误问题。

# scale 参数

浮点数,固定为 0.0625。

一个含义不明的值。

# modelMap 参数

一个使用字符串作为键的保存组的 Map。

您可以通过modelMap.get("xxx")获取相应的组。 如果没有与名称匹配的组,返回undefined

假设我们想获取目标组head

head = modelMap.get("head");
+
1

然后我们可以使用这个head组来设置各种参数,制作动画。

当然,为了预防起见,最好对该组进行检查,以确保它存在。

head = modelMap.get("head");
+if (head != undefined) {
+    // 制作各种动画
+}
+
1
2
3
4

#

我们可以通过modelMap.get("xxx")获取各种组,以下是可用于获取到的组的函数列表。

函数名 返回值 备注
setRotateAngleX(float rotateAngleX) 设置组的 X 轴角度
setRotateAngleY(float rotateAngleY) 设置组的 Y 轴角度
setRotateAngleZ(float rotateAngleZ) 设置组的 Z 轴角度
setOffsetX(float offsetX) 设置组的 X 轴坐标偏移
setOffsetY(float offsetY) 设置组的 Y 轴坐标偏移
setOffsetZ(float offsetZ) 设置组的 Z 轴坐标偏移
setHidden(boolean hidden) 设置组是否隐藏
getRotateAngleX() float 获取组的 X 轴角度
getRotateAngleY() float 获取组的 Y 轴角度
getRotateAngleZ() float 获取组的 Z 轴角度
getInitRotateAngleX() float 获取 ModelRenderer 的初始化 X 轴旋转角度
getInitRotateAngleY() float 获取 ModelRenderer 的初始化 Y 轴旋转角度
getInitRotateAngleZ() float 获取 ModelRenderer 的初始化 Z 轴旋转角度
getOffsetX() float 获取组的 X 轴坐标偏移
getOffsetY() float 获取组的 Y 轴坐标偏移
getOffsetZ() float 获取组的 Z 轴坐标偏移
isHidden() boolean 检查组是否隐藏

# GlWrapper

在脚本的最开头,我们使用了一个叫做 GlWrapper 的工具,它可以进行各种平移、旋转和缩放操作。

函数名 返回值 备注
translate(float x, float y, float z) 将实体移动至坐标 x y z
rotate(float angle, float x, float y, float z) 以直线 (0, 0, 0) (x, y, z) 为轴,将其旋转 angle 度。
scale(float x, float y, float z) 将实体在三条轴上缩放 x y z 倍
+ + + diff --git a/zh_CN/custom_model_pack.html b/zh_CN/custom_model_pack.html new file mode 100644 index 000000000..5e72bb211 --- /dev/null +++ b/zh_CN/custom_model_pack.html @@ -0,0 +1,64 @@ + + + + + + 自定义模型包 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 自定义模型包

Touhou Little Maid 模组支持自定义模型包,你可以通过 Blockbench 这样的软件快速制作你喜欢的模型。 游戏可以读取 zip 压缩文件格式的模型包,或者直接读取文件夹。

该模型包兼容的模组版本 1.12.21.16.5 完全相同,只是加载方法略有不同:

  • 1.12.2:模型包需要像原版资源包一样加载。
  • 1.16.5:模型包需要放置在游戏目录下的 tlm_custom_pack 文件夹中。

即使你是新手,从零开始制作一个自定义模型包也不难。 你只需要以下免费软件:

此外,我还编写了一个用于导出自定义模型包的 Blockbench 插件,仅适用于 Blockbench 4.0 版本

插件网站: http://page.cfpa.team/TLM-Utils-Plugins/ (opens new window)

# 快速入门

首先你需要了解如何使用 Blockbench,其次你需要安装 tlm-utils 插件。
+当一切完成后,你可以根据下面的说明开始制作一个模型包。

# 1. 创建默认模型

创建一个默认模型,它将自动创建一个默认的基岩版模型,你可以在此基础上进行修改。
+如果你选择 坐垫,没有默认模型。

img

# 2. 基于默认模型,随心所欲的修改它

需要注意以下几点:

  1. 女仆的动画是根据组名自动添加的,所以请不要随意删除或重命名组名。

    想知道哪些组名可用? 请查看 预设动画 篇章。

    你可以右击大纲界面打开预设动画菜单
    img

  2. 注意组的子父级关系。

  3. 注意旋转点。

# 3. 创建材质

你可以直接在 Blockbench 中编辑材质,或者通过其他图像编辑器编辑材质。

img

# 4. 创建一个模型包

img

# 5. 将模型导出到模型包

img

# 6. 愉快的加载模型吧!

+ + + diff --git a/zh_CN/index.html b/zh_CN/index.html new file mode 100644 index 000000000..79e5eb9cb --- /dev/null +++ b/zh_CN/index.html @@ -0,0 +1,66 @@ + + + + + + Touhou Little Maid 开发 Wiki + + + + + + + + +
hero

+ Touhou Little Maid 开发 Wiki +

+ 有关于车万女仆的开发文档 +

+ 点击开始 → +

自定义模型

如何制作自定义的女仆、坐垫模型

合成修改

如何通过数据包修改合成

开发模组

如何为 Touhou Little Maid 模组添加兼容,或者会做附属模组

确保你所使用的 Touhou Little Maid 模组为最新版

+ + + diff --git a/zh_CN/maid_model_pack_details.html b/zh_CN/maid_model_pack_details.html new file mode 100644 index 000000000..a32b8e916 --- /dev/null +++ b/zh_CN/maid_model_pack_details.html @@ -0,0 +1,177 @@ + + + + + + 女仆模型包详解 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 女仆模型包详解

  • 本 wiki 适用于 Touhou Little Maid 模组 1.12.21.16.5 最新版;
  • 需要了解原版 Minecraft 的资源包结构;
  • 需要了解 JSON 格式;
  • 当前仅支持 1.10.0 和 1.12.0 版本基岩版模型
  • 对于文本编辑软件,我们推荐使用 Visual Studio Code,所有的文件都需要以 UTF-8 无 BOM 编码保存。

# 模型包结构

为了更好地理解如何创建模型包,我们在此列出了模型包的结构

模型包文件夹
+│
+├─pack.mcmeta
+├─pack.png
+└─assets
+    └─my_model_pack
+        ├─maid_model.json
+        ├─lang
+        │    ├─en_us.lang
+        │    └─zh_cn.lang
+        ├─models
+        │     └─entity
+        │            ├─cirno.json
+        │            └─daiyousei.json
+        └─textures
+                 └─entity
+                        ├─cirno.png
+                        └─daiyousei.png
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 模型包描述文件

文件完整的结构如下,只有标记为“(必须)”的部分才是必须的,你不必填写所有内容。

模型支持带有注释的 JSON 文件,请酌情使用。

{
+    // 模型包包名(必须)
+    "pack_name": "Touhou Project Model Packs",
+    // 作者列表
+    "author": [
+        "TartaricAcid",
+        "SuccinicAcid"
+    ],
+    // 模型包的描述文本
+    "description": [
+        "Default Model Packs"
+    ],
+    // 模型包的版本
+    "version": "1.0.0",
+    // 模型包的制作时间
+    "date": "2019-07-14",
+    // 模型包的图标,缺失此字段,材质包将没有图标
+    "icon": "touhou_little_maid:textures/maid_icon.png",
+    // 模型列表(必须)
+    "model_list": [
+        {
+            // 模型 id,不允许重复(必须)
+            "model_id": "touhou_little_maid:hakurei_reimu",
+            // 模型所在的位置,使用完整的资源地址
+            "model": "touhou_little_maid:models/entity/hakurei_reimu.json",
+            // 模型所使用的材质位置,使用完整的资源地址
+            "texture": "touhou_little_maid:textures/entity/hakurei_reimu.png",
+            // 渲染成物品形态时的模型大小,默认为 1.0
+            "render_item_scale": 0.9,
+            // 渲染成实体时的大小,范围为 0.2~2.0,默认为 1.0
+            "render_entity_scale": 0.75,
+            // 模型名称
+            "name": "Reimu Hakurei",
+            // 该模型的描述文本
+            "description": [
+                "Shrine Maiden of Hakurei"
+            ],
+            // 动画脚本,如果没有此字段,将会自动调用默认动画
+            // tlm-utils 插件会自动依据组名生成对应的动画脚本引用
+            "animation": [
+                "touhou_little_maid:animation/maid.default.js"
+            ]
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

上面的示例列出了所有可用字段,只需要带有“(必须)”的字段,其余部分可以省略。

为了简单起见,你可以写一个像这样的文件:

{
+    // 模型包包名(必须)
+    "pack_name": "Touhou Project Model Packs",
+    // 模型列表(必须)
+    "model_list": [
+        {
+            // 模型 id,不允许重复(必须)
+            "model_id": "touhou_little_maid:hakurei_reimu"
+        }
+    ]
+}
+
1
2
3
4
5
6
7
8
9
10
11

如果我们不填写 modeltexture,它将基于 model_id 选择默认的模型和材质。

比如上述案例中 model_idtouhou_little_maid:hakurei_reimu,那么此时模型文件就为该资源域下的 models/entity 文件夹下名为 hakurei_reimu.json 的文件,材质就为该资源域下的 textures/entity 文件夹下名为 hakurei_reimu.png 的文件。

如果我们书写了 model 或者 texture 字段,那么其内容并无限制,你甚至可以调用其他模型包中的模型,只需要书写对资源地址即可。

# 动态图标

图标没有大小限制,支持静态图标和动态图标。

任意为 1:1 的图标均会被解析为静态图标。 不为 1:1 的长图,会以 0.1 秒的间隔逐次显示,从而形成动态图效果。

下图就为模组自带的图标,左侧被解析为静态图标,右侧被解析为动态图标

020

# 模型文件

  • 本模组使用基岩版 1.10.01.12.0 JSON 文件来进行模型的加载,该文件可以通过建模软件 Blockbench (opens new window) 直接导出,不需要对其做任何修改。
  • 我们提供了许多预设动画,你只需要创建一个特殊名称的组,那么插件就会在导出模型是依据组名生成对应的动画脚本引用。 想要了解所有可用动画,请查看 预设动画 篇章。
  • 模型也支持 JavaScript 自定义动画,你可以在自定义动画章节中找到对应介绍。

# 国际化

作为一个面向国际化的游戏,模型包的部分内容自然也兼容国际化。

  • 模型包中的 pack_namedescription 字段支持国际化;
  • 模型列表的 namedescription 字段支持国际化。

国际化的添加方式很简单,只需要书写以 { 开头,} 结尾的字符串即可,中间部分为语言文件的 Key,而后书写对应语言文件即可。

比如我们书写了如下的内容(只截取了一小段)

"pack_name": "{pack.vanilla_touhou_model.name}",
+"description": ["{pack.vanilla_touhou_model.desc}"]
+
1
2

而后在模型包资源域下的 lang 文件夹下创建 en_us.lang 文件,书写如下内容即可:

pack.vanilla_touhou_model.name=Vanilla Touhou Model
+pack.vanilla_touhou_model.desc=Default Model Packs
+
1
2

我们只添加了英文文件,如果还想再支持中文,创建 zh_cn.lang 文件书写如下内容即可:

pack.vanilla_touhou_model.name=原版东方资源包
+pack.vanilla_touhou_model.desc=默认的模型包
+
1
2

在前面的案例中,如果我们没有书写 name 字段,那么系统会依据 model_id 自动生成本地化 key,比如 model_idtouhou_little_maid:cushion,那么生成的语言文件 key 为 model.touhou_little_maid.cushion.name

description 字段默认不生成,需要自行主动书写。

# 兼容性问题

鉴于部分作者制作的模型比较特殊,与女仆本身拥有多种附加的外形显示不兼容。 此处专门对非标模型提供了适配的做法:

问题 解决方法
动画不协调 编写自定义 JavaScript 动画脚本
手臂持有物品位置不对 使用定位骨骼进行定位
禁止显示手部物品 只要 armLeft 或者 armRight 骨骼不存在,那么对应的手持物品就不会显示
背包位置不正确 使用定位骨骼进行定位
背包、拉杆箱、载具、扫帚,自定义头颅等位置兼容不对 采用如下书写关闭这些功能




 
 
 
 
 
 



{
+    "pack_name": "Touhou Project Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "show_backpack": false,      // 阻止背包的显示
+        "show_custom_head": false,   // 阻止女仆显示自定义头颅
+        "show_hata": false,          // 阻止旗指物的显示,在 1.16 中弃用
+        "can_hold_trolley": false,   // 阻止女仆持有拉杆箱,在 1.16 中弃用
+        "can_hold_vehicle": false,   // 阻止女仆持有载具,在 1.16 中弃用
+        "can_riding_broom": false    // 阻止女仆骑乘扫帚,在 1.16 中弃用
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10
11
12

# 女仆彩蛋

我们添加了女仆命名彩蛋功能,特殊命名的女仆可以直接调用特定模型。

彩蛋的书写方式非常简单,模组会自动识别其为彩蛋模型,也不会出现在皮肤选择界面。

# 普通彩蛋

如下为普通命名彩蛋的书写方式。 普通命名彩蛋下,女仆只需要命名为下面 tag 字段,就会调用该模型。





 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "tag": "IKUN~"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9

# 加密彩蛋

如下为加密彩蛋的书写方式。 加密彩蛋彩蛋下,女仆需要特定命名,该命名的 SHA-1 值为如下的 tag 字段,才会调用该模型。

如下书写方式,当女仆命名为 IKUN~ 时,因为这个字符的 SHA-1 值为 6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511,符合 tag 字段,会调用该模型。





 
 
 
 



{
+    "pack_name": "Touhou Project Model Pack",
+    "model_list": [{
+        "model_id": "touhou_little_maid:hakurei_reimu",
+        "easter_egg": {
+            "encrypt": true,
+            "tag": "6dadb86d91cc4c0c2c7860e1cb16cec01e1b6511"
+        }
+    }]
+}
+
1
2
3
4
5
6
7
8
9
10

# 其他问题

# 贴图闪烁(Z-fighting)问题

这是 OpenGL 本身的一个问题,我们在制作模型过程中使用了平面、或者是两个重合的立方体,就会出现此问题。

004

对于平面图形导致的问题,只为其中某一面附上材质,另一面留空可以解决此问题;对于两个重合几何体,只需要微移几何体,或者对重合部分的材质进行剔除即可。

# 文件名大小写问题

在 Minecraft 中,所有文件名都必须是小写。

+ + + diff --git a/zh_CN/preset_animation.html b/zh_CN/preset_animation.html new file mode 100644 index 000000000..edaf2f053 --- /dev/null +++ b/zh_CN/preset_animation.html @@ -0,0 +1,66 @@ + + + + + + 预设动画 | Touhou Little Maid 开发 Wiki + + + + + + + + +

# 预设动画

模组内置了许多预设动画,你只需要:

  1. 在 Blockbench 中为想要添加动画的组设置正确的组名。
  2. maid_model.json 文件的 animation 字段中调用正确的动画脚本引用。

tlm-utils 插件可以自动依据组名调用正确的动画脚本引用,你只需点击 分析动画 按钮。 img

Blockbech 插件提供了所有可用的预设动画,你可以右击大纲界面打开预设动画菜单
img

# 定位组

用于渲染定位,基于组的旋转点来的,组内可以为空。

# armLeftPositioningBone

左手物品的位置,其父组必须是 armLeft

# armRightPositioningBone

右手物品的位置,其父组必须是 armRight

# backpackPositioningBone

背包肩带位置,它必须位于根目录下

+ + +