aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/mixins
diff options
context:
space:
mode:
authorThatGravyBoat <ThatGravyBoat@users.noreply.github.com>2021-07-27 07:09:21 +0000
committerGitHub Action <actions@github.com>2021-07-27 07:09:21 +0000
commit8f14ae49e5cfd329a70895e74ebb22bc7559f32e (patch)
treea9b6e44d5b404fba4ff1f14462bb592bdbfa16bb /src/main/java/com/thatgravyboat/skyblockhud/mixins
parent7809a1362c9644c9bfb69d8563a13e3f1ed3354a (diff)
downloadSkyblockHud-Death-Defied-8f14ae49e5cfd329a70895e74ebb22bc7559f32e.tar.gz
SkyblockHud-Death-Defied-8f14ae49e5cfd329a70895e74ebb22bc7559f32e.tar.bz2
SkyblockHud-Death-Defied-8f14ae49e5cfd329a70895e74ebb22bc7559f32e.zip
Prettified Code!
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/GuiChestAccessor.java1
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java11
2 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/GuiChestAccessor.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/GuiChestAccessor.java
index a300f9e..0a1fb75 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/GuiChestAccessor.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/GuiChestAccessor.java
@@ -7,7 +7,6 @@ import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(GuiChest.class)
public interface GuiChestAccessor {
-
@Accessor
IInventory getLowerChestInventory();
}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
index 08f9314..269920f 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinRenderItem.java
@@ -16,14 +16,15 @@ 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);
- if (cooldown > -1){
+ if (cooldown > -1) {
GlStateManager.disableLighting();
GlStateManager.disableDepth();
GlStateManager.disableTexture2D();
@@ -31,7 +32,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();