Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.21.4 #413

Merged
merged 41 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0079803
init 1.21.4, and boom!
s-yh-china Jan 25, 2025
91fc24d
build change, but weight not work
s-yh-china Jan 25, 2025
4ccdf45
just work
s-yh-china Jan 25, 2025
05ee2e3
Build changes, and delete timings
s-yh-china Jan 26, 2025
fcc859d
Fix API patches (#406)
Lumine1909 Jan 26, 2025
6a1259d
0006/0129
s-yh-china Feb 1, 2025
3e3b05d
0009/0129
s-yh-china Feb 2, 2025
c3255c4
0011/0129
s-yh-china Feb 2, 2025
6284c7b
0018/0129
s-yh-china Feb 2, 2025
7abdc88
0030/0129
s-yh-china Feb 2, 2025
4d119ff
0035/0129
s-yh-china Feb 3, 2025
60baed9
0043/0129
s-yh-china Feb 3, 2025
dc319d5
0048/0129
s-yh-china Feb 3, 2025
73a505d
0049/0129
s-yh-china Feb 3, 2025
016b29d
0057/0129
s-yh-china Feb 3, 2025
c9cf5af
0065/0129
s-yh-china Feb 3, 2025
330b79f
0086/0129 (#408)
Lumine1909 Feb 4, 2025
06c1d94
0087/0129
s-yh-china Feb 4, 2025
bf4bc28
0091/0129
s-yh-china Feb 4, 2025
102a3b7
0097/0129
s-yh-china Feb 4, 2025
53b43fe
0101/0129
s-yh-china Feb 4, 2025
892f392
102/129
s-yh-china Feb 5, 2025
08c3043
0107/0129
s-yh-china Feb 5, 2025
48764d8
0112/0129
s-yh-china Feb 5, 2025
8380fef
0118/0129
s-yh-china Feb 5, 2025
e51603d
0129/0129, 100% patched
s-yh-china Feb 6, 2025
ef85115
fix some
s-yh-china Feb 6, 2025
9b7c6e8
server work
s-yh-china Feb 6, 2025
272b7dc
Protocol... (#409)
Lumine1909 Feb 6, 2025
7be1bc9
Make jade better
s-yh-china Feb 6, 2025
5350f6e
Make action work
s-yh-china Feb 6, 2025
f07c26c
fix action jar
s-yh-china Feb 6, 2025
74cb952
Fix some protocol
s-yh-china Feb 7, 2025
99b3aaf
Fix bot action, and entity tickCount
s-yh-china Feb 7, 2025
87e7d21
Fix Warden GameEventListener register on load
s-yh-china Feb 8, 2025
186889a
Fix extra Raider drop
s-yh-china Feb 9, 2025
eaf9662
Fix grindstone overstacking
s-yh-china Feb 9, 2025
c98a7fa
Update Paper, and some doc
s-yh-china Feb 14, 2025
016b4a3
Merge branch 'master' into dev/1.21.4
s-yh-china Feb 14, 2025
213a260
Merge
s-yh-china Feb 14, 2025
51ce88d
[ci skip] Update Action
s-yh-china Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Get Build Number
run: bash scripts/GetBuildNumber.sh
- name: Apply Patches
run: ./gradlew applyPatches
run: ./gradlew applyAllPatches
- name: Create Leavesclip Jar
run: ./gradlew createMojmapLeavesclipJar
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
cache-read-only: false
- name: Setup Git Config
run: |
git config --global user.email "[email protected]"
git config --global user.name "LeavesMC CI"
git config --global user.email "ci-test@leavesmc.org"
git config --global user.name "LeavesMC Test CI"
- name: Apply Patches
run: ./gradlew applyPatches
run: ./gradlew applyAllPatches
- name: Create Leavesclip Jar
run: ./gradlew createMojmapLeavesclipJar
- name: Move Jar
Expand All @@ -38,7 +38,7 @@ jobs:
}

jarName="leaves-$(prop mcVersion).jar"
mv build/libs/Leaves-leavesclip-"$(prop version)"-mojmap.jar "$jarName"
mv leaves-server/build/libs/leaves-leavesclip-"$(prop version)"-mojmap.jar "$jarName"
echo "jar=$jarName" >> "$GITHUB_ENV"
- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gradle/
build/
.gradle

# Eclipse stuff
.classpath
Expand All @@ -24,9 +23,10 @@ dependency-reduced-pom.xml
.*.sw[a-p]

# various other potential build files
build/
bin/
dist/
/build
*/build/
bin
dist
manifest.mf

# Mac filesystem dust
Expand All @@ -44,12 +44,13 @@ out/
*~

# other stuff
leaves-server
leaves-api
paper-api-generator
mc-dev
.idea
testserver
/leaves-api/build.gradle.kts
/leaves-server/build.gradle.kts
/leaves-server/src/minecraft

/paper-server
/paper-api

run

# other sh
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ maven {
}

dependencies {
compileOnly("org.leavesmc.leaves:leaves-api:1.21.3-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves-api:1.21.4-R0.1-SNAPSHOT")
}
```

Expand All @@ -40,17 +40,17 @@ Each time you want to update your dependency, you must re-build Leaves.
Leaves-Server:
```kotlin
dependencies {
compileOnly("org.leavesmc.leaves:leaves:1.21.3-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves:1.21.4-R0.1-SNAPSHOT")
}
```

## Building

You need JDK 21 and good Internet conditions

Clone this repo, run `./gradlew applyPatches`, then run `./gradlew createMojmapLeavesclipJar` in your terminal.
Clone this repo, run `./gradlew applyAllPatches`, then run `./gradlew createMojmapLeavesclipJar` in your terminal.

You can find the jars in the `build/libs` directory.
You can find the jars in the `leaves-server/build/libs` directory.

## Pull Requests

Expand Down
8 changes: 4 additions & 4 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ maven {
}

dependencies {
compileOnly("org.leavesmc.leaves:leaves-api:1.21.3-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves-api:1.21.4-R0.1-SNAPSHOT")
}
```

Expand All @@ -39,17 +39,17 @@ dependencies {
Leaves-Server:
```kotlin
dependencies {
compileOnly("org.leavesmc.leaves:leaves:1.21.3-R0.1-SNAPSHOT")
compileOnly("org.leavesmc.leaves:leaves:1.21.4-R0.1-SNAPSHOT")
}
```

## 自行构建

你需要最低 JDK 21 和一个可以正常访问各种 git/maven 库的网络

首先克隆此储存库,然后在你的终端里依次执行 `./gradlew applyPatches` 和 `./gradlew createMojmapLeavesclipJar`
首先克隆此储存库,然后在你的终端里依次执行 `./gradlew applyAllPatches` 和 `./gradlew createMojmapLeavesclipJar`

最后 你可以在 `build/libs` 文件夹里找到对应的jar文件
最后 你可以在 `leaves-server/build/libs` 文件夹里找到对应的jar文件

## 对于想要出一份力的开发者

Expand Down
104 changes: 40 additions & 64 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
plugins {
java
`maven-publish`
id("org.leavesmc.leavesweight.patcher") version "1.0.2-SNAPSHOT"
id("org.leavesmc.leavesweight.patcher") version "2.0.0-SNAPSHOT"
}

allprojects {
apply(plugin = "java")
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")

java {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
}

subprojects {
apply(plugin = "java")

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.leavesmc.org/releases") {
content { onlyForConfigurations("leavesclip") }
}
}

tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(21)
options.release = 21
options.isFork = true
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
Expand All @@ -35,58 +38,8 @@ subprojects {
filteringCharset = Charsets.UTF_8.name()
}

repositories {
mavenLocal()
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
maven("https://repo.aikar.co/content/groups/aikar")
maven("https://repo.md-5.net/content/repositories/releases/")
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
maven("https://jitpack.io")
}
}

repositories {
mavenCentral()
maven("https://repo.leavesmc.org/releases") {
content { onlyForConfigurations("leavesclip") }
}
}

dependencies {
remapper("net.fabricmc:tiny-remapper:0.10.3:fat")
decompiler("org.vineflower:vineflower:1.10.1")
leavesclip("org.leavesmc:leavesclip:2.0.1")
}

paperweight {
serverProject.set(project(":leaves-server"))

remapRepo.set("https://maven.fabricmc.net/")
decompileRepo.set("https://files.minecraftforge.net/maven/")

usePaperArchiveUpstream(providers.gradleProperty("paperRef")) {
withPaperPatcher {
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
apiOutputDir.set(layout.projectDirectory.dir("leaves-api"))

serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
serverOutputDir.set(layout.projectDirectory.dir("leaves-server"))
}

patchTasks.register("generatedApi") {
isBareDirectory = true
upstreamDirPath = "paper-api-generator/generated"
patchDir = layout.projectDirectory.dir("patches/generated-api")
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
}
}
}

allprojects {
publishing {
extensions.configure<PublishingExtension> {
repositories {
maven("https://repo.leavesmc.org/snapshots") {
name = "leaves"
Expand All @@ -98,3 +51,26 @@ allprojects {
}
}
}

paperweight {
upstreams.paper {
ref = providers.gradleProperty("paperRef")

patchFile {
path = "paper-server/build.gradle.kts"
outputFile = file("leaves-server/build.gradle.kts")
patchFile = file("leaves-server/build.gradle.kts.patch")
}
patchFile {
path = "paper-api/build.gradle.kts"
outputFile = file("leaves-api/build.gradle.kts")
patchFile = file("leaves-api/build.gradle.kts.patch")
}
patchDir("paperApi") {
upstreamPath = "paper-api"
excludes = setOf("build.gradle.kts")
patchesDir = file("leaves-api/paper-patches")
outputDir = file("paper-api")
}
}
}
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The patching system is based on git, and you can learn about it at here: <https:
If you have forked the main repository, then you should follow the steps below:

1. Clone your repository to local
2. Run Gradle's `applyPatches` task in your IDE or terminal (You can run `./gradlew applyPatches` directly in terminal.)
2. Run Gradle's `applyAllPatches` task in your IDE or terminal (You can run `./gradlew applyAllPatches` directly in terminal.)
3. Enter `leaves-api` or `leaves-server` directory to carry out modifications.

BTW, `leaves-api` and `leaves-server` are not normal git repositories.
Expand All @@ -57,7 +57,7 @@ It's very easy to to add patches by following the steps below:
1. Modify the code of `leaves-api` and / or `leaves-server`
2. Add these changes to the local git repository (For example, `git add .`)
3. Commit these changes using `git commit -m <Commit Message>`
4. Run Gradle's task `rebuildPatches` to convert your commits to a new patch
4. Run Gradle's task `rebuildAllServerPatches` to convert your commits to a new patch
5. Push your patches to your repository

After pushing, you can open a PR to submit your patches.
Expand All @@ -70,5 +70,5 @@ You can modify a existing patch by following the steps below:
2. Run `git commit -a --fixup <hash>` in your terminal to make a fix-up commit
- If you want to edit the commit message, replace `--fixup` with `--squash`.
3. Run `git rebase -i --autosquash base` to rebase automatically, then just type `:q` to close the confirm page
4. Run Gradle's task `rebuildPatches` to modify existing patches
4. Run Gradle's task `rebuildAllServerPatches` to modify existing patches
5. Push and PR again
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Leaves 使用和 Paper 一样的补丁系统,并为了针对不同部分的修
如果你已经 Fork 了主储存库,那么下面你应该这么做:

1. 将你的仓库 clone 到本地;
2. 在你的 IDE 或 终端 内执行 Gradle 的 `applyPatches` 任务,如果是在终端内,你可以执行 `./gradlew applyPatches`;
2. 在你的 IDE 或 终端 内执行 Gradle 的 `applyAllPatches` 任务,如果是在终端内,你可以执行 `./gradlew applyAllPatches`;
3. 进入 `leaves-api` 或 `leaves-server` 文件夹进行修改。

By the way,`leaves-api` 和 `leaves-server` 并不是正常的 git 仓库。
Expand All @@ -54,7 +54,7 @@ By the way,`leaves-api` 和 `leaves-server` 并不是正常的 git 仓库。
1. 对 `leaves-api` 或者 / 和 `leaves-server` 进行修改;
2. 使用 git 添加你的修改,比如 `git add .`;
3. 使用 `git commit -m <提交信息>` 进行提交;
4. 运行 Gradle 任务 `rebuildPatches` 将你的提交转化为一个补丁;
4. 运行 Gradle 任务 `rebuildAllServerPatches` 将你的提交转化为一个补丁;
5. 将你生成的补丁文件进行推送。

这样做以后,你就可以将你的补丁文件进行 PR 提交。
Expand All @@ -67,5 +67,5 @@ By the way,`leaves-api` 和 `leaves-server` 并不是正常的 git 仓库。
2. 使用 `git commit -a --fixup <hash>` 来进行一个更正提交;
- 如果你想要更改提交信息,你也可以用 `--squash` 来代替 `--fixup`。
3. 使用 `git rebase -i --autosquash base` 来进行自动变基,你只需要输入 `:q` 来关闭确认页面即可;
4. 运行 Gradle 任务 `rebuildPatches` 来修改已被修改的补丁;
4. 运行 Gradle 任务 `rebuildAllServerPatches` 来修改已被修改的补丁;
5. 将修改后的补丁 PR 发回储存库。
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
group=org.leavesmc.leaves
version=1.21.3-R0.1-SNAPSHOT
mcVersion=1.21.3
paperRef=5a60ffb8b1cc88c1480a4c5f5c221291be97527f
preVersion=false
version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4
paperRef=46f4fdaae3661941ac86f2157e625d907fdd8e81
preVersion=true
org.gradle.jvmargs=-Xmx2G
org.gradle.caching=true
org.gradle.parallel=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading