This commit is contained in:
parent
c9fb6309cc
commit
80f21bb6f6
|
|
@ -19,11 +19,130 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
|
||||
- name: Read project configuration
|
||||
id: project-config
|
||||
run: |
|
||||
echo "=== 读取项目配置 ==="
|
||||
if [ -f ".project/globe.json" ]; then
|
||||
echo "找到 .project/globe.json 文件"
|
||||
cat .project/globe.json
|
||||
|
||||
# 使用 jq 解析 JSON 文件
|
||||
VERSION=$(jq -r '.version // "0.0.0.0"' .project/globe.json)
|
||||
INITIALIZED=$(jq -r '.initialized // "false"' .project/globe.json)
|
||||
NAME=$(jq -r '.name // "MyPack"' .project/globe.json)
|
||||
AUTHOR=$(jq -r '.author // "Unknown"' .project/globe.json)
|
||||
MC_VERSION=$(jq -r '.["mc-version"] // "1.20.1"' .project/globe.json)
|
||||
MODLOADER=$(jq -r '.modloader // "forge"' .project/globe.json)
|
||||
MODLOADER_VERSION=$(jq -r '.["modloader-version"] // "47.1.0"' .project/globe.json)
|
||||
INDEX_FILE=$(jq -r '.["index-file"] // "index.toml"' .project/globe.json)
|
||||
|
||||
echo "版本: $VERSION"
|
||||
echo "已初始化: $INITIALIZED"
|
||||
echo "名称: $NAME"
|
||||
echo "作者: $AUTHOR"
|
||||
echo "MC版本: $MC_VERSION"
|
||||
echo "模组加载器: $MODLOADER"
|
||||
echo "模组加载器版本: $MODLOADER_VERSION"
|
||||
echo "索引文件: $INDEX_FILE"
|
||||
|
||||
# 设置输出变量
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "initialized=$INITIALIZED" >> $GITHUB_OUTPUT
|
||||
echo "name=$NAME" >> $GITHUB_OUTPUT
|
||||
echo "author=$AUTHOR" >> $GITHUB_OUTPUT
|
||||
echo "mc-version=$MC_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "modloader=$MODLOADER" >> $GITHUB_OUTPUT
|
||||
echo "modloader-version=$MODLOADER_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "index-file=$INDEX_FILE" >> $GITHUB_OUTPUT
|
||||
|
||||
# 根据配置设置保留文件
|
||||
if [ "$INITIALIZED" = "true" ]; then
|
||||
KEEP_FILES="config.json database.db uploads/* logs/* cache/*"
|
||||
echo "项目已初始化,设置保留文件: $KEEP_FILES"
|
||||
echo "keep_files=$KEEP_FILES" >> $GITHUB_OUTPUT
|
||||
else
|
||||
KEEP_FILES=""
|
||||
echo "项目未初始化,不设置保留文件"
|
||||
echo "keep_files=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
else
|
||||
echo "⚠️ 未找到 .project/globe.json 文件,使用默认配置"
|
||||
echo "version=0.0.0.0" >> $GITHUB_OUTPUT
|
||||
echo "initialized=false" >> $GITHUB_OUTPUT
|
||||
echo "name=MyPack" >> $GITHUB_OUTPUT
|
||||
echo "author=Unknown" >> $GITHUB_OUTPUT
|
||||
echo "mc-version=1.20.1" >> $GITHUB_OUTPUT
|
||||
echo "modloader=forge" >> $GITHUB_OUTPUT
|
||||
echo "modloader-version=47.1.0" >> $GITHUB_OUTPUT
|
||||
echo "index-file=index.toml" >> $GITHUB_OUTPUT
|
||||
echo "keep_files=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Update pack.toml if initialized is true
|
||||
if: steps.project-config.outputs.initialized == 'true'
|
||||
run: |
|
||||
echo "=== 更新 pack.toml 版本 ==="
|
||||
if [ -f "pack.toml" ]; then
|
||||
echo "找到 pack.toml 文件,更新版本..."
|
||||
CURRENT_VERSION=$(grep '^version =' pack.toml | head -1 | cut -d'"' -f2)
|
||||
NEW_VERSION="${{ steps.project-config.outputs.version }}"
|
||||
echo "当前版本: $CURRENT_VERSION"
|
||||
echo "新版本: $NEW_VERSION"
|
||||
|
||||
# 更新版本号
|
||||
if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]; then
|
||||
sed -i "s/version = \"$CURRENT_VERSION\"/version = \"$NEW_VERSION\"/" pack.toml
|
||||
echo "✅ pack.toml 版本已更新为: $NEW_VERSION"
|
||||
else
|
||||
echo "版本相同,无需更新"
|
||||
fi
|
||||
|
||||
# 显示更新后的文件内容
|
||||
echo "=== 更新后的 pack.toml ==="
|
||||
cat pack.toml
|
||||
else
|
||||
echo "⚠️ 未找到 pack.toml 文件"
|
||||
fi
|
||||
|
||||
- name: Initialize pack if initialized is false
|
||||
if: steps.project-config.outputs.initialized == 'false'
|
||||
run: |
|
||||
echo "=== 初始化 packwiz 项目 ==="
|
||||
echo "名称: ${{ steps.project-config.outputs.name }}"
|
||||
echo "作者: ${{ steps.project-config.outputs.author }}"
|
||||
echo "版本: ${{ steps.project-config.outputs.version }}"
|
||||
echo "MC版本: ${{ steps.project-config.outputs.mc-version }}"
|
||||
echo "模组加载器: ${{ steps.project-config.outputs.modloader }}"
|
||||
echo "模组加载器版本: ${{ steps.project-config.outputs.modloader-version }}"
|
||||
echo "索引文件: ${{ steps.project-config.outputs.index-file }}"
|
||||
|
||||
# 执行 packwiz 初始化命令
|
||||
./packwiz.exe init \
|
||||
--name "${{ steps.project-config.outputs.name }}" \
|
||||
--author "${{ steps.project-config.outputs.author }}" \
|
||||
--version "${{ steps.project-config.outputs.version }}" \
|
||||
--mc-version "${{ steps.project-config.outputs.mc-version }}" \
|
||||
--modloader "${{ steps.project-config.outputs.modloader }}" \
|
||||
--${{ steps.project-config.outputs.modloader }}-version "${{ steps.project-config.outputs.modloader-version }}" \
|
||||
--index-file "${{ steps.project-config.outputs.index-file }}" \
|
||||
--reinit
|
||||
|
||||
echo "✅ packwiz 初始化完成"
|
||||
|
||||
# 显示生成的 pack.toml
|
||||
echo "=== 生成的 pack.toml ==="
|
||||
cat pack.toml
|
||||
|
||||
- name: Display repository files
|
||||
run: |
|
||||
echo "=== 自动挂载的仓库文件 ==="
|
||||
echo "当前目录: $PWD"
|
||||
ls -la
|
||||
echo "=== 项目配置 ==="
|
||||
echo "版本: ${{ steps.project-config.outputs.version }}"
|
||||
echo "已初始化: ${{ steps.project-config.outputs.initialized }}"
|
||||
echo "保留文件: ${{ steps.project-config.outputs.keep_files }}"
|
||||
echo "=== 文件详情 ==="
|
||||
find . -type f | head -20
|
||||
echo "总文件数: $(find . -type f | wc -l)"
|
||||
|
|
@ -44,21 +163,110 @@ jobs:
|
|||
UserKnownHostsFile /dev/null
|
||||
EOF
|
||||
|
||||
- name: Clean remote directory
|
||||
- name: Clean remote directory (conditionally)
|
||||
if: steps.project-config.outputs.keep_files != ''
|
||||
run: |
|
||||
ssh $REMOTE_HOST "
|
||||
mkdir -p '$REMOTE_PATH'
|
||||
echo '清理目录内容...'
|
||||
echo '=== 清理目录(保留文件不会被删除)==='
|
||||
echo '保留文件: ${{ steps.project-config.outputs.keep_files }}'
|
||||
cd '$REMOTE_PATH'
|
||||
|
||||
# 获取当前目录的所有文件和文件夹(除了隐藏文件和保留文件)
|
||||
find . -mindepth 1 -not -path '*/\.*' | while read item; do
|
||||
should_keep=false
|
||||
for pattern in ${{ steps.project-config.outputs.keep_files }}; do
|
||||
# 检查是否匹配保留模式
|
||||
if [[ \"\$item\" == *\"\$pattern\"* ]] || [[ \"\$item\" == \"\$pattern\" ]] || [[ \"\$pattern\" == *\"*\"* && \"\$item\" == \${pattern%%/*}* ]]; then
|
||||
should_keep=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ \"\$should_keep\" = \"false\" ]; then
|
||||
echo \"删除: \$item\"
|
||||
rm -rf \"\$item\" 2>/dev/null || true
|
||||
else
|
||||
echo \"保留: \$item\"
|
||||
fi
|
||||
done
|
||||
echo '目录清理完成'
|
||||
"
|
||||
|
||||
- name: Clean remote directory (full cleanup)
|
||||
if: steps.project-config.outputs.keep_files == ''
|
||||
run: |
|
||||
ssh $REMOTE_HOST "
|
||||
mkdir -p '$REMOTE_PATH'
|
||||
echo '=== 完全清理目录(无保留文件)==='
|
||||
find '$REMOTE_PATH' -mindepth 1 -delete 2>/dev/null || true
|
||||
echo '目录清理完成'
|
||||
"
|
||||
|
||||
- name: Deploy all files
|
||||
run: |
|
||||
echo "开始部署 $(find . -type f | wc -l) 个文件..."
|
||||
tar czf - --exclude='.git' --exclude='.gitea' . | ssh $REMOTE_HOST "cd '$REMOTE_PATH' && tar xzf -"
|
||||
echo "开始部署文件..."
|
||||
echo "项目版本: ${{ steps.project-config.outputs.version }}"
|
||||
echo "已初始化: ${{ steps.project-config.outputs.initialized }}"
|
||||
|
||||
# 如果有保留文件,创建排除列表
|
||||
if [ -n "${{ steps.project-config.outputs.keep_files }}" ]; then
|
||||
echo "保留文件: ${{ steps.project-config.outputs.keep_files }}"
|
||||
echo "=== 创建排除列表 ==="
|
||||
|
||||
echo ".git" > exclude_list.txt
|
||||
echo ".gitea" >> exclude_list.txt
|
||||
|
||||
# 添加保留文件到排除列表
|
||||
for pattern in ${{ steps.project-config.outputs.keep_files }}; do
|
||||
if [[ "$pattern" == *"*"* ]]; then
|
||||
# 对于通配符模式,找到所有匹配的文件并排除
|
||||
for file in $pattern; do
|
||||
if [ -e "$file" ]; then
|
||||
echo "$file" >> exclude_list.txt
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$pattern" >> exclude_list.txt
|
||||
fi
|
||||
done
|
||||
|
||||
echo "排除列表:"
|
||||
cat exclude_list.txt
|
||||
|
||||
# 使用排除列表打包
|
||||
tar czf - --exclude-from=exclude_list.txt . | ssh $REMOTE_HOST "cd '$REMOTE_PATH' && tar xzf -"
|
||||
rm -f exclude_list.txt
|
||||
else
|
||||
# 没有保留文件,直接打包所有文件
|
||||
echo "无保留文件,部署所有文件"
|
||||
tar czf - --exclude='.git' --exclude='.gitea' . | ssh $REMOTE_HOST "cd '$REMOTE_PATH' && tar xzf -"
|
||||
fi
|
||||
|
||||
echo "✅ 文件部署完成"
|
||||
|
||||
- name: Update project configuration on server
|
||||
run: |
|
||||
echo "=== 更新服务器上的项目配置 ==="
|
||||
# 创建项目配置目录并上传配置信息
|
||||
ssh $REMOTE_HOST "
|
||||
mkdir -p '$REMOTE_PATH/.project'
|
||||
cat > '$REMOTE_PATH/.project/globe.json' << 'EOF'
|
||||
{
|
||||
\"version\": \"${{ steps.project-config.outputs.version }}\",
|
||||
\"initialized\": ${{ steps.project-config.outputs.initialized }},
|
||||
\"name\": \"${{ steps.project-config.outputs.name }}\",
|
||||
\"author\": \"${{ steps.project-config.outputs.author }}\",
|
||||
\"mc-version\": \"${{ steps.project-config.outputs.mc-version }}\",
|
||||
\"modloader\": \"${{ steps.project-config.outputs.modloader }}\",
|
||||
\"modloader-version\": \"${{ steps.project-config.outputs.modloader-version }}\",
|
||||
\"index-file\": \"${{ steps.project-config.outputs.index-file }}\"
|
||||
}
|
||||
EOF
|
||||
echo '服务器项目配置已更新'
|
||||
cat '$REMOTE_PATH/.project/globe.json'
|
||||
"
|
||||
|
||||
- name: Verify deployment
|
||||
run: |
|
||||
ssh $REMOTE_HOST "
|
||||
|
|
@ -66,6 +274,28 @@ jobs:
|
|||
echo '目录: $REMOTE_PATH'
|
||||
echo '大小: \$(du -sh \"$REMOTE_PATH\")'
|
||||
echo '文件数量: \$(find \"$REMOTE_PATH\" -type f | wc -l)'
|
||||
echo '目录列表:'
|
||||
ls -la '$REMOTE_PATH'
|
||||
"
|
||||
echo '=== 项目配置 ==='
|
||||
if [ -f \"$REMOTE_PATH/.project/globe.json\" ]; then
|
||||
cat \"$REMOTE_PATH/.project/globe.json\"
|
||||
else
|
||||
echo '⚠️ 未找到项目配置文件'
|
||||
fi
|
||||
echo '=== pack.toml 内容 ==='
|
||||
if [ -f \"$REMOTE_PATH/pack.toml\" ]; then
|
||||
cat \"$REMOTE_PATH/pack.toml\"
|
||||
else
|
||||
echo '⚠️ 未找到 pack.toml 文件'
|
||||
fi
|
||||
echo '=== 保留文件状态 ==='
|
||||
if [ -n \"${{ steps.project-config.outputs.keep_files }}\" ]; then
|
||||
for pattern in ${{ steps.project-config.outputs.keep_files }}; do
|
||||
if [ -e \"$REMOTE_PATH/\$pattern\" ]; then
|
||||
echo \"✅ 保留文件: \$pattern\"
|
||||
else
|
||||
echo \"⚠️ 保留文件不存在: \$pattern\"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo '无保留文件设置'
|
||||
fi
|
||||
"
|
||||
10
.project/globe.json
Normal file
10
.project/globe.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"version": "0.0.0.2",
|
||||
"initialized": false,
|
||||
"name": "LTD V8",
|
||||
"author": "3944Realms",
|
||||
"mc-version": "1.20.1",
|
||||
"modloader": "forge",
|
||||
"modloader-version": "47.4.0",
|
||||
"index-file" : "index.toml"
|
||||
}
|
||||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
## 更新日志
|
||||
|
||||
2025/10/27 - 1次 v0.0.0.2
|
||||
|
||||
整合版本调整
|
||||
|
||||
2025/10/27 - 1次 v0.0.0.1
|
||||
|
||||
初始化整合版本
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
#safeBlockEntityMap: Boolean. Make 'LevelChunk#blockEntities' thread-safe.
|
||||
#safeClassInstanceMultiMap: Boolean. Make 'ClassInstanceMultiMap' thread-safe.
|
||||
#safeLegacyRandomSource: Boolean. Make LegacyRandomSource thread-safe.
|
||||
#particle$noCulling: A comma-separated list of classes extending 'Particle' that should not be culled.
|
||||
#particle$noLightCache: A comma-separated list of classes extending 'Particle' that should not use the light cache.
|
||||
#particle$lockRequired: A comma-separated list of classes extending 'Particle' that require a spin lock.
|
||||
#particle$lockProvider: A comma-separated list of classes extending 'Particle' that provide a spin lock.
|
||||
#replaceRandom: A comma-separated list of classes that require multithreaded random sources.
|
||||
#create$contraptionNoParticleCollision: A comma-separated list of classes extending 'AbstractContraptionEntity' that should not collide with particles.
|
||||
#
|
||||
#Sun Oct 26 20:40:29 CST 2025
|
||||
safeClassInstanceMultiMap=false
|
||||
particle$noLightCache=dev.shadowsoffire.gateways.client.GatewayParticle,com.chailotl.particular.particles.FireflyParticle,com.lowdragmc.photon.client.gameobject.FXObject,net.diebuddies.minecraft.weather.WeatherParticle
|
||||
safeBlockEntityMap=false
|
||||
safeLegacyRandomSource=false
|
||||
particle$noCulling=pigcart.particlerain.particle.GroundFogParticle,com.lowdragmc.photon.client.gameobject.FXObject
|
||||
particle$lockRequired=yesman.epicfight.client.particle.TrailParticle,com.dfdyz.epicacg.client.particle.BloomTrailParticle,com.brandon3055.draconicevolution.client.render.effect.ExplosionFX,com.brandon3055.draconicevolution.client.render.effect.CrystalFXWireless,com.lowdragmc.photon.client.gameobject.emitter.Emitter,com.lowdragmc.photon.client.gameobject.emitter.particle.ParticleEmitter,com.lowdragmc.photon.client.gameobject.emitter.beam.BeamEmitter,com.lowdragmc.photon.client.gameobject.emitter.trail.TrailEmitter,com.lowdragmc.photon.client.gameobject.FXObject
|
||||
version=1
|
||||
particle$lockProvider=yesman.epicfight.client.particle.TrailParticle,com.dfdyz.epicacg.client.particle.BloomTrailParticle,com.brandon3055.draconicevolution.client.render.effect.ExplosionFX,com.brandon3055.draconicevolution.client.render.effect.CrystalFXWireless,com.lowdragmc.photon.client.gameobject.FXObject
|
||||
replaceRandom=appeng.client.render.effects.LightningArcFX,appeng.client.render.effects.LightningFX,de.cheaterpaul.fallingleaves.util.LeafUtil
|
||||
create$contraptionNoParticleCollision=rbasamoyai.createbigcannons.cannon_control.contraption.PitchOrientedContraptionEntity,rbasamoyai.createbigcannons.cannon_control.contraption.AbstractMountedCannonContraption
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"version": 1,
|
||||
"particle": {
|
||||
"particleLimit": 16384,
|
||||
"removeIfMissedTick": false,
|
||||
"particleLightCache": true,
|
||||
"cullUnderwaterParticleType": true
|
||||
},
|
||||
"tick": {
|
||||
"animationTickMode": "INTERRUPTIBLE",
|
||||
"particleTickMode": "INTERRUPTIBLE",
|
||||
"tickWeatherAsync": true,
|
||||
"failPerSecLimit": 5,
|
||||
"failBehavior": "RAISE_CRASH",
|
||||
"suppressCME": false
|
||||
},
|
||||
"rendering": {
|
||||
"particleRenderingMode": "DELAYED",
|
||||
"particleCulling": "AABB",
|
||||
"cullWeathers": true,
|
||||
"failPerSecLimit": 20,
|
||||
"failBehavior": "MARK_AS_SYNC"
|
||||
},
|
||||
"valkyrienSkies": {
|
||||
"rainEffect": "STATIONARY",
|
||||
"fixParticleLights": true
|
||||
},
|
||||
"create": {
|
||||
"rainEffect": "ALWAYS"
|
||||
}
|
||||
}
|
||||
16
kubejs/config/client.properties
Normal file
16
kubejs/config/client.properties
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#KubeJS Client Properties
|
||||
#Sun Oct 26 22:18:10 CST 2025
|
||||
backgroundColor=2E3440
|
||||
barBorderColor=ECEFF4
|
||||
exportAtlases=false
|
||||
menuBackgroundBrightness=64
|
||||
disableRecipeBook=false
|
||||
title=
|
||||
barColor=ECEFF4
|
||||
overrideColors=false
|
||||
fmlLogColor=ECEFF4
|
||||
showTagNames=false
|
||||
fmlMemoryColor=ECEFF4
|
||||
menuBackgroundScale=32.0
|
||||
blurScaledPackIcon=true
|
||||
menuInnerBackgroundBrightness=32
|
||||
13
kubejs/config/common.properties
Normal file
13
kubejs/config/common.properties
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#KubeJS Common Properties
|
||||
#Sun Oct 26 22:18:12 CST 2025
|
||||
matchJsonRecipes=true
|
||||
allowAsyncStreams=true
|
||||
announceReload=true
|
||||
startupErrorGUI=true
|
||||
serverOnly=false
|
||||
hideServerScriptErrors=false
|
||||
saveDevPropertiesInConfig=false
|
||||
packmode=
|
||||
ignoreCustomUniqueRecipeIds=false
|
||||
creativeModeTabIcon=minecraft\:purple_dye
|
||||
startupErrorReportUrl=
|
||||
4
kubejs/server_scripts/create.js
Normal file
4
kubejs/server_scripts/create.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ServerEvents.recipes(event=>{
|
||||
const createsifter = event.recipes.createsifter;
|
||||
createsifter.sifting(output[minecarft_],input[andesite_mesh,minecarft_dirt],processingTime[20],isWater,minimumSpeed);
|
||||
});
|
||||
BIN
mods/AlwaysEat-5.2.jar
Normal file
BIN
mods/AlwaysEat-5.2.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
mods/Mantle-1.20.1-1.11.79.jar
Normal file
BIN
mods/Mantle-1.20.1-1.11.79.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mods/createliquidfuel-2.1.1-1.20.1.jar
Normal file
BIN
mods/createliquidfuel-2.1.1-1.20.1.jar
Normal file
Binary file not shown.
BIN
mods/createutilities-0.3.2+1.20.1.jar
Normal file
BIN
mods/createutilities-0.3.2+1.20.1.jar
Normal file
Binary file not shown.
BIN
mods/sophisticatedbackpacks-1.20.1-3.24.10.1404.jar
Normal file
BIN
mods/sophisticatedbackpacks-1.20.1-3.24.10.1404.jar
Normal file
Binary file not shown.
BIN
mods/sophisticatedcore-1.20.1-1.2.105.1230.jar
Normal file
BIN
mods/sophisticatedcore-1.20.1-1.2.105.1230.jar
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user