Skip to content

Commit 1566680

Browse files
committed
Merge branch 'master' into feature/autoReply
2 parents 5fdde8d + 20a6574 commit 1566680

File tree

474 files changed

+16325
-3038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

474 files changed

+16325
-3038
lines changed

.github/CONTRIBUTING.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!-- omit in toc -->
21
# Contributing to Lambda
32

43
First off, thanks for taking the time to contribute! ❤️
@@ -9,7 +8,6 @@ All types of contributions are encouraged and valued. See the [Table of Contents
98
> - Star the project
109
> - Donate to the project
1110
12-
<!-- omit in toc -->
1311
## Table of Contents
1412

1513
- [I Have a Question](#i-have-a-question)
@@ -18,8 +16,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
1816
- [Suggesting Enhancements](#suggesting-enhancements)
1917
- [Your First Code Contribution](#your-first-code-contribution)
2018
- [Improving The Documentation](#improving-the-documentation)
21-
- [Styleguides](#styleguides)
22-
- [Commit Messages](#commit-messages)
19+
- [Naming Convention](#naming-convention)
2320
- [Join The Project Team](#join-the-project-team)
2421

2522

@@ -98,29 +95,34 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/lambda
9895
- Use a **clear and descriptive title** for the issue to identify the suggestion.
9996
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
10097
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
101-
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
98+
- You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and the built-in [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux.
10299
- **Explain why this enhancement would be useful** to most Lambda users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
103100

104101
### Your First Code Contribution
105-
TODO
106-
<!-- TODO
107-
include Setup of env, IDE and typical getting started instructions?
102+
First of all, make sure to read or simply check the [Official Kotlin Coding Convention](https://kotlinlang.org/docs/coding-conventions.html#control-flow-statements)
108103

109-
-->
104+
This is required for pull requests to be accepted, or even reviewed.
110105

111-
### Improving The Documentation
112-
TODO
113-
<!-- TODO
114-
Updating, improving and correcting the documentation
106+
You will need the following before contributing:
107+
- GitHub CLI / Desktop
108+
- IntelliJ IDEA
109+
- Java 17 SDK
110+
- [Minecraft Development Plugin](https://plugins.jetbrains.com/plugin/8327-minecraft-development)
111+
112+
After you have everything you can do the following:
113+
- Clone the repository `git clone https://github.com/lambda-client/lambda`
114+
- Open the project, **inside the project folder**, in IntelliJ IDEA
115+
- Set the java runtime in `File > Project Structure > SDK > JDK 17`
116+
- Wait for Gradle to resolve dependencies and to set up the project.
117+
- And you should now be able to run the project using the [run configurations](https://www.jetbrains.com/help/idea/run-debug-configuration.html)
115118

116-
-->
119+
### Improving The Documentation
120+
If you believe that some documentation can be improved or added, please discuss with us on our [Discord](https://discord.gg/QjfBxJzE5x)
117121

118-
## Styleguides
119-
### Commit Messages
120-
TODO
121-
<!-- TODO
122+
### Naming Convention
123+
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for the Lambda project.
122124

123-
-->
125+
Feel free to propose additional compatible naming conventions.
124126

125127
## Join The Project Team
126128
Most communication happens on our [Discord](https://discord.gg/QjfBxJzE5x). You can join the project team by contributing to the project. The project team is responsible for reviewing and merging pull requests, and they will help you at every step of the way.

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: File a bug report.
3-
title: "[Version] [Mod Loader] [Bug]: "
3+
title: "[Version] [Mod loader] Bug: "
44
assignees:
55
- Edouard127
66
body:
@@ -40,11 +40,3 @@ body:
4040
attributes:
4141
label: Log Output
4242
description: Please copy the entire log file located in `.minecraft/logs/latest.log` to [MCLogs](https://mclo.gs) and provide the link here.
43-
- type: checkboxes
44-
id: terms
45-
attributes:
46-
label: Code of Conduct
47-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/lambda-client/lambda/blob/master/.github/CODE_OF_CONDUCT.md).
48-
options:
49-
- label: I agree to follow this project's Code of Conduct
50-
required: true
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature
22
description: Request or implement a feature.
3-
title: "[Version] [Mod Loader] [Feature]: "
3+
title: "[Version] [Mod loader] Feat: "
44
assignees:
55
- Edouard127
66
body:
@@ -15,22 +15,9 @@ body:
1515
value: "I would like to implement a feature that..."
1616
validations:
1717
required: true
18-
- type: textarea
19-
id: extra
20-
attributes:
21-
label: Additional Information
22-
description: Is there anything else you would like to add?
2318
- type: checkboxes
2419
id: pr
2520
attributes:
2621
label: Pull Request
2722
options:
2823
- label: I will be submitting a pull request
29-
- type: checkboxes
30-
id: terms
31-
attributes:
32-
label: Code of Conduct
33-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/lambda-client/lambda/blob/master/.github/CODE_OF_CONDUCT.md).
34-
options:
35-
- label: I agree to follow this project's Code of Conduct
36-
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pull Request Guidelines
2+
### This is a template, modify before submitting your PR
3+
4+
Please ensure that your PR title follows this format:
5+
- `[Minecraft Version] [Mod loader] Feat, Fix, Ref, Docs, ..., : Description`
6+
7+
**Examples:**
8+
- `[1.20.x] [Forge] Feat: Add new block types`
9+
- `[1.19.x] [All] Fix: Crash on startup`
10+
- `[1.20.x] [Fabric] Refactor: Optimize rendering engine`
11+
12+
# Issue Link
13+
Please create an issue if there are none applicable before submitting this pull request.
14+
15+
Then link the issue as follows:`Closes #123`
16+
17+
# Description
18+
19+
Provide a brief description of the changes made in this PR:
20+
21+
- **What does this PR do?**
22+
- **Why is this change needed?**

.github/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
categories:
6+
- title: Bug Fixes
7+
labels:
8+
- bug
9+
- title: New Features
10+
labels:
11+
- feature
12+
- title: Other Changes
13+
labels:
14+
- "*"

.github/workflows/add-label.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: Pull Request Labeler
2+
23
on:
34
issues:
4-
types: [opened, edited]
5+
types: [opened]
56
branches:
67
- master
78
pull_request:
8-
types: [opened, edited]
9+
types: [opened]
910
branches:
1011
- master
1112

@@ -15,14 +16,17 @@ permissions:
1516
pull-requests: write
1617

1718
jobs:
18-
triage:
19+
build:
1920
runs-on: ubuntu-latest
2021
steps:
21-
- uses: github/issue-labeler@v3.4
22+
- name: Check Out Repository
23+
uses: actions/checkout@v4
24+
25+
- name: Labeler
26+
uses: srvaroa/labeler@v1.11.0
2227
with:
23-
configuration-path: .github/workflows/labeler/labeler-config.yml
24-
enable-versioned-regex: 0
25-
sync-labels: 0
26-
include-title: 1
27-
include-body: 0
28-
repo-token: ${{ github.token }}
28+
config_path: .github/workflows/labeler/labeler-config.yml
29+
use_local_config: false
30+
fail_on_error: true
31+
env:
32+
GITHUB_TOKEN: "${{ github.token }}"

.github/workflows/build.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Build Lambda
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
check-runner:
10+
name: Check Runner Availability
11+
runs-on: ubuntu-latest
12+
13+
outputs:
14+
runner-label: ${{ steps.set-runner.outputs.runner-label }}
15+
16+
steps:
17+
- name: Set runner
18+
id: set-runner
19+
run: |
20+
runners=$(curl -v -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.REPO_ACCESS_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners" --http1.1)
21+
if [ $? -ne 0 ]; then
22+
echo "Error: Failed to fetch runners from GitHub API" >&2
23+
exit 1
24+
fi
25+
26+
runners_count=$(echo "$runners" | jq '.runners | length')
27+
if [ "$runners_count" -eq 0 ]; then
28+
echo "No runners available or failed to retrieve runners." >&2
29+
echo "runner-label=ubuntu-latest" >> $GITHUB_OUTPUT
30+
exit 0
31+
fi
32+
33+
available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")')
34+
if [ $? -ne 0 ]; then
35+
echo "Error: Failed to parse JSON response" >&2
36+
exit 1
37+
fi
38+
39+
if [ -n "$available" ]; then
40+
echo "runner-label=lambda-linux-runner" >> $GITHUB_OUTPUT
41+
else
42+
echo "runner-label=ubuntu-latest" >> $GITHUB_OUTPUT
43+
fi
44+
build:
45+
concurrency:
46+
group: ${{ github.workflow }}-${{ github.ref }}
47+
cancel-in-progress: true
48+
49+
needs: check-runner
50+
runs-on: ${{ needs.check-runner.outputs.runner-label }}
51+
52+
name: Build Lambda
53+
permissions:
54+
contents: write
55+
env:
56+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
57+
steps:
58+
- name: Checkout Repository
59+
uses: actions/checkout@v4.1.1
60+
61+
- name: Set current date as env variable
62+
run: echo "DATE=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
63+
64+
- name: Get Short Commit Hash
65+
id: vars
66+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
67+
68+
- name: Set-Up JDK 17
69+
uses: actions/setup-java@v4
70+
with:
71+
distribution: 'temurin'
72+
java-version: '17'
73+
architecture: x64
74+
cache: 'gradle'
75+
76+
- name: Read Gradle Properties
77+
uses: BrycensRanch/read-properties-action@v1.0.4
78+
id: all
79+
with:
80+
file: gradle.properties
81+
all: true
82+
83+
- name: Build Lambda
84+
run: ./gradlew build
85+
86+
- name: Rename Files with Commit Hash
87+
run: |
88+
mv ./fabric/build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar ./fabric/build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
89+
mv ./forge/build/libs/lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar ./forge/build/libs/lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
90+
mv ./common/build/libs/lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar ./common/build/libs/lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
91+
92+
- name: Upload Lambda
93+
uses: ryand56/r2-upload-action@latest
94+
id: upload
95+
with:
96+
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
97+
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY }}
98+
r2-secret-access-key: ${{ secrets.R2_ACCESS_SECRET }}
99+
r2-bucket: ${{ secrets.R2_BUCKET_NAME }}
100+
source-dir: |
101+
./fabric/build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
102+
./forge/build/libs/lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
103+
./common/build/libs/lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
104+
destination-dir: ${{ env.DATE }}-${{ env.COMMIT_HASH }}
105+
106+
- name: Generate Summary
107+
if: ${{ steps.upload.outputs.result == 'success' }}
108+
run: |
109+
cat << EOF >> $GITHUB_STEP_SUMMARY
110+
### [Lambda Fabric ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://r2-bucket.edouard127.christmas/${{ env.DATE }}-${{ env.COMMIT_HASH }}/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
111+
### [Lambda Forge ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://r2-bucket.edouard127.christmas/${{ env.DATE }}-${{ env.COMMIT_HASH }}/lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
112+
113+
#### [API (Developer Dependency)](https://r2-bucket.edouard127.christmas/${{ env.DATE }}-${{ env.COMMIT_HASH }}/lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
114+
115+
**Runner:** \`${{ needs.check-runner.outputs.runner-label }}\`
116+
EOF
117+
118+
- name: Failover Upload
119+
if: ${{ steps.upload.outputs.result == 'failure' }}
120+
uses: actions/upload-artifact@v4
121+
with:
122+
name: lambda-nightly
123+
path: |
124+
/**/build/libs/lambda-*-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
125+
126+

.github/workflows/code_quality.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
bug:
2-
- 'bug'
1+
version: 1
32

4-
feature:
5-
- 'feature'
3+
labels:
4+
- label: 'bug'
5+
title: '(?i)\[?bug[:\]]'
66

7-
triage:
8-
- '/.*/'
7+
- label: 'feature'
8+
title: '(?i)\[?(feature|feat)[:\]]'
99

10-
fabric:
11-
- '\b([Ff][Aa][Bb][Rr][Ii][Cc])\b'
10+
- label: 'forge'
11+
title: '(?i)\[?(forge|all)[:\]]'
1212

13-
forge:
14-
- '\b([Ff][Oo][Rr][Gg][Ee])\b'
13+
- label: 'fabric'
14+
title: '(?i)\[?(fabric|all)[:\]]'
1515

16-
neoforge:
17-
- '\b([Nn][Ee][Oo][Ff][Oo][Rr][Gg][Ee])\b'
16+
- label: '1.20'
17+
title: '\[?1\.20(\.\d+|\.x)?[:\]]?'
1818

19-
"1.20":
20-
- '1\.20(\.\d+|\.x)?'
19+
- label: 'triage'
20+
title: '.*'
21+
mergeable: false

0 commit comments

Comments
 (0)