Skip to content

Commit 009f5c1

Browse files
committed
Merge branch 'master' into feature/renderer
2 parents c97a29c + c082eab commit 009f5c1

File tree

128 files changed

+2778
-1222
lines changed

Some content is hidden

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

128 files changed

+2778
-1222
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/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# Pull Request Title Guidelines
1+
# Pull Request Guidelines
22
### This is a template, modify before submitting your PR
33

44
Please ensure that your PR title follows this format:
5-
- `[Major Minecraft Version (ex: 1.20.x)] [Mod loader (ex: Forge, All)] Feat, Fix, Refactor`
5+
- `[Minecraft Version] [Mod loader] Feat, Fix, Ref, Docs, ..., : Description`
66

77
**Examples:**
88
- `[1.20.x] [Forge] Feat: Add new block types`
99
- `[1.19.x] [All] Fix: Crash on startup`
1010
- `[1.20.x] [Fabric] Refactor: Optimize rendering engine`
1111

1212
# Issue Link
13-
1413
Please create an issue if there are none applicable before submitting this pull request.
1514

1615
Then link the issue as follows:`Closes #123`

.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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check Out Repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
23+
2324
- name: Labeler
24-
uses: srvaroa/labeler@master
25+
uses: srvaroa/labeler@v1.11.0
2526
with:
2627
config_path: .github/workflows/labeler/labeler-config.yml
2728
use_local_config: false

.github/workflows/build.yml

Lines changed: 64 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,47 @@ on:
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.ref }}
10-
cancel-in-progress: true
1110

1211
jobs:
12+
check-runner:
13+
runs-on: ubuntu-latest
14+
15+
outputs:
16+
runner-label: ${{ steps.set-runner.outputs.runner-label }}
17+
18+
steps:
19+
- name: Set runner
20+
id: set-runner
21+
run: |
22+
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)
23+
if [ $? -ne 0 ]; then
24+
echo "Error: Failed to fetch runners from GitHub API" >&2
25+
exit 1
26+
fi
27+
28+
runners_count=$(echo "$runners" | jq '.runners | length')
29+
if [ "$runners_count" -eq 0 ]; then
30+
echo "No runners available or failed to retrieve runners." >&2
31+
echo "runner-label=ubuntu-latest" >> $GITHUB_OUTPUT
32+
exit 0
33+
fi
34+
35+
available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")')
36+
if [ $? -ne 0 ]; then
37+
echo "Error: Failed to parse JSON response" >&2
38+
exit 1
39+
fi
40+
41+
if [ -n "$available" ]; then
42+
echo "runner-label=lambda-linux-runner" >> $GITHUB_OUTPUT
43+
else
44+
echo "runner-label=ubuntu-latest" >> $GITHUB_OUTPUT
45+
fi
1346
build:
47+
needs: check-runner
48+
runs-on: ${{ needs.check-runner.outputs.runner-label }}
49+
1450
name: Build Lambda
15-
runs-on: ubuntu-latest
1651
permissions:
1752
contents: write
1853
env:
@@ -21,6 +56,9 @@ jobs:
2156
- name: Checkout Repository
2257
uses: actions/[email protected]
2358

59+
- name: Set current date as env variable
60+
run: echo "DATE=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
61+
2462
- name: Get Short Commit Hash
2563
id: vars
2664
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
@@ -32,8 +70,6 @@ jobs:
3270
java-version: '17'
3371
architecture: x64
3472
cache: 'gradle'
35-
cache-dependency-path: |
36-
build.gradle.kts
3773

3874
- name: Read Gradle Properties
3975
uses: BrycensRanch/[email protected]
@@ -43,28 +79,34 @@ jobs:
4379
all: true
4480

4581
- name: Build Lambda
46-
run: ./gradlew --build-cache build
47-
82+
run: ./gradlew build
83+
4884
- name: Upload Lambda Fabric
49-
uses: actions/upload-[email protected]
85+
uses: ryand56/r2-upload-action@latest
5086
with:
51-
name: lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}
52-
path: fabric/build/libs/
53-
87+
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
88+
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY }}
89+
r2-secret-access-key: ${{ secrets.R2_ACCESS_SECRET }}
90+
r2-bucket: ${{ secrets.R2_BUCKET_NAME }}
91+
source-dir: './fabric/build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar'
92+
destination-dir: ${{ env.DATE }}-${{ env.COMMIT_HASH }}
93+
5494
- name: Upload Lambda Forge
55-
uses: actions/[email protected]
56-
with:
57-
name: lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}
58-
path: forge/build/libs/
59-
60-
- name: Upload Lambda NeoForge
61-
uses: actions/[email protected]
95+
uses: ryand56/r2-upload-action@latest
6296
with:
63-
name: lambda-neoforge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}
64-
path: neoforge/build/libs/
97+
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
98+
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY }}
99+
r2-secret-access-key: ${{ secrets.R2_ACCESS_SECRET }}
100+
r2-bucket: ${{ secrets.R2_BUCKET_NAME }}
101+
source-dir: './forge/build/libs/lambda-forge-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar'
102+
destination-dir: ${{ env.DATE }}-${{ env.COMMIT_HASH }}
65103

66104
- name: Upload Lambda API
67-
uses: actions/upload-[email protected]
105+
uses: ryand56/r2-upload-action@latest
68106
with:
69-
name: lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}
70-
path: common/build/libs/
107+
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
108+
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY }}
109+
r2-secret-access-key: ${{ secrets.R2_ACCESS_SECRET }}
110+
r2-bucket: ${{ secrets.R2_BUCKET_NAME }}
111+
source-dir: './common/build/libs/lambda-api-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar'
112+
destination-dir: ${{ env.DATE }}-${{ env.COMMIT_HASH }}

.github/workflows/close_stale.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Close Stale Issues
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
10+
jobs:
11+
stale:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/stale@v9
15+
with:
16+
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
17+
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.'
18+
days-before-pr-close: -1
19+
stale-issue-label: stale
20+
stale-pr-label: stale

.github/workflows/labeler/labeler-config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ labels:
1010
- label: 'forge'
1111
title: '(?i)\[?(forge|all)[:\]]'
1212

13-
- label: 'neoforge'
14-
title: '(?i)\[?(neoforge|all)[:\]]'
15-
1613
- label: 'fabric'
1714
title: '(?i)\[?(fabric|all)[:\]]'
1815

0 commit comments

Comments
 (0)