Skip to content

Commit e107c71

Browse files
committed
Merge branch 'master' into release
# Conflicts: # pom.xml
2 parents 61146ec + 40c4284 commit e107c71

101 files changed

Lines changed: 2388 additions & 991 deletions

File tree

Some content is hidden

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

.adr-dir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/adr

.git-hooks/commit-msg

Lines changed: 0 additions & 20 deletions
This file was deleted.

.git-hooks/pre-commit

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,19 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22

33
echo "[pre-commit check]"
44

5-
if ! [ -x "$(command -v mvn)" ]; then
6-
echo -e 'Maven are not installed!'
7-
echo
8-
echo 'Please visit following site to download latest maven:'
9-
echo
10-
echo " https://maven.apache.org/download.cgi"
11-
echo
12-
echo 'If you are sure that you have installed maven,'
13-
echo 'Please check whether your environment variables is being set properly.'
14-
exit 1
15-
fi
16-
17-
spotless() {
18-
if [ ! -e "mvn" ]; then
19-
return 0
20-
fi
21-
22-
CHANGED_FILES="$(git --no-pager diff --name-status --no-color --cached | awk '$1 != "D" && $NF ~ /\.xml?$/ { print $NF }')"
5+
STAGED_FILES=$(git --no-pager diff --name-only --staged --line-prefix=$(git rev-parse --show-toplevel)/ | paste -sd ',')
236

24-
if [ -z "$CHANGED_FILES" ]; then
25-
echo "No staged files."
26-
return 0
7+
if [ ! -z "$STAGED_FILES" ]
8+
then
9+
echo -n "Checking code format with spotless: "
10+
mvn spotless:check -DspotlessFiles=$STAGED_FILES > /tmp/spotless.out 2>&1
11+
RETURN_VALUE=$?
12+
if [ $RETURN_VALUE -gt 0 ]
13+
then
14+
echo "Please run 'mvn spotless:check' for more details or 'mvn spotless:apply' to automatically fix the violations."
2715
fi
16+
exit $RETURN_VALUE
17+
fi
2818

29-
echo '[pre-commit] Executing Maven spotlessCheck before commit'
30-
31-
git stash --quiet --keep-index
32-
33-
mvn -B spotless:check
34-
35-
RESULT=$?
36-
37-
git stash pop -q
38-
39-
if [ "$RESULT" -ne "0" ]; then
40-
echo -e "spotlessCheck failed..."
41-
echo -e 'You can try "./mvn spotless:apply" to apply auto-fixes.'
42-
fi
43-
44-
return $RESULT
45-
}
46-
47-
if ! spotless; then
48-
exit 1
49-
fi
19+
exit 0

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version: 2
77
updates:
88
- package-ecosystem: "maven" # See documentation for possible values
99
directory: "/" # Location of package manifests
10+
target-branch: 'dev'
1011
schedule:
1112
interval: "daily"
1213
commit-message:

.github/workflows/e2e-testing.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: End to End Testing
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
artifact-name:
7+
description: 'Slimefun artifact name'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
e2e-testing:
13+
name: End to End Testing
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 5
16+
17+
strategy:
18+
matrix:
19+
include:
20+
- mcVersion: '1.16.5'
21+
javaVersion: '16'
22+
- mcVersion: '1.17.1'
23+
javaVersion: '17'
24+
- mcVersion: '1.18.2'
25+
javaVersion: '18'
26+
- mcVersion: '1.19.4'
27+
javaVersion: '19'
28+
- mcVersion: 'latest'
29+
javaVersion: '20'
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Set up JDK
36+
uses: actions/setup-java@v4.0.0
37+
with:
38+
distribution: temurin
39+
java-version: ${{ matrix.javaVersion }}
40+
java-package: jdk
41+
architecture: x64
42+
43+
- name: Setup server
44+
run: |
45+
echo 'eula=true' > eula.txt
46+
mkdir plugins
47+
48+
- name: Download ${{ matrix.mcVersion }} Paper
49+
run: |
50+
VERSION="${{ matrix.mcVersion }}"
51+
if [ "$VERSION" == "latest" ]; then
52+
VERSION=$(curl https://api.papermc.io/v2/projects/paper/ -s | jq -r '.versions[-1]')
53+
fi
54+
55+
BUILD_JAR=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" \
56+
| jq '.builds[-1] | "\(.build) \(.downloads.application.name)"' -r)
57+
BUILD=$(echo "$BUILD_JAR" | awk '{print $1}')
58+
JAR_FILE=$(echo "$BUILD_JAR" | awk '{print $2}')
59+
60+
echo "Downloading... https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"
61+
curl -o paper.jar \
62+
"https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"
63+
64+
- name: Download Slimefun
65+
uses: actions/download-artifact@v3
66+
with:
67+
name: ${{ inputs.artifact-name }}
68+
path: plugins/
69+
70+
- name: Download e2e-tester
71+
run: |
72+
curl -o e2e-tester.jar https://builds.guizhanss.com/api/download/ybw0014/Slimefun-e2e-tester/main/latest
73+
mv e2e-tester.jar plugins/e2e-tester.jar
74+
75+
- name: Run server
76+
run: |
77+
java -jar paper.jar --nogui

.github/workflows/pr-checker.yml

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,63 @@ on:
1010
- 'src/**'
1111
- 'pom.xml'
1212

13+
permissions:
14+
contents: read
15+
packages: read
16+
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read
18-
packages: read
20+
outputs:
21+
short-commit-hash: ${{ steps.env-setup.outputs.SHORT_COMMIT_HASH }}
22+
1923
steps:
20-
- uses: actions/checkout@v2
21-
- uses: actions/setup-java@v2
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: Set up JDK 17
28+
uses: actions/setup-java@v3
2229
with:
2330
distribution: 'zulu'
2431
java-version: 17
2532
java-package: jdk
2633
architecture: x64
34+
35+
- name: Cache Maven packages
36+
uses: actions/cache@v3
37+
with:
38+
path: ~/.m2
39+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
40+
restore-keys: ${{ runner.os }}-m2
41+
2742
- name: Codestyle Check
28-
run: mvn -B spotless:check compile --errors
43+
run: mvn -B spotless:check compile --errors
44+
45+
- name: Build with Maven
46+
run: mvn package
47+
48+
# Setup for the preview build
49+
- name: Environment Setup
50+
id: env-setup
51+
run: |
52+
SHORT_COMMIT_HASH=$(git rev-parse --short=8 ${{ github.sha }})
53+
JAR_VERSION="Preview Build #${{ github.event.number }}-$SHORT_COMMIT_HASH"
54+
echo "SHORT_COMMIT_HASH=$SHORT_COMMIT_HASH" >> "$GITHUB_ENV"
55+
echo "SHORT_COMMIT_HASH=$SHORT_COMMIT_HASH" >> "$GITHUB_OUTPUT"
56+
echo "JAR_VERSION=$JAR_VERSION" >> "$GITHUB_ENV"
57+
sed -i "s/<version>5.0-SNAPSHOT<\/version>/<version>$JAR_VERSION<\/version>/g" pom.xml
58+
59+
- name: Build with Maven
60+
run: mvn clean package
61+
62+
- name: Upload the artifact
63+
uses: actions/upload-artifact@v3
64+
with:
65+
name: slimefun-${{ github.event.number }}-${{ env.SHORT_COMMIT_HASH }}
66+
path: 'target/Slimefun-${{ env.JAR_VERSION }}.jar'
67+
68+
call-workflows:
69+
needs: [ build ]
70+
uses: ./.github/workflows/e2e-testing.yml
71+
with:
72+
artifact-name: slimefun-${{ github.event.number }}-${{ needs.build.outputs.short-commit-hash }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/target/
66
/.idea/
77
/.vscode/
8+
/data-storage/
89

910
.classpath
1011
.factorypath

.mvn/jvm.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Dfile.encoding=UTF8

.mvn/maven-git-versioning-extension.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@
88
<ref type="branch">
99
<pattern>dev</pattern>
1010
<version>
11-
${build.timestamp.year.2digit}${build.timestamp.month}${build.timestamp.day}-${commit.short}-Insider
11+
${commit.short}-Insider
1212
</version>
1313
</ref>
14-
<ref type="branch">
15-
<pattern>release</pattern>
16-
<version>${build.timestamp.year.2digit}.${build.timestamp.month}.${build.timestamp.day}-release</version>
17-
</ref>
1814
<ref type="branch">
1915
<pattern>test/(.+)</pattern>
2016
<version>${ref}-${commit.short}</version>

CHANGELOG.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Table of contents
2-
- [Release Candidate 36 (TBD)](#release-candidate-36-tbd)
3-
- [Release Candidate 35 (7 Jul 2023)](#release-candidate-35-7-jul-2023)
2+
- [Release Candidate 37 (TBD)](#release-candidate-37-tbd)
3+
- [Release Candidate 36 (20 Dec 2023)](#release-candidate-36-20-dec-2023)
4+
- [Release Candidate 35 (07 Jul 2023)](#release-candidate-35-07-jul-2023)
45
- [Release Candidate 34 (20 Jun 2023)](#release-candidate-34-20-jun-2023)
56
- [Release Candidate 33 (07 Jan 2023)](#release-candidate-33-07-jan-2023)
67
- [Release Candidate 32 (26 Jun 2022)](#release-candidate-32-26-jun-2022)
@@ -36,15 +37,55 @@
3637
- [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019)
3738
- [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019)
3839

39-
## Release Candidate 36 (TBD)
40+
## Release Candidate 37 (TBD)
41+
42+
## Release Candidate 36 (20 Dec 2023)
4043

4144
#### Additions
45+
* Added e2e testing to PRs to better ensure compatibility
46+
* Added compatibility to 1.20+
47+
* Added rainbow armor
48+
* Added grace periods to radiation
49+
* Added cherry log to android woodcutter
50+
* Added blackstone recipes to Grindstone and Ore Crusher (#3912)
51+
* Added Enchanted Golden Apple recipe (suggestion #2147 from punished_Garett) (#3591)
52+
* Added new flags for timings (#3246)
53+
* Added yaw to GPS Waypoints
54+
* (API) Add MultiBlockCraftEvent (#3928)
55+
* (API) Add TalismanActivateEvent (#4045)
4256

4357
#### Changes
58+
* Changed the radiation system
59+
* Removed backwards compatibility
60+
* (API) Improve performance for clearAllBlockInfoAtChunk
61+
* Change Energized GPS Transmitter values to follow the pattern of previous tiers (#3915)
62+
* Allowed the sword of beheading to drop piglin heads
63+
* Improvements to BlockStorage handling (#3911)
64+
* Moved builds to https://blob.build
4465

4566
#### Fixes
46-
47-
## Release Candidate 35 (7 Jul 2023)
67+
* Fix #3444
68+
* Fix #3507
69+
* Fix possible enchantment duplication
70+
* Fix Different Time of Pan Recipes
71+
* Fix some of the reported blocks not working (#3848)
72+
* Fix Soulbound Runes not working (#3932)
73+
* Fix #3836
74+
* Fix unable to craft soulbound backpack with woven backpack with id (#3939)
75+
* Fix getting radiated when not supposed to
76+
* Fix geo miner voiding resources
77+
* Fix sensitive blocks attached to sf blocks not dropping (1.19+)
78+
* Fix breaking sf block with not unlocked item duping contents (#3976)
79+
* Fix the case of SlimefunItem#itemhandlers
80+
* Fix taking damage on head collision while wearing elytra cap (#3760)
81+
* Fix heads showing as steve (#4027)
82+
* Fix grappling hook not working due to bat dying (#3926)
83+
* Fix freezer material
84+
* Fix auto update
85+
* Fix rate limiting issues (#4042)
86+
* Fix orebfuscator plugin with blocks when gold panning (#3921)
87+
88+
## Release Candidate 35 (07 Jul 2023)
4889

4990
#### Additions
5091
* Added `sounds.yml` file to configure sound effects for Slimefun

0 commit comments

Comments
 (0)