From 31826c94150549234d5ce55e446e8c756052ed6a Mon Sep 17 00:00:00 2001 From: Ven Date: Fri, 30 Jun 2023 10:55:11 +0100 Subject: [PATCH] RenderUtil cleanup --- .../com/falsepattern/lib/util/RenderUtil.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/falsepattern/lib/util/RenderUtil.java b/src/main/java/com/falsepattern/lib/util/RenderUtil.java index 409cbf9..4bda6d1 100644 --- a/src/main/java/com/falsepattern/lib/util/RenderUtil.java +++ b/src/main/java/com/falsepattern/lib/util/RenderUtil.java @@ -39,15 +39,7 @@ import static net.minecraft.client.Minecraft.getMinecraft; @NoArgsConstructor(access = PRIVATE) @StableAPI(since = "0.8.0") public final class RenderUtil { - private final static Timer MINECRAFT_TIMER = getMinecraftTimer(); - - @StableAPI.Expose - @SneakyThrows - private static Timer getMinecraftTimer() { - val timerField = ReflectionHelper.findField(Minecraft.class, "timer", "field_71428_T"); - timerField.setAccessible(true); - return (Timer) timerField.get(getMinecraft()); - } + private static final Timer MINECRAFT_TIMER = getMinecraftTimer(); @StableAPI.Expose(since = "0.10.0") public static IIcon getFullTextureIcon(String iconName, int width, int height) { @@ -103,4 +95,12 @@ public final class RenderUtil { public static float partialTick() { return MINECRAFT_TIMER.renderPartialTicks; } + + @StableAPI.Expose + @SneakyThrows + private static Timer getMinecraftTimer() { + val timerField = ReflectionHelper.findField(Minecraft.class, "timer", "field_71428_T"); + timerField.setAccessible(true); + return (Timer) timerField.get(getMinecraft()); + } }