mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 10:58:15 -05:00
Update #30 - Fixed various client bugs
This commit is contained in:
@ -64,8 +64,12 @@ public class PlatformApplication {
|
||||
String str = glfwGetClipboardString(win);
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
|
||||
public static void setLocalStorage(String name, byte[] data) {
|
||||
setLocalStorage(name, data, true);
|
||||
}
|
||||
|
||||
public static void setLocalStorage(String name, byte[] data, boolean hooks) {
|
||||
if(data == null) {
|
||||
(new File("_eagstorage."+name+".dat")).delete();
|
||||
}else {
|
||||
@ -76,8 +80,12 @@ public class PlatformApplication {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static byte[] getLocalStorage(String data) {
|
||||
return getLocalStorage(data, true);
|
||||
}
|
||||
|
||||
public static byte[] getLocalStorage(String data, boolean hooks) {
|
||||
File f = new File("_eagstorage."+data+".dat");
|
||||
if(!f.isFile()) {
|
||||
return null;
|
||||
|
@ -230,6 +230,10 @@ public class PlatformInput {
|
||||
glfwSwapBuffers(win);
|
||||
}
|
||||
|
||||
public static boolean isVSyncSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean wasResized() {
|
||||
boolean b = windowResized;
|
||||
windowResized = false;
|
||||
|
@ -8,6 +8,7 @@ import org.json.JSONObject;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapter;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapterHooks;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry;
|
||||
|
||||
/**
|
||||
@ -31,6 +32,8 @@ public class DesktopClientConfigAdapter implements IClientConfigAdapter {
|
||||
|
||||
public final List<DefaultServer> defaultServers = new ArrayList();
|
||||
|
||||
private final DesktopClientConfigAdapterHooks hooks = new DesktopClientConfigAdapterHooks();
|
||||
|
||||
@Override
|
||||
public String getDefaultLocale() {
|
||||
return "en_US";
|
||||
@ -129,4 +132,32 @@ public class DesktopClientConfigAdapter implements IClientConfigAdapter {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowFNAWSkins() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLocalStorageNamespace() {
|
||||
return EaglercraftVersion.localStorageNamespace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IClientConfigAdapterHooks getHooks() {
|
||||
return hooks;
|
||||
}
|
||||
|
||||
private static class DesktopClientConfigAdapterHooks implements IClientConfigAdapterHooks {
|
||||
|
||||
@Override
|
||||
public void callLocalStorageSavedHook(String key, String base64) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String callLocalStorageLoadHook(String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user