mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-24 19:47:28 -04:00
Fix not breakline, fix inaccessible
This commit is contained in:
@@ -48,15 +48,15 @@ public final class ClassData {
|
||||
|
||||
public Field[] allFields() {
|
||||
Field[] result = new Field[staticFields.length + instanceFields.length];
|
||||
System.arraycopy(staticFields, 0, result, 0, staticFields.length);
|
||||
System.arraycopy(instanceFields, 0, result, staticFields.length, instanceFields.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(staticFields, 0, result, 0, staticFields.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(instanceFields, 0, result, staticFields.length, instanceFields.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Method[] allMethods() {
|
||||
Method[] result = new Method[directMethods.length + virtualMethods.length];
|
||||
System.arraycopy(directMethods, 0, result, 0, directMethods.length);
|
||||
System.arraycopy(virtualMethods, 0, result, directMethods.length, virtualMethods.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(directMethods, 0, result, 0, directMethods.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(virtualMethods, 0, result, directMethods.length, virtualMethods.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ public final class ExecutionStack extends MutabilityControl {
|
||||
public ExecutionStack copy() {
|
||||
ExecutionStack result = new ExecutionStack(stack.length);
|
||||
|
||||
System.arraycopy(stack, 0, result.stack, 0, stack.length);
|
||||
System.arraycopy(local, 0, result.local, 0, local.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(stack, 0, result.stack, 0, stack.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(local, 0, result.local, 0, local.length);
|
||||
result.stackPtr = stackPtr;
|
||||
|
||||
return result;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class OneLocalsArray extends LocalsArray {
|
||||
public OneLocalsArray copy() {
|
||||
OneLocalsArray result = new OneLocalsArray(locals.length);
|
||||
|
||||
System.arraycopy(locals, 0, result.locals, 0, locals.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(locals, 0, result.locals, 0, locals.length);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ public class Main {
|
||||
private static String[] without(String[] orig, int n) {
|
||||
int len = orig.length - 1;
|
||||
String[] newa = new String[len];
|
||||
System.arraycopy(orig, 0, newa, 0, n);
|
||||
System.arraycopy(orig, n + 1, newa, n, len - n);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(orig, 0, newa, 0, n);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(orig, n + 1, newa, n, len - n);
|
||||
return newa;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class Main {
|
||||
}
|
||||
} else {
|
||||
files = new String[argArray.length - i];
|
||||
System.arraycopy(argArray, i, files, 0, files.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(argArray, i, files, 0, files.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1424,7 +1424,7 @@ public class Main {
|
||||
int n = arguments.length - index;
|
||||
String[] remaining = new String[n];
|
||||
if (n > 0) {
|
||||
System.arraycopy(arguments, index, remaining, 0, n);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(arguments, index, remaining, 0, n);
|
||||
}
|
||||
return remaining;
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ public final class LocalList extends FixedSizeList {
|
||||
|
||||
if (!first) {
|
||||
newRegs.putAll(regs);
|
||||
System.arraycopy(endIndices, 0, newEnds, 0,
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(endIndices, 0, newEnds, 0,
|
||||
endIndices.length);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class ShortArrayCodeOutput extends BaseCodeCursor
|
||||
}
|
||||
|
||||
short[] result = new short[cursor];
|
||||
System.arraycopy(array, 0, result, 0, cursor);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(array, 0, result, 0, cursor);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class CstString extends TypedConstant {
|
||||
}
|
||||
|
||||
byte[] result = new byte[outAt];
|
||||
System.arraycopy(bytes, 0, result, 0, outAt);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(bytes, 0, result, 0, outAt);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ public class SsaRenamer implements Runnable {
|
||||
private static RegisterSpec[] dupArray(RegisterSpec[] orig) {
|
||||
RegisterSpec[] copy = new RegisterSpec[orig.length];
|
||||
|
||||
System.arraycopy(orig, 0, copy, 0, orig.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(orig, 0, copy, 0, orig.length);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BitIntSet implements IntSet {
|
||||
if (value >= Bits.getMax(bits)) {
|
||||
int[] newBits = Bits.makeBitSet(
|
||||
Math.max(value + 1, 2 * Bits.getMax(bits)));
|
||||
System.arraycopy(bits, 0, newBits, 0, bits.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(bits, 0, newBits, 0, bits.length);
|
||||
bits = newBits;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public final class ByteArray {
|
||||
"size()");
|
||||
}
|
||||
|
||||
System.arraycopy(bytes, start, out, offset, size);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(bytes, start, out, offset, size);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -320,7 +320,7 @@ public final class ByteArray {
|
||||
length = maxLength;
|
||||
}
|
||||
|
||||
System.arraycopy(bytes, cursor + start, arr, offset, length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(bytes, cursor + start, arr, offset, length);
|
||||
cursor += length;
|
||||
return length;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public final class ByteArrayAnnotatedOutput
|
||||
*/
|
||||
public byte[] toByteArray() {
|
||||
byte[] result = new byte[cursor];
|
||||
System.arraycopy(data, 0, result, 0, cursor);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(data, 0, result, 0, cursor);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public final class ByteArrayAnnotatedOutput
|
||||
return;
|
||||
}
|
||||
|
||||
System.arraycopy(bytes, offset, data, writeAt, length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(bytes, offset, data, writeAt, length);
|
||||
cursor = end;
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ public final class ByteArrayAnnotatedOutput
|
||||
private void ensureCapacity(int desiredSize) {
|
||||
if (data.length < desiredSize) {
|
||||
byte[] newData = new byte[desiredSize * 2 + 1000];
|
||||
System.arraycopy(data, 0, newData, 0, cursor);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(data, 0, newData, 0, cursor);
|
||||
data = newData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public final class HexParser {
|
||||
|
||||
if (outAt < result.length) {
|
||||
byte[] newr = new byte[outAt];
|
||||
System.arraycopy(result, 0, newr, 0, outAt);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(result, 0, newr, 0, outAt);
|
||||
result = newr;
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ public final class IntList extends MutabilityControl {
|
||||
|
||||
growIfNeeded();
|
||||
|
||||
System.arraycopy (values, n, values, n+1, size - n);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy (values, n, values, n+1, size - n);
|
||||
values[n] = value;
|
||||
size++;
|
||||
|
||||
@@ -259,7 +259,7 @@ public final class IntList extends MutabilityControl {
|
||||
throw new IndexOutOfBoundsException("n >= size()");
|
||||
}
|
||||
|
||||
System.arraycopy (values, n + 1, values, n, size - n - 1);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy (values, n + 1, values, n, size - n - 1);
|
||||
size--;
|
||||
|
||||
// sort status is unchanged
|
||||
@@ -272,7 +272,7 @@ public final class IntList extends MutabilityControl {
|
||||
if (size == values.length) {
|
||||
// Resize.
|
||||
int[] newv = new int[size * 3 / 2 + 10];
|
||||
System.arraycopy(values, 0, newv, 0, size);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(values, 0, newv, 0, size);
|
||||
values = newv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -780,7 +780,7 @@ public class GLTextureView
|
||||
*/
|
||||
int len = configSpec.length;
|
||||
int[] newConfigSpec = new int[len + 2];
|
||||
// System.arraycopy(configSpec, 0, newConfigSpec, 0, len-1);
|
||||
// net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(configSpec, 0, newConfigSpec, 0, len-1);
|
||||
for (int i = 0; i < len; i++) {
|
||||
newConfigSpec[i] = configSpec[i];
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
bufIndex -= 6;
|
||||
buf[bufIndex + 0] = px;
|
||||
buf[bufIndex + 1] = py;
|
||||
System.arraycopy(coords, 0, buf, bufIndex + 2, 4);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(coords, 0, buf, bufIndex + 2, 4);
|
||||
bufSubdiv = 0;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
// Realloc buffer
|
||||
if (bufIndex <= 4) {
|
||||
double tmp[] = new double[bufSize + BUFFER_CAPACITY];
|
||||
System.arraycopy(buf, bufIndex, tmp, bufIndex + BUFFER_CAPACITY, bufSize
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buf, bufIndex, tmp, bufIndex + BUFFER_CAPACITY, bufSize
|
||||
- bufIndex);
|
||||
buf = tmp;
|
||||
bufSize += BUFFER_CAPACITY;
|
||||
@@ -275,7 +275,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
bufIndex -= 8;
|
||||
buf[bufIndex + 0] = px;
|
||||
buf[bufIndex + 1] = py;
|
||||
System.arraycopy(coords, 0, buf, bufIndex + 2, 6);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(coords, 0, buf, bufIndex + 2, 6);
|
||||
bufSubdiv = 0;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
// Realloc buffer
|
||||
if (bufIndex <= 6) {
|
||||
double tmp[] = new double[bufSize + BUFFER_CAPACITY];
|
||||
System.arraycopy(buf, bufIndex, tmp, bufIndex + BUFFER_CAPACITY, bufSize
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buf, bufIndex, tmp, bufIndex + BUFFER_CAPACITY, bufSize
|
||||
- bufIndex);
|
||||
buf = tmp;
|
||||
bufSize += BUFFER_CAPACITY;
|
||||
|
||||
@@ -181,7 +181,7 @@ public final class GeneralPath implements Shape, Cloneable {
|
||||
}
|
||||
int type = p.types[typeIndex];
|
||||
int count = GeneralPath.pointShift[type];
|
||||
System.arraycopy(p.points, pointIndex, coords, 0, count);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(p.points, pointIndex, coords, 0, count);
|
||||
if (t != null) {
|
||||
t.transform(coords, 0, coords, 0, count / 2);
|
||||
}
|
||||
@@ -290,12 +290,12 @@ public final class GeneralPath implements Shape, Cloneable {
|
||||
}
|
||||
if (typeSize == types.length) {
|
||||
byte tmp[] = new byte[typeSize + BUFFER_CAPACITY];
|
||||
System.arraycopy(types, 0, tmp, 0, typeSize);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(types, 0, tmp, 0, typeSize);
|
||||
types = tmp;
|
||||
}
|
||||
if (pointSize + pointCount > points.length) {
|
||||
float tmp[] = new float[pointSize + Math.max(BUFFER_CAPACITY * 2, pointCount)];
|
||||
System.arraycopy(points, 0, tmp, 0, pointSize);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(points, 0, tmp, 0, pointSize);
|
||||
points = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -859,7 +859,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
||||
int j = i;
|
||||
i += 2;
|
||||
int[] newtemp = new int[j + 2*(pLen-i) + 2];
|
||||
System.arraycopy(temp, 0, newtemp, 0, j);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(temp, 0, newtemp, 0, j);
|
||||
|
||||
boolean inQuote = true;
|
||||
while (i < pLen) {
|
||||
@@ -1478,7 +1478,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
||||
private void append(int ch, int len) {
|
||||
if (len >= buffer.length) {
|
||||
int[] tmp = new int[len+len];
|
||||
System.arraycopy(buffer, 0, tmp, 0, len);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buffer, 0, tmp, 0, len);
|
||||
buffer = tmp;
|
||||
}
|
||||
buffer[len] = ch;
|
||||
@@ -3763,7 +3763,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
||||
void add(Node node) {
|
||||
if (size >= atoms.length) {
|
||||
Node[] tmp = new Node[atoms.length*2];
|
||||
System.arraycopy(atoms, 0, tmp, 0, atoms.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(atoms, 0, tmp, 0, atoms.length);
|
||||
atoms = tmp;
|
||||
}
|
||||
atoms[size++] = node;
|
||||
|
||||
@@ -463,14 +463,14 @@ public class MCLauncherActivity extends AppCompatActivity
|
||||
@Override
|
||||
public void onCharPrint(String s)
|
||||
{
|
||||
currentLog.append(s);
|
||||
currentLog.append(s + "\n");
|
||||
}
|
||||
});
|
||||
LoggerJava.LoggerOutputStream logErr = new LoggerJava.LoggerOutputStream(System.err, new LoggerJava.OnStringPrintListener(){
|
||||
@Override
|
||||
public void onCharPrint(String s)
|
||||
{
|
||||
currentLog.append(s);
|
||||
currentLog.append(s + "\n");
|
||||
}
|
||||
});
|
||||
System.setOut(new PrintStream(logOut));
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
import java.lang.reflect.*;
|
||||
|
||||
public class SystemCrackResolver
|
||||
{
|
||||
public static void arraycopy(Object src, int srcPos, Object dst, int dstPos, int length) {
|
||||
invoke("arraycopy", src, srcPos, dst, dstPos, length);
|
||||
}
|
||||
|
||||
public static void invoke(String method, Object... params) {
|
||||
Class[] classParams = new Class[params.length];
|
||||
for (int i = 0; i < params.length; i++) {
|
||||
classParams[i] = params[i].getClass();
|
||||
}
|
||||
try {
|
||||
Method methodObj = System.class.getDeclaredMethod(method, classParams);
|
||||
methodObj.setAccessible(true);
|
||||
methodObj.invoke(null, params);
|
||||
} catch (Throwable th) {
|
||||
throw new RuntimeException(th);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -383,12 +383,12 @@ public class LaunchClassLoader extends DexClassLoader {
|
||||
totalLength += read;
|
||||
if (totalLength >= buffer.length - 1) {
|
||||
byte[] newBuffer = new byte[(buffer.length + BUFFER_SIZE)];
|
||||
System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
|
||||
buffer = newBuffer;
|
||||
}
|
||||
} else {
|
||||
byte[] result = new byte[totalLength];
|
||||
System.arraycopy(buffer, 0, result, 0, totalLength);
|
||||
net.kdt.pojavlaunch.SystemCrackResolver.arraycopy(buffer, 0, result, 0, totalLength);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user