Revert "pull request #Revert from open-osrs/Revert
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "change scriptvm to be more reliable""
This commit is contained in:
@@ -18,7 +18,7 @@ plugins {
|
||||
val oprsver = "3.3.1"
|
||||
|
||||
group = "com.openosrs"
|
||||
version = "1.1.3"
|
||||
version = "1.1.4"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -26,6 +26,7 @@ repositories {
|
||||
maven {
|
||||
url = uri("https://repo.runelite.net")
|
||||
url = uri("https://raw.githubusercontent.com/open-osrs/hosting/master")
|
||||
url = uri("https://repo.openosrs.com/repository/maven")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,12 +109,12 @@ public class ScriptVM extends AbstractInjector
|
||||
final Field scriptInstructions = InjectUtil.findField(inject, "opcodes", "Script");
|
||||
final Field scriptStatePC = InjectUtil.findField(inject, "pc", "ScriptFrame");
|
||||
|
||||
// Next 4 should be injected by mixins, so don't need fail fast
|
||||
final ClassFile vanillaClient = vanilla.findClass("client");
|
||||
|
||||
// Next 4 should be injected by mixins, so don't need fail fast
|
||||
final Method runScript = vanillaClient.findStaticMethod("copy$runScript");
|
||||
final Method vmExecuteOpcode = vanillaClient.findStaticMethod("vmExecuteOpcode");
|
||||
final Field currentScriptField = vanillaClient.findField("currentScript");
|
||||
final Method setCurrentScript = vanillaClient.findStaticMethod("setCurrentScript");
|
||||
final Field currentScriptPCField = vanillaClient.findField("currentScriptPC");
|
||||
|
||||
Execution e = new Execution(inject.getVanilla());
|
||||
@@ -242,7 +242,7 @@ public class ScriptVM extends AbstractInjector
|
||||
{
|
||||
instrIter.previous();
|
||||
instrIter.add(new Dup(instrs));
|
||||
instrIter.add(new PutStatic(instrs, currentScriptField));
|
||||
instrIter.add(new InvokeStatic(instrs, setCurrentScript.getPoolMethod()));
|
||||
instrIter.next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user