Skip to content
Open

26.1 #15

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/sort_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ done
for i in $dir
do
dst_dir="processed_artifacts/$i"
find "artifacts" -type f -name "*$i*.jar" -exec mv {} "$dst_dir" \;
find "out" -type f -name "*-mc$i.jar" -exec mv {} "$dst_dir" \;
done
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
build:
strategy:
matrix:
java: [ 21 ]
java: [ 25 ]
os: [
ubuntu-latest,
windows-latest
]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v6
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v5
with:
Expand All @@ -35,12 +35,18 @@ jobs:
run: ./gradlew build

- name: collect artifacts to out folder
if: ${{ runner.os == 'Linux' && matrix.java == '25' }}
run: |
mkdir out
bash ./.github/scripts/build_output.sh

- name: sort artifacts by game version
run: |
bash ./.github/scripts/sort_artifacts.sh

- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '21' }}
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Linux' && matrix.java == '25' }}
uses: actions/upload-artifact@v7
with:
name: artifacts
path: out/
path: processed_artifacts/
50 changes: 25 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
contents: write
steps:
- name: checkout repository
uses: actions/checkout@v3.5.3
uses: actions/checkout@v6
- name: download build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: artifacts
path: artifacts
path: out

- name: sort artifacts by game version
run: |
Expand All @@ -57,51 +57,51 @@ jobs:
echo @@@@@###########################################@@@@@
continue-on-error: true

- name: Publish Minecraft Mods 1.17
uses: Kir-Antipov/mc-publish@v3.3
- name: Publish Minecraft Mods 1.21
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: SB7oe4aB
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 891699
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files: processed_artifacts/1.17.1/*.jar
files: processed_artifacts/1.21/*.jar

name: v${{ inputs.version }} For Minecraft 1.17
name: v${{ inputs.version }} For Minecraft 1.21
version: v${{ inputs.version }}
version-type: ${{ inputs.release_type }}

loaders: fabric
game-versions: '1.17.1'
game-versions: '1.21'
game-version-filter: any
dependencies: |-
carpet(required)
fabric-api(required)

modrinth-changelog: 'Got full change logs in [GitHub](https://github.com/OptiJava/OptCarpetAddition/releases).'
curseforge-changelog: 'Got full change logs in [GitHub](https://github.com/OptiJava/OptCarpetAddition/releases).'

retry-attempts: 3
retry-delay: 10000

- name: Publish Minecraft Mods 1.20.4
uses: Kir-Antipov/mc-publish@v3.3
- name: Publish Minecraft Mods 1.21.5
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: SB7oe4aB
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 891699
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files: processed_artifacts/1.20.4/*.jar
files: processed_artifacts/1.21.5/*.jar

name: v${{ inputs.version }} For Minecraft 1.20.4
name: v${{ inputs.version }} For Minecraft 1.21.5
version: v${{ inputs.version }}
version-type: ${{ inputs.release_type }}

loaders: fabric
game-versions: '1.20.4'
game-versions: '1.21.5'
game-version-filter: any
dependencies: |-
carpet(required)
Expand All @@ -113,23 +113,23 @@ jobs:
retry-attempts: 3
retry-delay: 10000

- name: Publish Minecraft Mods 1.21
uses: Kir-Antipov/mc-publish@v3.3
- name: Publish Minecraft Mods 1.21.11
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: SB7oe4aB
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 891699
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files: processed_artifacts/1.21/*.jar
files: processed_artifacts/1.21.11/*.jar

name: v${{ inputs.version }} For Minecraft 1.21
name: v${{ inputs.version }} For Minecraft 1.21.11
version: v${{ inputs.version }}
version-type: ${{ inputs.release_type }}

loaders: fabric
game-versions: '1.21'
game-versions: '1.21.11'
game-version-filter: any
dependencies: |-
carpet(required)
Expand All @@ -141,23 +141,23 @@ jobs:
retry-attempts: 3
retry-delay: 10000

- name: Publish Minecraft Mods 1.21.5
uses: Kir-Antipov/mc-publish@v3.3
- name: Publish Minecraft Mods 26.1
uses: Kir-Antipov/mc-publish@v3
with:
modrinth-id: SB7oe4aB
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

curseforge-id: 891699
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

files: processed_artifacts/1.21.5/*.jar
files: processed_artifacts/26.1/*.jar

name: v${{ inputs.version }} For Minecraft 1.21.5
name: v${{ inputs.version }} For Minecraft 26.1
version: v${{ inputs.version }}
version-type: ${{ inputs.release_type }}

loaders: fabric
game-versions: '1.21.5'
game-versions: '26.1'
game-version-filter: any
dependencies: |-
carpet(required)
Expand Down
11 changes: 8 additions & 3 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

Language: English | [中文](https://github.com/OptiJava/OptCarpetAddition/blob/master/README.md)

Thanks for the contributor: [jfglzs](https://github.com/jfglzs)

> This is an extension mod of `Carpet`. The goal is to add some functions that do not greatly change the original game
mechanism but optimize the player experience.

**_WARNING_: Don't download mods with the `-source` suffix, it is just for development!!!**

Build with [Preprocessor](https://github.com/ReplayMod/preprocessor)
Build with [StoneCutter]

**Dependencies:`Carpet` `fabric-api`**

Expand All @@ -17,14 +19,15 @@ Most other MC versions that are the same as the supported major versions but hav

| Minecraft Version | Support Status |
|-------------------|--------------------------------------------------------------------------|
| 1.21.10 | Supporting, developing actively |
| 26.1 | Supporting, developing actively |
| 1.21.11 | Supporting, developing actively |
| 1.21.5 | Supporting, developing actively |
| 1.21 | Supporting, developing actively |
| 1.20.4 | Supporting, developing actively |
| 1.20.1 | Not supporting, development stopped (supporting stopped on Jun 18, 2025) |
| 1.19.3 | Not supporting, development stopped (supporting stopped on Jun 18, 2025) |
| 1.18.2 | Not supporting, development stopped (supporting stopped on Jun 18, 2025) |
| 1.17.1 | Supporting, developing actively |
| 1.17.1 | Not supporting, development stopped (supporting stopped on May 1, 2026) |
| 1.16.5 | Not supporting, development stopped (supporting stopped on Jan 8, 2023) |

## Rules
Expand Down Expand Up @@ -345,6 +348,8 @@ If `blockUpdate` is not needed, **disabling this is highly recommended**.

**just in >=1.20**

**removed after v2.0.0**

If you want to use note block update suppression in 1.20, this may help you.

- Default value: `false`
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

Language: [English](https://github.com/OptiJava/OptCarpetAddition/blob/master/README-en.md) | 中文

感谢:[jfglzs](https://github.com/jfglzs)

> 这是一个`Carpet`的扩展模组,目标是添加一些没有太大改变原版游戏机制但优化玩家体验~~降低腐竹血压~~的一些功能。

**_警告_: 不要下载以`-source`结尾的模组jar文件,那仅用于开发!!!**

使用[Preprocessor](https://github.com/ReplayMod/preprocessor)构建~~可供大家学习~~
使用[StoneCutter]构建~~可供大家学习~~

**本模组需要前置模组:`Carpet` `fabric-api`**

Expand All @@ -16,14 +18,15 @@ Language: [English](https://github.com/OptiJava/OptCarpetAddition/blob/master/RE

| Minecraft 版本 | 支持状态 |
|--------------|----------------------------|
| 1.21.10 | 支持,积极开发 |
| 26.1 | 支持,积极开发 |
| 1.21.11 | 支持,积极开发 |
| 1.21.5 | 支持,积极开发 |
| 1.21 | 支持,积极开发 |
| 1.20.4 | 支持,积极开发 |
| 1.20.1 | 不支持,停止维护(在`2025/6/18`停止维护) |
| 1.19.3 | 不支持,停止维护(在`2025/6/18`停止维护) |
| 1.18.2 | 不支持,停止维护(在`2025/6/18`停止维护) |
| 1.17.1 | 支持,积极开发 |
| 1.17.1 | 不支持,停止维护(在`2026/5/1`停止维护) |
| 1.16.5 | 不支持,停止维护(在`2023/1/8`停止维护) |

## 规则
Expand Down Expand Up @@ -346,6 +349,8 @@ DispenserBlockEntity dispenserBlockEntity = (DispenserBlockEntity)blockPointerIm

**仅限`1.20`版本及以上**

**在v2.0.0以上版本已被移除**

如果你想在`1.20`使用音符盒极简抑制器,这可能能帮助你

- Default value: `false`
Expand Down
21 changes: 0 additions & 21 deletions build.gradle

This file was deleted.

97 changes: 97 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import java.text.SimpleDateFormat
import java.util.Date

plugins {
id("fabric-loom")
id("maven-publish")
}


val minecraftVer = stonecutter.current.version
val modver = "${property("mod_version")}"

val modBuildNameSuffix = "v${modver}+build.${SimpleDateFormat("yyMMddHHmm").format(Date())}-mc${minecraftVer}"
val archivesBaseName = project.findProperty("archives_base_name")

base {
archivesName.set("${archivesBaseName}-${modBuildNameSuffix}")
}

repositories {
mavenCentral()
// 阿里云镜像
maven {
url = uri("https://maven.aliyun.com/repository/public/")
}
// CurseMaven
maven {
url = uri("https://www.cursemaven.com")
}
// Modrinth
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
}
// JitPack
maven {
url = uri("https://jitpack.io")
}
}

tasks.withType<Test> {
enabled = false
}

//https://github.com/FabricMC/fabric-loader/issues/783
//configurations {
// modRuntimeOnly.exclude group: 'net.fabricmc', module: 'fabric-loader'
//}


dependencies {
// loom
"minecraft"("com.mojang:minecraft:${minecraftVer}")
"mappings"(loom.officialMojangMappings())
"modImplementation"("net.fabricmc:fabric-loader:${property("loader_version")}")
"modImplementation"("net.fabricmc.fabric-api:fabric-api:${property("fabric_version")}")
"modImplementation"("curse.maven:carpet-349239:${property("carpet_core_version")}")
}


tasks.processResources {
from("opt-carpet-addition.accesswidener")

inputs.property("version", modver)
inputs.property("minecraft_requirement_version", project.property("minecraft_requirement_version"))
inputs.property("loader_requirement_version", project.property("loader_requirement_version"))

filesMatching("fabric.mod.json") {
val valueMap = mapOf(
"version" to modver,
"minecraft_requirement_version" to project.property("minecraft_requirement_version"),
"loader_requirement_version" to project.property("loader_requirement_version")
)
expand(valueMap)
}
}

loom {
accessWidenerPath.set(file("opt-carpet-addition.accesswidener"))

runConfigs.all {
ideConfigGenerated(true)
vmArgs("-Dmixin.debug.export=true")
runDir("../../run")
}
}

tasks.jar {
inputs.property("archivesName", base.archivesName)
from("LICENSE") {
rename { fileName ->
"${fileName}_${base.archivesName.get()}"
}
}
}

println(stonecutter.tree.versions.toString())
Loading
Loading