mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-10-05 20:35:27 -04:00
Android Studio compatibility
This commit is contained in:
1 parent
4ed0897ed7
commit
80c8aa6945
63 files changed
+803
-41
No files matched your search
@@ -2,13 +2,11 @@ package net.kdt.pojavlaunch;
|
||||
|
||||
public class CancelException extends RuntimeException
|
||||
{
|
||||
@Override
|
||||
public CancelException() {
|
||||
super();
|
||||
// org.lwjgl.c
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public CancelException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
@@ -421,8 +421,8 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
}
|
||||
} else {
|
||||
switch (e.getActionMasked()) {
|
||||
case e.ACTION_DOWN: // 0
|
||||
case e.ACTION_POINTER_DOWN: // 5
|
||||
case MotionEvent.ACTION_DOWN: // 0
|
||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
||||
isTouchInHotbar = hudKeyHandled != -1;
|
||||
if (isTouchInHotbar) {
|
||||
sendKeyPress(hudKeyHandled, true);
|
||||
@@ -444,9 +444,9 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case e.ACTION_UP: // 1
|
||||
case e.ACTION_CANCEL: // 3
|
||||
case e.ACTION_POINTER_UP: // 6
|
||||
case MotionEvent.ACTION_UP: // 1
|
||||
case MotionEvent.ACTION_CANCEL: // 3
|
||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
||||
if (!isTouchInHotbar) {
|
||||
AndroidDisplay.mouseX = x;
|
||||
AndroidDisplay.mouseY = y;
|
||||
@@ -543,17 +543,17 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
}
|
||||
|
||||
switch (e.getActionMasked()) {
|
||||
case e.ACTION_DOWN: // 0
|
||||
case e.ACTION_POINTER_DOWN: // 5
|
||||
case MotionEvent.ACTION_DOWN: // 0
|
||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
||||
AndroidDisplay.putMouseEventWithCoords(rightOverride ? (byte) 1 : (byte) 0, (byte) 1, x, y, 0, System.nanoTime());
|
||||
initialX = x;
|
||||
initialY = y;
|
||||
theHandler.sendEmptyMessageDelayed(MainActivity.MSG_LEFT_MOUSE_BUTTON_CHECK, 500);
|
||||
break;
|
||||
|
||||
case e.ACTION_UP: // 1
|
||||
case e.ACTION_CANCEL: // 3
|
||||
case e.ACTION_POINTER_UP: // 6
|
||||
case MotionEvent.ACTION_UP: // 1
|
||||
case MotionEvent.ACTION_CANCEL: // 3
|
||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
||||
AndroidDisplay.putMouseEventWithCoords(rightOverride ? (byte) 1 : (byte) 0, (byte) 0, x, y, 0, System.nanoTime());
|
||||
/*
|
||||
if (!triggeredLeftMouseButton && Math.abs(initialX - x) < fingerStillThreshold && Math.abs(initialY - y) < fingerStillThreshold) {
|
||||
@@ -740,13 +740,13 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
public boolean onTouch(View v, MotionEvent e) {
|
||||
boolean isDown;
|
||||
switch (e.getActionMasked()) {
|
||||
case TessState.T_DORMANT /*0*/:
|
||||
case AppletLoader.STATE_CHECKING_FOR_UPDATES /*5*/:
|
||||
case MotionEvent.ACTION_DOWN: // 0
|
||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
||||
isDown = true;
|
||||
break;
|
||||
case TessState.T_IN_POLYGON /*1*/:
|
||||
case AppletLoader.STATE_DETERMINING_PACKAGES /*3*/:
|
||||
case AppletLoader.STATE_DOWNLOADING /*6*/:
|
||||
case MotionEvent.ACTION_UP: // 1
|
||||
case MotionEvent.ACTION_CANCEL: // 3
|
||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
||||
isDown = false;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -33,7 +33,7 @@ public class VanillaTweakInjector implements IClassTransformer {
|
||||
ClassNode classNode = new ClassNode();
|
||||
new ClassReader(bytes).accept(classNode, 8);
|
||||
MethodNode mainMethod = null;
|
||||
for (MethodNode methodNode : classNode.methods) {
|
||||
for (MethodNode methodNode : (List<MethodNode>) classNode.methods) {
|
||||
if ("main".equals(methodNode.name)) {
|
||||
mainMethod = methodNode;
|
||||
break;
|
||||
@@ -43,7 +43,7 @@ public class VanillaTweakInjector implements IClassTransformer {
|
||||
return bytes;
|
||||
}
|
||||
FieldNode workDirNode = null;
|
||||
for (FieldNode fieldNode : classNode.fields) {
|
||||
for (FieldNode fieldNode : (List<FieldNode>) classNode.fields) {
|
||||
if (Type.getDescriptor(File.class).equals(fieldNode.desc) && (fieldNode.access & 8) == 8) {
|
||||
workDirNode = fieldNode;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user