Update #40 - FPS boost and fixed IndexOutOfBoundsException

This commit is contained in:
lax1dude
2024-10-19 16:52:27 -07:00
parent 85f4db5ac6
commit bcd575e87e
79 changed files with 1054 additions and 448 deletions

View File

@ -5,6 +5,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
/**
* Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved.
*
@ -57,11 +59,14 @@ public class EagUtils {
return str.length() < off + 2 ? decodeHex(str.subSequence(off, 2)) : 0;
}
public static void sleep(int millis) {
PlatformRuntime.sleep(millis);
}
public static void sleep(long millis) {
try {
Thread.sleep(millis);
}catch(InterruptedException ex) {
}
int reduced = (int)millis;
if(reduced != millis) throw new IllegalArgumentException();
PlatformRuntime.sleep(reduced);
}
public static String toASCIIEagler(String str) {