-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48ffeec
commit 22e2cae
Showing
15 changed files
with
2,800 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy site | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Deploy: | ||
name: Deploy to Github Pages 🚀 | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
Build: | ||
name: Build Vuepress 🔧 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build site | ||
run: npm run build | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "docs/.vuepress/dist" | ||
|
||
- name: Deploy & update | ||
id: deployment | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: "docs/.vuepress/dist" | ||
publish_branch: gh-pages | ||
|
||
Deploy: | ||
name: Deploy to Github Pages 🚀 | ||
runs-on: ubuntu-latest | ||
needs: Build | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.vscode/ | ||
node_modules/ | ||
.temp | ||
.cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"files.autoSave": "off" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { viteBundler } from "@vuepress/bundler-vite"; | ||
import { defineUserConfig } from "vuepress"; | ||
|
||
import theme from "./definitions/theme"; | ||
import plugins from "./definitions/plugins"; | ||
|
||
export default defineUserConfig({ | ||
base: "/", | ||
bundler: viteBundler(), | ||
head: [["meta", { charset: "utf-8" }]], | ||
theme, | ||
plugins, | ||
lang: "zh-TW", | ||
title: "芒果的 KubeJS 筆記本", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { markdownContainerPlugin } from "@vuepress/plugin-markdown-container"; | ||
|
||
const plugins = [ | ||
markdownContainerPlugin({ | ||
type: "tip", | ||
}), | ||
]; | ||
|
||
export default plugins; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { defaultTheme } from "@vuepress/theme-default"; | ||
|
||
const theme = defaultTheme({ | ||
logo: "/images/logo.png", | ||
logoAlt: "", | ||
|
||
colorMode: "dark", | ||
colorModeSwitch: true, | ||
|
||
repo: "Mango-Minecraft-Project/Mango-KubeJScripts", | ||
editLinkPattern: ":repo/edit/:branch/:path", | ||
|
||
lastUpdated: true, | ||
contributors: true, | ||
|
||
navbar: [ | ||
{ text: "Discord", link: "https://evanhsieh0415.github.io/links/discord.html" }, | ||
], | ||
|
||
sidebar: [ | ||
"/downloads/", | ||
"/links/", | ||
"/tips-and-tricks/", | ||
"/notes/", | ||
"/snippets/" | ||
], | ||
|
||
editLinkText: "在 GitHub 編輯此頁面", | ||
lastUpdatedText: "最後更新", | ||
contributorsText: "作者", | ||
backToHome: "返回首頁", | ||
openInNewWindow: "在新視窗中開啟", | ||
toggleColorMode: "切換色彩模式", | ||
toggleSidebar: "切換選單列", | ||
tip: "提示", | ||
warning: "注意", | ||
danger: "警告", | ||
notFound: ["這個頁面不存在"], | ||
selectLanguageText: "選擇語言", | ||
}); | ||
|
||
export default theme; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 芒果的 KubeJS 筆記 | ||
|
||
以下資訊皆以KubeJS最新支援版本、Forge(NeoForge優先,LexForge次要)為主 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 下載測試版 KubeJS | ||
|
||
- [Rhino NeoForge][saps_meven-rhino_neoforge] | ||
- [KubeJS NeoForge][saps_meven-kubejs_neoforge] | ||
|
||
[saps_meven-rhino_neoforge]: https://maven.saps.dev/#/releases/dev/latvian/mods/rhino-neoforge | ||
[saps_meven-kubejs_neoforge]: https://maven.saps.dev/#/releases/dev/latvian/mods/kubejs-neoforge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# KubeJS 相關連結 | ||
|
||
## 官方連結 | ||
|
||
- 官網:[https://kubejs.com/](https://kubejs.com/) | ||
- Modrinth:[https://modrinth.com/mod/kubejs](https://modrinth.com/mod/kubejs) | ||
- CurseForge:[https://www.curseforge.com/minecraft/mc-mods/kubejs](https://www.curseforge.com/minecraft/mc-mods/kubejs) | ||
- Github:[https://github.com/KubeJS-Mods/KubeJS](https://github.com/KubeJS-Mods/KubeJS) | ||
- Discord:[https://discord.com/invite/lat](https://discord.com/invite/lat) | ||
- Wiki:[https://kubejs.com/wiki/](https://kubejs.com/wiki/) | ||
- 舊版 Wiki | ||
- KubeJS 5:[https://wiki.latvian.dev/books/kubejs-legacy](https://wiki.latvian.dev/books/kubejs-legacy) | ||
- KubeJS 6+:[https://wiki.latvian.dev/books/kubejs](https://wiki.latvian.dev/books/kubejs) | ||
|
||
## 第三方連結 | ||
|
||
- MC百科:[https://www.mcmod.cn/class/2450.html](https://www.mcmod.cn/class/2450.html) | ||
- QQ 群 | ||
- 日常交流群:665153457 | ||
- 純討論群(禁止閒聊):742635193 | ||
- DoDo 群:[https://imdodo.com/s/208104](https://imdodo.com/s/208104) | ||
- KubeJS 中文開發論壇:[https://kjscndev.flarum.cloud/](https://kjscndev.flarum.cloud/) | ||
- Wudji | ||
- KubeJS 5:[https://wudji.gitbook.io/xplus-kubejs-tutorial-v1-zh_cn](https://wudji.gitbook.io/xplus-kubejs-tutorial-v1-zh_cn) | ||
- KubeJS 6+:[https://wudji.gitbook.io/xplus-kubejs-tutorial-v2-zh_cn](https://wudji.gitbook.io/xplus-kubejs-tutorial-v1-zh_cn) | ||
- 芒果凍布丁 | ||
- 筆記:[https://hackmd.io/@mango-minecraft-notes/KubeJS-Notes](https://hackmd.io/@mango-minecraft-notes/KubeJS-Notes) | ||
- 程式碼儲存庫:[https://github.com/Mango-Minecraft-Project/Mango-KubeJScripts](https://github.com/Mango-Minecraft-Project/Mango-KubeJScripts) | ||
|
||
--- | ||
|
||
## 其他 | ||
|
||
- 基礎知識、文件 | ||
- Quick Reference | ||
- JavaScript:[https://wangchujiang.com/reference/docs/javascript.html](https://wangchujiang.com/reference/docs/javascript.html) | ||
- ES2015+:[https://wangchujiang.com/reference/docs/es6.html](https://wangchujiang.com/reference/docs/es6.html) | ||
- MDN Web Docs:[https://developer.mozilla.org/zh-CN/docs/Web/JavaScript](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript) | ||
- JSDoc:[https://jsdoc.app/](https://jsdoc.app/) | ||
- 工具 | ||
- VSCode(Visual Studio Code):[https://code.visualstudio.com/](https://code.visualstudio.com/) | ||
- VSCode 擴展 | ||
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) | ||
- [Easy CodeSnap](https://marketplace.visualstudio.com/items?itemName=ArthurLobo.easy-codesnap) | ||
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
- 模組 | ||
- ProbeJS:[https://www.mcmod.cn/class/6486.html](https://www.mcmod.cn/class/6486.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 筆記 | ||
|
||
## DamageSource 中 `immediate` 與 `actual` 的差異 | ||
|
||
`immediate` 回傳直接傷害者 | ||
`actual` 回傳傷害所有者 | ||
|
||
舉例來說,玩家拿弓箭射實體: | ||
- `immediate` 回傳 `Arrow` (弓箭) | ||
- `actual` 回傳 `Player` (玩家) | ||
|
||
## `PlayerEvents.chat` 與 `PlayerEvents.decorateChat` 的差異 | ||
|
||
- `PlayerEvents.chat`:可以被取消,主要用途為取消事件。 | ||
- `PlayerEvents.decorateChat`:不能被取消,主要用途為修改訊息。 | ||
|
||
## `ItemStack.weakNBT()` 與 `ItemStack.strongNBT()` 的差異 | ||
|
||
以 `Item.of("diamond_sword", "{damage:50}")` 舉例 | ||
|
||
- `.weakNBT()` | ||
若物品的nbt包含 `{damage:50}` 則可以使用 | ||
舉例: | ||
- :o: `{damage:50}` | ||
- :o: `{damage:50, display:"Sword"}` | ||
- :x: `{display:"Sword"}` | ||
- `.strongNBT()` | ||
若物品的nbt **僅** 包含 `"{damage:50}"` 則可以使用 | ||
舉例: | ||
- :o: `{damage:50}` | ||
- :x: `{damage:50, display:"Sword"}` | ||
- :x: `{display:"Sword"}` |
Oops, something went wrong.