Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Automatically build the project and run any configured tests for every push.
# This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defense
# against bad commits.

name: build

on:
push:

jobs:
build:
runs-on: ubuntu-24.04

steps:
- name: Extract current branch name
shell: bash
run: |
ref="${GITHUB_REF#refs/heads/}"
echo "branch=${ref////-}" >> $GITHUB_OUTPUT
id: ref

- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'microsoft'

- name: Make Gradle wrapper executable
run: chmod +x ./gradlew

- name: Build
run: ./gradlew build

- name: Rename JAR for distribution
run: |
MAIN_JAR=$(ls build/libs/*.jar | grep -v 'sources' | head -n 1)
SOURCES_JAR=$(ls build/libs/*sources*.jar | head -n 1)

VERSION=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2)
MC_VERSION=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2)

BASE="bbe-${VERSION}+${MC_VERSION}-build.${{ github.run_number }}"

mv "$MAIN_JAR" "build/libs/${BASE}.jar"
mv "$SOURCES_JAR" "build/libs/${BASE}-sources.jar"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: bbe-artifacts-${{ github.run_number }}
path: build/libs/*.jar
50 changes: 50 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Used when building external pull requests
# We don't want to publish build artifacts or expose our other caches to possibly untrusted code
name: build-pull-request

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Make Gradle wrapper executable
run: chmod +x ./gradlew

- name: Setup Gradle (read-only cache)
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

- name: Build
run: ./gradlew build

- name: Rename JAR for distribution
run: |
MAIN_JAR=$(ls build/libs/*.jar | grep -v 'sources' | head -n 1)
SOURCES_JAR=$(ls build/libs/*sources*.jar | head -n 1)

VERSION=$(grep '^mod_version=' gradle.properties | cut -d'=' -f2)
MC_VERSION=$(grep '^minecraft_version=' gradle.properties | cut -d'=' -f2)

BASE="bbe-${VERSION}+${MC_VERSION}-build.${{ github.run_number }}"

mv "$MAIN_JAR" "build/libs/${BASE}.jar"
mv "$SOURCES_JAR" "build/libs/${BASE}-sources.jar"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: bbe-artifacts-${{ github.run_number }}
path: build/libs/*.jar
38 changes: 38 additions & 0 deletions .github/workflows/build-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Used when a commit is tagged and pushed to the repository
# This makes use of caching for faster builds and uploads the resulting artifacts
name: build-tag

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Extract current branch name
shell: bash
# bash pattern expansion to grab branch name without slashes
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT
id: ref
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Execute Gradle build
run: ./gradlew build -Pbuild.release=true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bbe-artifacts-${{ steps.ref.outputs.branch }}
path: build/libs/*.jar
30 changes: 0 additions & 30 deletions .github/workflows/build.yml

This file was deleted.

3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ A- Minecraft versions from 1.21.6 and above
**Q- Are backports planned?**
A- No backports are planned

**Q- I don't see my sherds/pottery pattern on my Decorated Pot**
A- We have yet to implement this into the mod, but support for this will come in a future update! If you want your pottery patterns to work, disable the decorated pot in the config screen.

**Q- My chests (or any other block entity) is invisible/glitched, what do I do?**
A- You are most likely using a resource pack that conflicts with BBE, either disable the block entity optimizations through the config screen or turn off the resource pack.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.17.3
loom_version=1.11-SNAPSHOT

# mod properties
mod_version=1.2.0
mod_version=1.3.0+1.21.10
maven_group=ceeden
archives_base_name=bbe

Expand Down