feat: update patches to latest version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -29,10 +29,10 @@ class CodecsUnlockPatch : BytecodePatch(
|
||||
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val instructionIndex = result.scanData.startIndex
|
||||
val instructionIndex = result.scanResult.startIndex
|
||||
|
||||
result = signatures.last().result!!
|
||||
val codecMethod = data.toMethodWalker(result.immutableMethod).walk(result.scanData.startIndex).getMethod()
|
||||
val codecMethod = data.toMethodWalker(result.immutableMethod).walk(result.scanResult.startIndex).getMethod()
|
||||
|
||||
implementation.replaceInstruction(
|
||||
instructionIndex,
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class RemoveTasteBuilderPatch : BytecodePatch(
|
||||
val result = signatures.first().result!!
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val insertIndex = result.scanData.endIndex - 8
|
||||
val insertIndex = result.scanResult.endIndex - 8
|
||||
|
||||
val register = (implementation.instructions[insertIndex] as Instruction22c).registerA
|
||||
|
||||
|
||||
+5
-5
@@ -33,7 +33,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||
val implementation = result.method.implementation!!
|
||||
|
||||
val pivotBarElementFieldRef =
|
||||
(implementation.instructions[result.scanData.endIndex - 1] as Instruction22c).reference
|
||||
(implementation.instructions[result.scanResult.endIndex - 1] as Instruction22c).reference
|
||||
|
||||
val register = (implementation.instructions.first() as Instruction35c).registerC
|
||||
// first compile all the needed instructions
|
||||
@@ -48,14 +48,14 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||
|
||||
// replace the instruction to retain the label at given index
|
||||
implementation.replaceInstruction(
|
||||
result.scanData.endIndex - 1, instructionList[0] // invoke-interface
|
||||
result.scanResult.endIndex - 1, instructionList[0] // invoke-interface
|
||||
)
|
||||
// do not forget to remove this instruction since we added it already
|
||||
instructionList.removeFirst()
|
||||
|
||||
val exitInstruction = instructionList.last() // iput-object
|
||||
implementation.addInstruction(
|
||||
result.scanData.endIndex, exitInstruction
|
||||
result.scanResult.endIndex, exitInstruction
|
||||
)
|
||||
// do not forget to remove this instruction since we added it already
|
||||
instructionList.removeLast()
|
||||
@@ -64,12 +64,12 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||
instructionList.add(
|
||||
2, // if-le
|
||||
BuilderInstruction22t(
|
||||
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(result.scanData.endIndex)
|
||||
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(result.scanResult.endIndex)
|
||||
)
|
||||
)
|
||||
|
||||
implementation.addInstructions(
|
||||
result.scanData.endIndex, instructionList
|
||||
result.scanResult.endIndex, instructionList
|
||||
)
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user