make fabric entry points wired through an adapter
This commit is contained in:
1 parent
0abefe7a04
commit
5152e6e0a6
7 files changed
+52
-32
No files matched your search
@@ -1,19 +1,16 @@
|
||||
package dev.zprestige.prestige.ui.mc;
|
||||
|
||||
import dev.zprestige.prestige.ui.Input;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
/** Opens the ported ClickGUI with the configured menu key (Input.menuKey, default RIGHT SHIFT); closing is handled by Input via the key mixin. */
|
||||
public final class Entry implements ClientModInitializer {
|
||||
public final class Entry {
|
||||
static boolean prev;
|
||||
private static int cachedVk = -1, cachedGlfw;
|
||||
|
||||
@Override public void onInitializeClient() {
|
||||
public void initialize() {
|
||||
try { Skid.run(); } catch (Throwable t) { System.out.println("[prestige-ui] splash " + t); }
|
||||
ClientTickEvents.END_CLIENT_TICK.register(this::tick);
|
||||
System.out.println("[prestige-ui] loaded (menu key opens the menu)");
|
||||
}
|
||||
|
||||
@@ -30,7 +27,7 @@ public final class Entry implements ClientModInitializer {
|
||||
|
||||
static boolean bridgeTried;
|
||||
|
||||
void tick(MinecraftClient mc) {
|
||||
public void tick(MinecraftClient mc) {
|
||||
if (dev.zprestige.prestige.client.Prestige.selfDestructed) return;
|
||||
if (!bridgeTried) { bridgeTried = true; dev.zprestige.prestige.ui.bridge.Bridge.bind(); }
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user