Skip to content

Commit

Permalink
port to OneConfig commands-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrm-en committed Oct 24, 2022
1 parent 05d1703 commit 5559818
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 6 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Build Workflow

name: Build

on:
pull_request:
workflow_dispatch:
push:

concurrency:
group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
cancel-in-progress: true

jobs:
build:
name: Build

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: temurin
cache: 'gradle'

- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
**/loom-cache
**/prebundled-jars
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Chmod Gradle
run: chmod +x ./gradlew

- name: Build
run: ./gradlew build --no-daemon

- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: versions/**/build/libs/
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# vscode
.vscode

# fleet
.fleet

# eclipse
eclipse
bin
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

@Mod(modid = OverflowAnimations.MODID, name = OverflowAnimations.NAME, version = OverflowAnimations.VERSION)
public class OverflowAnimations {

public static final String MODID = "@ID@";
public static final String NAME = "@NAME@";
public static final String VERSION = "@VER@";
Expand All @@ -34,6 +33,6 @@ public void init(FMLInitializationEvent event) {

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
CommandManager.INSTANCE.registerCommand(OldAnimationsCommand.class);
CommandManager.INSTANCE.registerCommand(new OldAnimationsCommand());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

@Command(value = "overflowanimations", aliases = {"oam", "oldanimations"}, description = "Overflow Animations")
public class OldAnimationsCommand {

@Main
public static void handle() {
public void handle() {
OverflowAnimations.oldAnimationsSettings.openGui();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ public void onClientTick(TickEvent.ClientTickEvent event) {
}

/**
* Renders an item from the first person perspective
* Renders an item from the first-person perspective
* The following code has been taken from 1.7 and heavily modified to be readable
*
* @return whether to cancel default item rendering
*/
@SuppressWarnings("deprecation")
public boolean renderItemInFirstPerson(ItemRenderer renderer, ItemStack stack, float equipProgress, float partialTicks) {
if (stack == null) {
//Let the ItemRenderer render the player hand, we don't need to change it at all
Expand Down

0 comments on commit 5559818

Please sign in to comment.