aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-09-27 16:50:17 +0000
committerGitHub Action <actions@github.com>2021-09-27 16:50:17 +0000
commit50885a0b0bd9ad39885b68efb20a1276f16886a3 (patch)
tree070e35e2bcc8ba551ec7f2517992182911c83859 /src/main/java/com/thatgravyboat/skyblockhud/mixins
parent06c495fd067ed5c16b34322d41e9674319e09506 (diff)
downloadSkyblockHud-Death-Defied-50885a0b0bd9ad39885b68efb20a1276f16886a3.tar.gz
SkyblockHud-Death-Defied-50885a0b0bd9ad39885b68efb20a1276f16886a3.tar.bz2
SkyblockHud-Death-Defied-50885a0b0bd9ad39885b68efb20a1276f16886a3.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
index 951b549..ae7d5bf 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
@@ -18,11 +18,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(RenderItem.class)
public abstract class MixinRenderItem {
- @Shadow protected abstract void draw(WorldRenderer renderer, int x, int y, int width, int height, int red, int green, int blue, int alpha);
+ @Shadow
+ protected abstract void draw(WorldRenderer renderer, int x, int y, int width, int height, int red, int green, int blue, int alpha);
- @Inject(method="renderItemOverlayIntoGUI", at=@At("RETURN"))
+ @Inject(method = "renderItemOverlayIntoGUI", at = @At("RETURN"))
public void renderItemOverlayIntoGUI(FontRenderer fr, ItemStack stack, int xPosition, int yPosition, String text, CallbackInfo ci) {
- if(stack == null) return;
+ if (stack == null) return;
float cooldown = CooldownHandler.getAbilityTime(stack);
WeakReference<MinesHandler.PrehistoricEggProgress> weakProgress = MinesHandler.getEggColorAndProgress(stack);
@@ -37,14 +38,14 @@ public abstract class MixinRenderItem {
GlStateManager.disableBlend();
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
this.draw(worldrenderer, xPosition + 2, yPosition + 13, 13, 2, 0, 0, 0, 255);
- this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(progress.progress * 13f), 1, (progress.currentColor >> 16) & 0xFF, (progress.currentColor >> 8) & 0xFF, progress.currentColor & 0xFF, 255);
+ this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(progress.progress * 13f), 1, (progress.currentColor >> 16) & 0xFF, (progress.currentColor >> 8) & 0xFF, progress.currentColor & 0xFF, 255);
GlStateManager.enableAlpha();
GlStateManager.enableTexture2D();
GlStateManager.enableLighting();
GlStateManager.enableDepth();
}
- if (cooldown > -1){
+ if (cooldown > -1) {
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.disableTexture2D();
@@ -52,7 +53,7 @@ public abstract class MixinRenderItem {
GlStateManager.disableBlend();
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
this.draw(worldrenderer, xPosition + 2, yPosition + 13, 13, 2, 0, 0, 0, 255);
- this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(cooldown * 13f), 1, 102, 102, 255, 255);
+ this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(cooldown * 13f), 1, 102, 102, 255, 255);
GlStateManager.enableAlpha();
GlStateManager.enableTexture2D();
GlStateManager.enableLighting();