API Surface (4)
void youJustLostTheGame()
double getTime()
void openUri(final URI uri)
void openPath(final Path path)
Code Graph: Dependencies (3)
Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
Blaze3D.java43 lines · Minecraft 26.3 · verbatim
| 1 | package com.mojang.blaze3d;
|
| 2 |
|
| 3 | import com.mojang.logging.LogUtils;
|
| 4 | import java.net.URI;
|
| 5 | import java.nio.file.Path;
|
| 6 | import net.fabricmc.api.EnvType;
|
| 7 | import net.fabricmc.api.Environment;
|
| 8 | import net.minecraft.util.TimeUtil;
|
| 9 | import net.minecraft.util.Util;
|
| 10 | import org.lwjgl.sdl.SDLError;
|
| 11 | import org.lwjgl.sdl.SDLMisc;
|
| 12 | import org.lwjgl.sdl.SDLTimer;
|
| 13 | import org.lwjgl.system.MemoryUtil;
|
| 14 | import org.slf4j.Logger;
|
| 15 |
|
| 16 | @Environment(EnvType.CLIENT)
|
| 17 | public class Blaze3D {
|
| 18 | private static final Logger LOGGER = LogUtils.getLogger();
|
| 19 |
|
| 20 | public static void youJustLostTheGame() {
|
| 21 | MemoryUtil.memSet(0L, 0, 1L);
|
| 22 | }
|
| 23 |
|
| 24 | public static double getTime() {
|
| 25 | return (double)SDLTimer.SDL_GetTicksNS() / TimeUtil.NANOSECONDS_PER_SECOND;
|
| 26 | }
|
| 27 |
|
| 28 | private Blaze3D() {
|
| 29 | }
|
| 30 |
|
| 31 | public static void openUri(final URI uri) {
|
| 32 | Util.nonCriticalIoPool().execute(() -> {
|
| 33 | if (!SDLMisc.SDL_OpenURL(uri.toString())) {
|
| 34 | LOGGER.warn("Failed to open uri {}: {}", uri, SDLError.SDL_GetError());
|
| 35 | }
|
| 36 | });
|
| 37 | }
|
| 38 |
|
| 39 | public static void openPath(final Path path) {
|
| 40 | openUri(path.normalize().toUri());
|
| 41 | }
|
| 42 | }
|
| 43 |
|
Decompiled Minecraft 26.3 source of Blaze3D (com/mojang/blaze3d/Blaze3D.java) with Mojang official mappings, stored verbatim on the site.