Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.1.0 beta 1.21 #25

Merged
merged 23 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b794928
Update 20231022 - Merge Conflicts Fix
Virus5600 Oct 22, 2023
be27e76
Update 20231025 - Packets & Refactorization
Virus5600 Oct 24, 2023
2cb0e2a
Merge branch 'main' into v1.1.0-beta
Virus5600 Oct 24, 2023
5befd6b
Update 20231025 - AA Projectile Update
Virus5600 Oct 24, 2023
01b28b2
Update 20240710 - Complete Refactor to 1.21
Virus5600 Jul 10, 2024
527ce7e
Hotfix 20240710 - Quick Action Hotfix
Virus5600 Jul 10, 2024
0a81d23
Update 20240712 - Refactor and Clean Up
Virus5600 Jul 12, 2024
60559b3
Update 20240712 - Began Entity Render (Cannon Turret)
Virus5600 Jul 12, 2024
ec94a38
Update 20240712 - Javadoc & Logger Update
Virus5600 Jul 12, 2024
063e77e
Update 20240715 - Re-Implemented Cannon Turret
Virus5600 Jul 14, 2024
fdf8b31
Update 20240719 - Implemented Basic CT Animations
Virus5600 Jul 19, 2024
4f5671e
Update 20241210 - Math Update
Virus5600 Dec 9, 2024
ef521b1
Update 20241211 - Cannon Turret Update
Virus5600 Dec 11, 2024
7c11d05
Remap 20241212 - Remapped Code to 1.21.3
Virus5600 Dec 11, 2024
84a07da
Update 20241212 - Minimum Java Required
Virus5600 Dec 12, 2024
713f384
Implemented Mapping Migrations
Virus5600 Dec 12, 2024
05c2911
Update 20241217 - Item Registration Update
Virus5600 Dec 16, 2024
ca40641
Update 20241217 - Standard Item Regis Fix
Virus5600 Dec 17, 2024
fd0316c
Update 20241228 - Cannon Turret Implementation
Virus5600 Dec 28, 2024
7d09ba9
Implementation 20241228 - Full Cannon Turret
Virus5600 Dec 28, 2024
2eeb61a
GitHub Actions Refactorization (#24)
Virus5600 Dec 30, 2024
7a872ec
Update 20250102 - (Re-)Implemented Ballista Arrow
Virus5600 Jan 1, 2025
e233d7e
Funding 20250102 - Added Funding Opt
Virus5600 Jan 2, 2025
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
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.{yml,yaml}]
indent_style = space
indent_size = 2
max_line_length = off
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: virus5600
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
28 changes: 28 additions & 0 deletions .github/actions/download_dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Download Dependencies"
description: "Downloads the dependencies for the mod"

inputs:
minecraft_version:
type: string
description: 'Minecraft version to use for testing. Defaults to "1.21.3".'
default: "1.21.3"

loader:
type: string
description: 'Mod loader to use for testing. Defaults to "fabric".'
default: "fabric"

runs:
using: "composite"
steps:
- name: "[Geckolib 3] (${{ runner.os }}) Fetch Version"
uses: ./.github/actions/set_to_env
with:
value: $( ./gradlew -q :getGeckolib3Version )
env_var: GECKOLIB3_VERSION

- name: "[Geckolib 3] Downloading..."
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9
with:
url: "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/software/bernie/geckolib/geckolib-${{ inputs.loader }}-${{ inputs.minecraft_version }}/${{ env.GECKOLIB3_VERSION }}/geckolib-${{ inputs.loader }}-${{ inputs.minecraft_version }}-${{ env.GECKOLIB3_VERSION }}.jar"
target: "run/mods"
46 changes: 46 additions & 0 deletions .github/actions/prep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Pre Testing"
description: "Prepare the environment for testing"

inputs:
java:
type: number
description: 'Java version to use for testing. Defaults to 22.'
default: 22

java_dist:
type: string
description: 'Java distribution to use for testing. Defaults to "adopt".'
default: 'adopt'

os:
type: string
description: 'Operating system to use for testing. Defaults to "ubuntu-latest".'
default: 'ubuntu-latest'

runs:
using: "composite"
steps:
- name: "[Pre Testing] Debug Info"
shell: bash
run: |
echo "Java Version: ${{ inputs.java }}"
echo "Java Distribution: ${{ inputs.java_dist }}"
echo "Operating System: ${{ inputs.os }}"

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Setup JDK ${{ inputs.java }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ inputs.java }}

- name: Make Gradle Wrapper Executable
if: ${{ inputs.os != 'Windows' }}
shell: bash
run: chmod +x ./gradlew

- name: Build Mod with Gradle
shell: bash
run: ./gradlew build --stacktrace
24 changes: 24 additions & 0 deletions .github/actions/set_to_env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Set Variable to Environment"
description: "Sets a value to an environment variable with respect to the operating system"

inputs:
value:
type: string
description: 'Value to set to the environment variable.'
required: true

env_var:
type: string
description: 'Name of the environment variable to set.'
required: true

runs:
using: "composite"
steps:
- if: runner.os != 'Windows'
shell: bash
run: echo "${{ inputs.env_var }}=${{ inputs.value }}" >> $GITHUB_ENV

- if: runner.os == 'Windows'
shell: powershell
run: echo "${{ inputs.env_var }}=${{ inputs.value }}" | Out-File -FilePath $env:GITHUB_ENV -Append
37 changes: 18 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
name: Build Check
on: [pull_request, push]

jobs:
Expand All @@ -12,28 +12,27 @@ jobs:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
22 # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-2022]
# Run on both Linux and Windows
os:
- ubuntu-latest
- windows-latest

runs-on: ${{ matrix.os }}
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v1
- name: Checkout Repository
uses: actions/checkout@v4

- name: Prepare Testing
uses: ./.github/actions/prep
with:
java-version: ${{ matrix.java }}
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v2
java: ${{ matrix.java }}
os: ${{ matrix.os }}

- name: Capture Build Artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '22' }} # Only upload artifacts built from latest java on one OS
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
16 changes: 0 additions & 16 deletions .github/workflows/error_action.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/fabric.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Fabric Testing
on: [pull_request, push]

jobs:
run:
strategy:
matrix:
version:
- {minecraft_version: "1.21.3", java: 22, loader: fabric, api: "0.110.0"}
os:
- ubuntu-latest

runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Prepare Testing
uses: ./.github/actions/prep
with:
java: ${{ matrix.version.java }}
java_dist: temurin
os: ubuntu-latest

- name: Get jar name
uses: ./.github/actions/set_to_env
with:
value: $( ./gradlew -q :getJarName )
env_var: JAR_NAME

- name: Stage mod for test client
run: |
mkdir -p run/mods
cp build/libs/${{ env.JAR_NAME }}.jar run/mods

- name: Download dependencies
uses: ./.github/actions/download_dependencies
with:
minecraft_version: ${{ matrix.version.minecraft_version }}
loader: ${{ matrix.version.loader }}


- name: "[Fabric Testing] Debug Info"
run: |
echo "Minecraft Version: ${{ matrix.version.minecraft_version }}"
echo "Mod Loader: ${{ matrix.version.loader }}"
echo "Regex: .*${{ matrix.version.loader }}.*"
echo "Java Version: ${{ matrix.version.java }}"
echo "Runtime Test Version: ${{ matrix.version.loader }}"
echo "Fabric API Version: ${{ matrix.version.api }}"

- name: Run MC test client
uses: headlesshq/mc-runtime-test@3.0.0
with:
mc: ${{ matrix.version.minecraft_version }}
modloader: ${{ matrix.version.loader }}
regex: .*${{ matrix.version.loader }}.*
java: ${{ matrix.version.java }}
mc-runtime-test: ${{ matrix.version.loader }}
xvfb: false
fabric-api: ${{ matrix.version.api }}
headlessmc-command: -lwjgl --jvm -Djava.awt.headless=true

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ bin/
# fabric

run/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
Loading
Loading