Skip to content

Commit 31826c9

Browse files
committed
RenderUtil cleanup
1 parent 173e60a commit 31826c9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/com/falsepattern/lib/util/RenderUtil.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,7 @@
3939
@NoArgsConstructor(access = PRIVATE)
4040
@StableAPI(since = "0.8.0")
4141
public final class RenderUtil {
42-
private final static Timer MINECRAFT_TIMER = getMinecraftTimer();
43-
44-
@StableAPI.Expose
45-
@SneakyThrows
46-
private static Timer getMinecraftTimer() {
47-
val timerField = ReflectionHelper.findField(Minecraft.class, "timer", "field_71428_T");
48-
timerField.setAccessible(true);
49-
return (Timer) timerField.get(getMinecraft());
50-
}
42+
private static final Timer MINECRAFT_TIMER = getMinecraftTimer();
5143

5244
@StableAPI.Expose(since = "0.10.0")
5345
public static IIcon getFullTextureIcon(String iconName, int width, int height) {
@@ -103,4 +95,12 @@ public String getIconName() {
10395
public static float partialTick() {
10496
return MINECRAFT_TIMER.renderPartialTicks;
10597
}
98+
99+
@StableAPI.Expose
100+
@SneakyThrows
101+
private static Timer getMinecraftTimer() {
102+
val timerField = ReflectionHelper.findField(Minecraft.class, "timer", "field_71428_T");
103+
timerField.setAccessible(true);
104+
return (Timer) timerField.get(getMinecraft());
105+
}
106106
}

0 commit comments

Comments
 (0)