-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor TitleContainer and fix bugs * Sync with hud refactor * Update translatable key checks * TABS * Remove extra renderBackground * Add EnumUtils * Migrate to EnumUtils
- Loading branch information
1 parent
4434668
commit 145ba09
Showing
11 changed files
with
487 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package de.hysky.skyblocker.utils; | ||
|
||
public class EnumUtils { | ||
public static <T extends Enum<T>> T cycle(T current) { | ||
T[] values = current.getDeclaringClass().getEnumConstants(); | ||
return values[(current.ordinal() + 1) % values.length]; | ||
} | ||
|
||
public static <T extends Enum<T>> T cycleBackwards(T current) { | ||
T[] values = current.getDeclaringClass().getEnumConstants(); | ||
return values[(current.ordinal() - 1 + values.length) % values.length]; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/de/hysky/skyblocker/utils/render/gui/EmptyWidget.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package de.hysky.skyblocker.utils.render.gui; | ||
|
||
import net.minecraft.client.gui.DrawContext; | ||
|
||
public class EmptyWidget extends AbstractWidget { | ||
@Override | ||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {} | ||
} |
Oops, something went wrong.