From 296184b1dde5f1670b4fa8972ec92024b22c4d34 Mon Sep 17 00:00:00 2001 From: Marcel Konrad Date: Wed, 18 Sep 2019 14:54:36 +0200 Subject: [PATCH] Formatting --- .../worldhandler/util/UtilRender.java | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/main/java/exopandora/worldhandler/util/UtilRender.java b/src/main/java/exopandora/worldhandler/util/UtilRender.java index 339c0c7..07bc3b6 100644 --- a/src/main/java/exopandora/worldhandler/util/UtilRender.java +++ b/src/main/java/exopandora/worldhandler/util/UtilRender.java @@ -3,8 +3,8 @@ package exopandora.worldhandler.util; import com.mojang.blaze3d.platform.GlStateManager; import exopandora.worldhandler.config.Config; -import exopandora.worldhandler.format.TextFormatting; import exopandora.worldhandler.helper.ResourceHelper; +import exopandora.worldhandler.text.TextFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; import net.minecraftforge.api.distmarker.Dist; @@ -13,43 +13,43 @@ import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) public class UtilRender { - public static void drawWatchIntoGui(Screen gui, int width, int height, long worldTicks, boolean smooth) - { - float hour = TextFormatting.getHour(worldTicks); - float minute = TextFormatting.getMinute(worldTicks); - - if(smooth) - { - hour = (worldTicks + 6000) / 1000F; - minute = (float) ((worldTicks + 6000F - Math.floor(hour) * 1000) * 6 / 100); - } - - float rotationHour = (360 / 12) * (hour >= 12 ? (hour - 12) : hour) - 180F; - float rotationMinute = (360 / 60) * minute - 180F; - - GlStateManager.pushMatrix(); - GlStateManager.translatef(width + 5, height + 5, 0F); - GlStateManager.scalef(0.25F, 0.25F, 0.25F); - - GlStateManager.rotatef(rotationHour, 0F, 0F, 1F); - Screen.fill(-1, -1, 1, 11, 0xFF383838); - GlStateManager.rotatef(-rotationHour, 0F, 0F, 1F); - - GlStateManager.rotatef(rotationMinute, 0F, 0F, 1F); - Screen.fill(-1, -1, 1, 15, 0xFF6F6F6F); - GlStateManager.rotatef(-rotationMinute, 0F, 0F, 1F); - - GlStateManager.color3f(1.0F, 1.0F, 1.0F); - GlStateManager.popMatrix(); - - GlStateManager.color3f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF()); - Minecraft.getInstance().getTextureManager().bindTexture(ResourceHelper.getIconTexture()); - - gui.blit(width + 0, height, 48, 0, 10, 10); - - GlStateManager.pushMatrix(); - GlStateManager.scalef(0.5F, 0.5F, 0.5F); - Screen.fill((width + 5) * 2 - 1, (height + 4) * 2 + 1, (width + 6) * 2 - 1, (height + 5) * 2 + 1, 0xFF000000); - GlStateManager.popMatrix(); - } + public static void drawWatchIntoGui(Screen gui, int width, int height, long worldTicks, boolean smooth) + { + float hour = TextFormatting.getHour(worldTicks); + float minute = TextFormatting.getMinute(worldTicks); + + if(smooth) + { + hour = (worldTicks + 6000) / 1000F; + minute = (float) ((worldTicks + 6000F - Math.floor(hour) * 1000) * 6 / 100); + } + + float rotationHour = (360 / 12) * (hour >= 12 ? (hour - 12) : hour) - 180F; + float rotationMinute = (360 / 60) * minute - 180F; + + GlStateManager.pushMatrix(); + GlStateManager.translatef(width + 5, height + 5, 0F); + GlStateManager.scalef(0.25F, 0.25F, 0.25F); + + GlStateManager.rotatef(rotationHour, 0F, 0F, 1F); + Screen.fill(-1, -1, 1, 11, 0xFF383838); + GlStateManager.rotatef(-rotationHour, 0F, 0F, 1F); + + GlStateManager.rotatef(rotationMinute, 0F, 0F, 1F); + Screen.fill(-1, -1, 1, 15, 0xFF6F6F6F); + GlStateManager.rotatef(-rotationMinute, 0F, 0F, 1F); + + GlStateManager.color3f(1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + + GlStateManager.color3f(Config.getSkin().getButtonRedF(), Config.getSkin().getButtonGreenF(), Config.getSkin().getButtonBlueF()); + Minecraft.getInstance().getTextureManager().bindTexture(ResourceHelper.getIconTexture()); + + gui.blit(width + 0, height, 48, 0, 10, 10); + + GlStateManager.pushMatrix(); + GlStateManager.scalef(0.5F, 0.5F, 0.5F); + Screen.fill((width + 5) * 2 - 1, (height + 4) * 2 + 1, (width + 6) * 2 - 1, (height + 5) * 2 + 1, 0xFF000000); + GlStateManager.popMatrix(); + } }