From 6b4df159c3d38b90ea870a3e58520ce448015d4c Mon Sep 17 00:00:00 2001 From: offends Date: Sat, 13 Dec 2025 19:41:58 +0800 Subject: [PATCH] first commit --- .drone.yml | 83 +++++++++++ .gitignore | 54 +++++++ Minecraft_MC/Minecraft_MC安装文档.md | 205 +++++++++++++++++++++++++++ README.md | 4 + builder.sh | 95 +++++++++++++ 5 files changed, 441 insertions(+) create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100644 Minecraft_MC/Minecraft_MC安装文档.md create mode 100644 README.md create mode 100644 builder.sh diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..196d4a6 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,83 @@ +# kubectl create secret generic build-node-secret \ +# --from-literal=HOST="" \ +# --from-file=KEY=./*.pem \ +# --from-literal=PORT="22" \ +# --from-literal=PATH="" \ +# --namespace=drone + +kind: pipeline +type: kubernetes +name: MD BUILD + +trigger: + event: + include: + - custom + +workspace: + base: /drone/ + path: /drone/Game + +steps: +- name: 编译文档正文 + image: registry.cn-hangzhou.aliyuncs.com/offends/drone:ubuntu-22.04 + pull: if-not-exists + commands: + - bash builder.sh + - rm -rf ./builder.sh +- name: 生产环境部署 + image: appleboy/drone-scp + pull: if-not-exists + settings: + host: + from_secret: HOST + key: + from_secret: KEY + port: + from_secret: PORT + target: + from_secret: PATH + user: root + source: ../Game + overwrite: true +- name: 重启生产博客组件 + image: registry.cn-hangzhou.aliyuncs.com/offends/drone:ubuntu-22.04 + volumes: + - name: kubectl + path: /usr/local/bin + - name: config + path: /root/.kube + commands: + - /usr/local/bin/kubectl -n blog rollout restart deployment blog +volumes: +- name: kubectl + host: + path: /usr/local/bin + type: File +- name: config + host: + path: /root/.kube +--- +kind: secret +name: HOST +get: + path: build-node-secret + name: HOST +--- +kind: secret +name: KEY +get: + path: build-node-secret + name: KEY +--- +kind: secret +name: PORT +get: + path: build-node-secret + name: PORT +--- +kind: secret +name: PATH +get: + path: build-node-secret + name: PATH \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc7d29a --- /dev/null +++ b/.gitignore @@ -0,0 +1,54 @@ +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# ---> Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + diff --git a/Minecraft_MC/Minecraft_MC安装文档.md b/Minecraft_MC/Minecraft_MC安装文档.md new file mode 100644 index 0000000..98a58f4 --- /dev/null +++ b/Minecraft_MC/Minecraft_MC安装文档.md @@ -0,0 +1,205 @@ +> 本文作者:丁辉 + +# Minecraft_MC安装文档 + +## 一、安装前电脑环境准备 + +### 基础准备 + +- 安装 Java 环境 [Java 安装包](https://www.java.com/zh-CN/download/) +- 下载 Minecraft 启动器 [Minecraft启动器](https://www.minecraft.net/zh-hans/download) +- 常用第三方 Minecraft 启动器 [PCL启动器](https://github.com/Meloong-Git/PCL) + +### 增强游戏体验 + +- 联机工具下载 [Radmin VPN](https://www.radmin-vpn.com/) +- 皮肤下载 [NameMC](https://zh-cn.namemc.com/minecraft-skins#google_vignette) +- 游戏内指令名称和列表 [Minecraft ID and Name Lists](https://www.digminecraft.com/lists/index.php) + +## 二、模组加载器准备 + +- Forge [下载](https://files.minecraftforge.net/net/minecraftforge/forge/) + +- Fabric (推荐) [下载](https://fabricmc.net/use/installer/) + + > 必备模组 [Fabric API](https://modrinth.com/mod/fabric-api) + +> 在 Forge 下使用 Fabric 模组需要用到的扩展: +> +> [Forgified Fabric API](https://www.curseforge.com/minecraft/mc-mods/forgified-fabric-api) +> +> [Sinytra Connector](https://www.curseforge.com/minecraft/mc-mods/sinytra-connector) +> +> [Forge Config API Port](https://modrinth.com/mod/forge-config-api-port) +> +> [Mod Menu](https://modrinth.com/mod/modmenu) + +## 三、基础实用模组安装 + +> 模组下载网站 +> +> - [Modrinth](https://modrinth.com/mods) +> - [CursFeorge](https://www.curseforge.com/minecraft/mc-mod) + +### 必安装模组 + +- 自动汉化更新模组 + + [I18nUpdateMod](https://modrinth.com/mod/i18nupdatemod) + +- 摆脱输入法频繁误触 + + [IMBlocker](https://modrinth.com/mod/imblocker-original) + +- 矿物发光、无缝玻璃 + + [new-glowing-ores](https://www.curseforge.com/minecraft/texture-packs/new-glowing-ores) + + > 前置模组: + > + > [Sodium](https://modrinth.com/mod/sodium) + > + > [Indium](https://modrinth.com/mod/indium) + > + > [Iris Shaders](https://modrinth.com/mod/iris) + > + > [Continuity](https://modrinth.com/mod/continuity) + +- 显示生物血量和状态、显示工具状态、显示工作状态 + + [Jade](https://modrinth.com/mod/jade) + +- 显示饱和度/消耗度值 + + [AppleSkin](https://modrinth.com/mod/appleskin) + +- 滚轮滑动存放物品 + + [Mouse Tweaks](https://modrinth.com/mod/mouse-tweaks) + +- 地图 + + [Xaero's Minimap](https://modrinth.com/mod/xaeros-minimap) + + [Xaero's World Map](https://modrinth.com/mod/xaeros-world-map) + +- 连锁挖矿 + + FTB Ultimine: + + **安装** + + https://www.curseforge.com/minecraft/mc-mods/ftb-ultimine-forge + + > 前置模组 + > + > [Architectury API](https://modrinth.com/mod/architectury-api) + > + > [FTB Library (Forge)](https://www.curseforge.com/minecraft/mc-mods/ftb-library-forge) + + https://www.curseforge.com/minecraft/mc-mods/ftb-ultimine-fabric + + > 前置模组 + > + > [Architectury API](https://modrinth.com/mod/architectury-api) + > + > [FTB Library (Fabric)](https://www.curseforge.com/minecraft/mc-mods/ftb-library-fabric) + + **切换挖矿形状** + + Tilde + Shift + 鼠标滚轮 + +- 灵魂出窍 + + [Tweakeroo](https://modrinth.com/mod/tweakeroo) + + > - Forge 前置模组 + > + > [MaFgLib](https://modrinth.com/mod/mafglib) + > + > - Fabric 前置 + > + > [MaLiLib](https://modrinth.com/mod/malilib) + + **配置设置** + + 打开模组配置 > 点击 Tweaks > 寻找 FreeCamera > 更换按键即可 + + **汉化** + + [Masa Mod Translation Pack](https://modrinth.com/resourcepack/masa-mod-translationpack) + +- 背包一键整理 + + [Inventory Profiles Next](https://modrinth.com/mod/inventory-profiles-next) + + > - Forge 前置模组 + > + > [libIPN](https://modrinth.com/mod/libipn) + > + > [Kotlin for Forge](https://modrinth.com/mod/kotlin-for-forge) + > + > - Fabric 前置 + > + > [libIPN](https://modrinth.com/mod/libipn) + > + > [Fabric Language Kotlin](https://modrinth.com/mod/fabric-language-kotlin) + +- 物品管理器 + + - JEI [Just Enough Items](https://modrinth.com/mod/jei) + + > 支持拼音搜索: + > + > [JustEnoughCharacters](https://modrinth.com/mod/justenoughcharacters) + > + > 支持查看物品来源: + > + > [Just Enough Resources (JER)](https://modrinth.com/mod/just-enough-resources-jer) + + - REI [Roughly Enough Items (REI)](https://modrinth.com/mod/rei) + + - EMI [EMI](https://modrinth.com/mod/emi) + +- 空手拾取方块或生物 + + [Carry On](https://modrinth.com/mod/carry-on) + + > 前置模组 + > + > [Forge Config Screens](https://modrinth.com/mod/forge-config-screens) + + **修改配置** + + > 文件位置(根据自身情况而定): + > + > C:\Users\admin\AppData\Roaming\.minecraft\versions\fabric-loader***\config\carryon-common.json + + ```json + //块和实体可以拾取的最大距离 + “maxDistance”:2.5, + //生存模式下可拾取实体的最大宽度 + “maxEntityWidth”: 10, + //生存模式下可拾取的实体的最大高度 + “maxEntityHeight”: 10, + //实体的最大堆叠限制 + “maxEntityStackLimit”:10, + //允许搬运全部方块 + "pickupAllBlocks": true, + //允许搬运敌对生物 + "pickupHostileMobs": true, + //允许搬运玩家 + "pickupPlayers": true, + //允许搬运基岩 + "pickupUnbreakableBlocks": true, + //禁止搬运蛋糕 + //"minecraft:cake", + //禁止搬运潜影贝 + //"minecraft:shulker", + ``` + +## 四、资源包 + +- 真实环境 + + [Stay True](https://www.curseforge.com/minecraft/texture-packs/stay-true) diff --git a/README.md b/README.md new file mode 100644 index 0000000..f989b8a --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +* + +# Game + diff --git a/builder.sh b/builder.sh new file mode 100644 index 0000000..0b88795 --- /dev/null +++ b/builder.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +############################################################################################# +# 用途: 初始化文档脚本 +# 作者: 丁辉 +# 编写时间: 2025-12-13 +############################################################################################# + +# 定义函数信息 +RED='\033[0;31m' +NC='\033[0m' +GREEN='\033[32m' +YELLOW='\033[33m' +TIME="+%Y-%m-%d %H:%M:%S" + +function SEND_INFO() { + info=$1 + echo -e "${GREEN}$(date "$TIME") INFO: $info${NC}" +} +function SEND_WARN() { + warn=$1 + echo -e "${YELLOW}$(date "$TIME") WARN: $warn${NC}" +} +function SEND_ERROR() { + error=$1 + echo -e "${RED}$(date "$TIME") ERROR: $error${NC}" +} + +# 整理文档 +function Clean_File() { + SEND_INFO "------------ 开始清理仓库内无关文件 ------------" + SEND_INFO "------------ Git 文件清理 ------------" + rm -rf .git + rm -rf .gitignore + rm -rf .drone.yml + rm -rf ./README.md + SEND_INFO "------------ 特殊文件/目录清理 ------------" + find . -type f ! \( -name "*.md" -o -name "builder.sh" \) -exec rm {} + + SEND_INFO "------------ 开始初始化文档 ------------" + SEND_INFO "------------ README.md 文件初始化 ------------" + # 清理第一行带有 * 号文件 + for i in $(find ./ -type f -name "*.md"); do + if head -n 1 ${i} | grep -q '^*'; then + rm ${i} + fi + done + # 更改剩下的文件名称 + for i in $(find ./ -type f -name "README.md"); do + path=$(echo $i | awk -F'/README.md' '{print "游戏-"$1}') + name=$(sed -n '3p' $i | awk '{print $2}') + mv $i ${path}/${name}.md + done +} + +# 初始化 MD 文件 +function Init_Docs() { + SEND_INFO "------------ 初始化文档正文 ------------" + for i in $(find ./ -type f -name "*.md" | sed 's|^./||'); do + DNAME=$(echo $i | awk -F '/' '{print "游戏-"$1}') + MDNAME=$(echo $i | awk -F '/' '{print $(NF)}' | awk -F '.' '{print $1}') + sed -i "1i---\n\ +title:\n\ +keywords: admin-template,vue,element,后台模板\n\ +banner:\n\ + type: img\n\ + bgurl: /img/md.png\n\ + banner_text: 欢迎观看\n\ +author: Offends\n\ +categories:\n\ +toc: true\n\ +single_column: true\n\ +---\n" $i + sed -i "s#title:#title: $MDNAME#g" $i + sed -i "s#categories:#categories: $DNAME#g" $i + done +} + +function Replace_Url() { + SEND_INFO "------------ 开始替换 Gitee 链接为 Blog 链接 ------------" + for i in $(grep -r 'https://gitee.com/offends/' . | awk -F ':' '{print $1}'); do + sed -i 's|https://gitee.com/offends/\(.*\)blob/main/\(.*\.md\)|https://blog.offends.cn/\1\2|g' $i || true + sed -i 's|\.md$|.html|g' $i || true + sed -i 's|\.md)$|.html)|g' $i || true + done +} + +function All() { + SEND_INFO "开始构建......" + Clean_File + Init_Docs + Replace_Url + SEND_INFO "构建完成" +} + +All \ No newline at end of file