Skip to content

Commit 0031c48

Browse files
committed
Merge branch '1.20.1/dev' into 1.21.1/dev
2 parents fe6776b + 23a73f7 commit 0031c48

File tree

56 files changed

+3661
-640
lines changed

Some content is hidden

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

56 files changed

+3661
-640
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,16 @@ ij_java_else_on_new_line = false
3737
ij_java_class_count_to_use_import_on_demand = 99
3838
ij_java_names_count_to_use_import_on_demand = 99
3939
ij_java_imports_layout = $*, |, java.**, |, javax.**, |, org.**, |, com.**, |, *
40+
41+
[*.ts]
42+
indent_size = 2
43+
ij_javascript_use_semicolon_after_statement = true
44+
ij_javascript_force_semicolon_style = true
45+
ij_javascript_space_before_for_semicolon = false
46+
ij_javascript_enforce_trailing_comma = whenmultiline
47+
ij_javascript_force_quote_style = true
48+
ij_javascript_use_double_quotes = true
49+
50+
[*.css]
51+
indent_size = 2
52+

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@ jobs:
2323
restore-keys: "${{ runner.os }}-gradle-"
2424

2525
- name: Setup Gradle
26-
uses: gradle/actions/setup-gradle@v4.2.0
26+
uses: gradle/actions/setup-gradle@v4
2727
with:
2828
gradle-home-cache-cleanup: true
2929
cache-read-only: ${{ !endsWith(github.ref_name, '/dev') }}
3030

31-
- name: Validate Gradle Wrapper Integrity
32-
uses: gradle/wrapper-validation-action@v2
33-
3431
- name: Build
3532
# Doesn't actually publish, as no secrets are passed in, just makes sure that publishing works
3633
# Also generate the mod jars for the test job

.github/workflows/docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [ "1.20.1/dev" ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
working-directory: docs/
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v4
31+
with:
32+
version: 10
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: pnpm
38+
cache-dependency-path: docs/pnpm-lock.yaml
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v4
41+
- name: Install dependencies
42+
run: pnpm install --frozen-lockfile
43+
- name: Build with VitePress
44+
run: pnpm run build
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: docs/.vitepress/dist
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
needs: build
55+
runs-on: ubuntu-latest
56+
name: Deploy
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ local.properties
4343
# PDT-specific
4444
.buildpath
4545

46+
# Vitepress
47+
docs/.vitepress/dist/
48+
docs/.vitepress/cache/
49+
50+
# Logs
51+
docs/logs
52+
docs/*.log
53+
docs/npm-debug.log*
54+
docs/yarn-debug.log*
55+
docs/yarn-error.log*
56+
docs/pnpm-debug.log*
57+
docs/lerna-debug.log*
58+
59+
docs/node_modules
60+
docs/dist
61+
docs/dist-ssr
62+
docs/*.local
63+
4664
# Other
4765
.DS_Store
4866
mcmodsrepo

Jenkinsfile

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,86 @@
11
#!/usr/bin/env groovy
22

33
pipeline {
4-
5-
agent any
4+
agent none
65

76
tools {
87
jdk "jdk-21"
98
}
109

11-
options {
12-
// Sometimes builds freeze, but this doesn't have to be super aggressive.
13-
timeout(time: 30, unit: 'MINUTES')
14-
}
15-
16-
parameters {
17-
booleanParam(name: 'RELEASE', defaultValue: false, description: 'Publish artifacts without a build number.')
18-
}
19-
2010
stages {
21-
22-
stage('Setup') {
11+
stage('Build') {
12+
agent any
2313

2414
steps {
25-
26-
echo 'Setup Project'
15+
echo 'Setup project.'
2716
sh 'chmod +x gradlew'
2817
sh './gradlew clean'
18+
19+
withCredentials([
20+
// build_secrets is parsed in SubprojectExtension#loadSecrets
21+
file(credentialsId: 'build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile'),
22+
]) {
23+
echo 'Building project.'
24+
// Sometimes builds freeze, so wrap in a timeout.
25+
timeout(time: 30, unit: 'MINUTES') {
26+
sh './gradlew build publish --stacktrace --warn'
27+
}
28+
}
29+
}
30+
31+
post {
32+
always {
33+
archiveArtifacts artifacts: '**/build/libs/**/*.jar', fingerprint: true
34+
35+
withCredentials([
36+
string(credentialsId: 'discord_webhook_url', variable: 'DISCORD_URL')
37+
]) {
38+
echo 'Notifying Discord..'
39+
discordSend description: "Build: #${currentBuild.number}", link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: env.DISCORD_URL, showChangeset: true, enableArtifactsList: true
40+
}
41+
}
2942
}
3043
}
3144

32-
stage('Build') {
45+
stage('Release') {
46+
// Take the input in our when block so that we don't block any agents.
47+
when {
48+
expression {
49+
input(message: 'Publish without build number?', ok: 'Yes', cancel: 'No')
50+
// If input is cancelled the entire step will abort. Return true so we continue on confirmation.
51+
return true
52+
}
53+
beforeAgent true
54+
}
55+
56+
agent any
3357

3458
environment {
35-
RELEASE="${params.RELEASE}"
59+
RELEASE="true"
3660
}
3761

3862
steps {
63+
// Prevent older builds from being released.
64+
milestone(ordinal: 1, label: 'Release Guardian')
65+
66+
echo 'Setup project for release.'
67+
sh 'chmod +x gradlew'
68+
69+
// Clean again because the agent may have changed.
70+
sh './gradlew clean'
71+
3972
withCredentials([
4073
// build_secrets is parsed in SubprojectExtension#loadSecrets
4174
file(credentialsId: 'build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile'),
4275
]) {
43-
echo 'Building project.'
44-
sh './gradlew build publish --stacktrace --warn'
76+
echo 'Building project for release.'
77+
// Sometimes builds freeze, so wrap in a timeout.
78+
timeout(time: 30, unit: 'MINUTES') {
79+
sh './gradlew build publish --stacktrace --warn'
80+
}
4581
}
46-
}
47-
}
48-
}
49-
50-
post {
51-
52-
always {
53-
54-
archiveArtifacts artifacts: '**/build/libs/**/*.jar', fingerprint: true
5582

56-
withCredentials([
57-
string(credentialsId: 'discord_webhook_url', variable: 'DISCORD_URL')
58-
]) {
59-
echo 'Notifying Discord..'
60-
discordSend description: "Build: #${currentBuild.number}", link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: env.DISCORD_URL, showChangeset: true, enableArtifactsList: true
83+
milestone(ordinal: 2, label: 'Release')
6184
}
6285
}
6386
}

common/src/backend/java/dev/engine_room/flywheel/backend/engine/AbstractArena.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public int capacity() {
4242
return top;
4343
}
4444

45+
public int occupancy() {
46+
return top - freeStack.size();
47+
}
48+
4549
public abstract long byteCapacity();
4650

4751
protected abstract void grow();

common/src/backend/java/dev/engine_room/flywheel/backend/engine/CommonCrumbling.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.engine_room.flywheel.backend.engine;
22

3+
import dev.engine_room.flywheel.api.material.CardinalLightingMode;
34
import dev.engine_room.flywheel.api.material.Material;
45
import dev.engine_room.flywheel.api.material.Transparency;
56
import dev.engine_room.flywheel.api.material.WriteMask;
@@ -19,6 +20,6 @@ public static void applyCrumblingProperties(SimpleMaterial.Builder crumblingMate
1920
.writeMask(WriteMask.COLOR)
2021
.useOverlay(false)
2122
.useLight(false)
22-
.diffuse(false);
23+
.cardinalLightingMode(CardinalLightingMode.OFF);
2324
}
2425
}

0 commit comments

Comments
 (0)