Skip to content

Commit 6082d5d

Browse files
Merge branch 'master' into update-from-template-merged
2 parents 57e8647 + 3092d76 commit 6082d5d

23 files changed

+1327
-8
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<property name="tabWidth" value="4"/>
1010

1111
<module name="SuppressionFilter">
12-
<property name="file" value=".config/checkstyle/suppressions.xml"/>
12+
<property name="file" value="${config_loc}/suppressions.xml"/>
1313
</module>
1414

1515
<module name="FileLength"/>

.config/pmd/java/ruleset.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion"/>
2828
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
2929
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
30-
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
3130
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
32-
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
3331
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
3432
<rule ref="category/java/bestpractices.xml/UseEnumCollections"/>
3533
<rule ref="category/java/bestpractices.xml/UseStandardCharsets"/>
@@ -163,6 +161,7 @@
163161
<rule ref="category/java/multithreading.xml">
164162
<!-- Just bloats code; improved in JEP-491/Java 24+ -->
165163
<exclude name="AvoidSynchronizedAtMethodLevel"/>
164+
<exclude name="AvoidSynchronizedStatement"/>
166165

167166
<!-- NOPE -->
168167
<exclude name="DoNotUseThreads"/>

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ body:
3333
validations:
3434
required: true
3535

36+
- type: checkboxes
37+
id: quick-troubleshooting
38+
attributes:
39+
label: "Quick Troubleshooting Guide"
40+
description: |
41+
Please check the relevant points.
42+
You should note relevant results below.
43+
options:
44+
- label: "Are you using the correct version of Minecraft for this version of the mod?"
45+
- label: "Did you install the mod correctly? Does it e.g. show up in the Mod Menu?"
46+
- label: "Are there any other mods installed that might affect this mod? If yes please describe them below"
47+
- label: "Does the mod work if you only install it (and mods that it depends on) and no other additional mods?"
48+
- label: "Does the mod work in another world?"
49+
- label: |
50+
Are there any warnings related to the mod when launching the game? If yes please describe them below.
51+
(Log output can be enabled in the Minecraft Launcher under
52+
Settings (bottom left) > General > Minecraft: Java Edition settings → Check "Open output log when Minecraft: Java Edition starts")"
53+
3654
- type: textarea
3755
id: description
3856
attributes:
@@ -51,8 +69,10 @@ body:
5169
5270
If you can't cause the bug to show up again reliably (and hence don't have a proper set of steps to give us), please still try to give as many details as possible on how you think you encountered the bug.
5371
placeholder: |
54-
1. Use '...'
55-
2. Do '...'
72+
1. Create a new installation/profile of Minecraft version ...
73+
2. Install the following mods: ...
74+
3. Play in the following world: *Link to world download link here*
75+
4. ... is not working
5676
validations:
5777
required: true
5878

@@ -61,4 +81,4 @@ body:
6181
attributes:
6282
label: Additional information
6383
description: |
64-
Any other relevant information you'd like to include
84+
Any other relevant information you'd like to include, e.g. a world download or a video showcasing what's happening

.github/workflows/check-build.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Check Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ dev ]
7+
paths-ignore:
8+
- '**.md'
9+
- '.config/**'
10+
- '.github/**'
11+
- '.idea/**'
12+
- '.run/**'
13+
- 'assets/**'
14+
pull_request:
15+
branches: [ dev ]
16+
paths-ignore:
17+
- '**.md'
18+
- '.config/**'
19+
- '.github/**'
20+
- '.idea/**'
21+
- '.run/**'
22+
- 'assets/**'
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 10
28+
strategy:
29+
matrix:
30+
java: [21]
31+
distribution: [temurin]
32+
33+
steps:
34+
- uses: actions/checkout@v5
35+
36+
- name: Set up JDK
37+
uses: actions/setup-java@v5
38+
with:
39+
distribution: ${{ matrix.distribution }}
40+
java-version: ${{ matrix.java }}
41+
42+
- name: Cache Gradle
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
~/.gradle/caches
47+
~/.gradle/wrapper
48+
key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
49+
restore-keys: |
50+
${{ runner.os }}-gradle-build-
51+
52+
- name: Build
53+
run: ./gradlew build --info --stacktrace
54+
55+
- name: Check for uncommited changes
56+
run: |
57+
if [[ "$(git status --porcelain)" != "" ]]; then
58+
echo ----------------------------------------
59+
echo git status
60+
echo ----------------------------------------
61+
git status
62+
echo ----------------------------------------
63+
echo git diff
64+
echo ----------------------------------------
65+
git diff
66+
echo ----------------------------------------
67+
echo Troubleshooting
68+
echo ----------------------------------------
69+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package"
70+
exit 1
71+
fi
72+
73+
- name: Upload mod files
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: mod-files-java-${{ matrix.java }}
77+
path: |
78+
build/devlibs/*-sources.jar
79+
build/libs/*.jar
80+
!build/libs/*-sources.jar
81+
!build/libs/*-javadoc.jar
82+
if-no-files-found: error
83+
84+
checkstyle:
85+
runs-on: ubuntu-latest
86+
if: ${{ github.event_name != 'pull_request' || !(startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'automated/')) }}
87+
timeout-minutes: 10
88+
strategy:
89+
matrix:
90+
java: [21]
91+
distribution: [temurin]
92+
93+
steps:
94+
- uses: actions/checkout@v5
95+
96+
- name: Set up JDK
97+
uses: actions/setup-java@v5
98+
with:
99+
distribution: ${{ matrix.distribution }}
100+
java-version: ${{ matrix.java }}
101+
102+
- name: Cache Gradle
103+
uses: actions/cache@v4
104+
with:
105+
path: |
106+
~/.gradle/caches
107+
~/.gradle/wrapper
108+
key: ${{ runner.os }}-gradle-checkstyle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
109+
restore-keys: |
110+
${{ runner.os }}-gradle-checkstyle-
111+
112+
- name: Run Checkstyle
113+
run: ./gradlew checkstyleMain checkstyleTest -PcheckstyleEnabled=true
114+
115+
pmd:
116+
runs-on: ubuntu-latest
117+
if: ${{ github.event_name != 'pull_request' || !(startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'automated/')) }}
118+
timeout-minutes: 10
119+
strategy:
120+
matrix:
121+
java: [21]
122+
distribution: [temurin]
123+
124+
steps:
125+
- uses: actions/checkout@v5
126+
127+
- name: Set up JDK
128+
uses: actions/setup-java@v5
129+
with:
130+
distribution: ${{ matrix.distribution }}
131+
java-version: ${{ matrix.java }}
132+
133+
- name: Cache Gradle
134+
uses: actions/cache@v4
135+
with:
136+
path: |
137+
~/.gradle/caches
138+
~/.gradle/wrapper
139+
key: ${{ runner.os }}-gradle-pmd-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
140+
restore-keys: |
141+
${{ runner.os }}-gradle-pmd-
142+
143+
- name: Run PMD
144+
run: ./gradlew pmdMain pmdTest -PpmdEnabled --stacktrace
145+
146+
- name: Upload report
147+
if: always()
148+
uses: actions/upload-artifact@v4
149+
with:
150+
name: pmd-report
151+
if-no-files-found: ignore
152+
path: |
153+
build/reports/pmd/*.html

0 commit comments

Comments
 (0)