Skip to content

Commit

Permalink
Merge pull request #481 from Kasualix/1.16.5
Browse files Browse the repository at this point in the history
Fix Epic Fight compat
  • Loading branch information
Asek3 authored Nov 14, 2023
2 parents 839ce8e + a47d7fa commit 43b4e6b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# This workflow will build a Java project with Brachyra
# For more information see: docs/development/brachyura.md
name: Build

name: Java CI with Brachyura

on: [push, pull_request]
on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Cache Brachyura directory
uses: actions/cache@v2
with:
path: |
.brachyura
~/.brachyura
key: ${{ runner.os }}-brachyura-${{ hashFiles('**/Buildscript.java') }}
restore-keys: ${{ runner.os }}-brachyura

- name: Build with Brachyura
run: java -jar brachyura-bootstrap-0.jar build
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'build.gradle') }}
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts-forge
path: ${{ github.workspace }}/build/libs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,8 @@

@Mixin(EpicFightRenderTypes.class)
public class MixinEpicFightRenderTypes {

@Shadow
private static RenderType enchantedAnimatedArmor() {
return null;
}

@Inject(method = "getArmorVertexBuilder", at = @At("HEAD"), cancellable = true)
private static void getArmorVertexBuilder(MultiBufferSource buffer, RenderType renderType, boolean withGlint, CallbackInfoReturnable<VertexConsumer> cir) {
if(withGlint)
cir.setReturnValue(buffer.getBuffer(enchantedAnimatedArmor()));
if(EpicFightRenderTypes.enchantedAnimatedArmor() == renderType) cir.setReturnValue(buffer.getBuffer(renderType));
}

}

0 comments on commit 43b4e6b

Please sign in to comment.