Saturn Client provider
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
|||||||
|
package org.saturnclient.saturnclient.impl;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
import org.saturnclient.common.minecraft.MinecraftProvider;
|
||||||
|
import org.saturnclient.saturnclient.SaturnClient;
|
||||||
|
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
public class SaturnClientProvider extends MinecraftProvider {
|
||||||
|
@Override
|
||||||
|
public Object createIdentifier(String namespace, String path) {
|
||||||
|
return Identifier.of(namespace, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getRunDirectory() {
|
||||||
|
return SaturnClient.client.runDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isKeyPressed(int key) {
|
||||||
|
return GLFW.glfwGetKey(SaturnClient.client.getWindow().getHandle(), key) == GLFW.GLFW_PRESS
|
||||||
|
&& SaturnClient.client.currentScreen == null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user