fix: make all patches toggleable with settings (#202)

This commit is contained in:
TheJeterLP
2022-07-18 22:59:21 +02:00
committed by GitHub
parent 4ee40a954f
commit 6b515dd59e
7 changed files with 79 additions and 55 deletions
@@ -127,6 +127,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
if (mutableMethod == null) mutableMethod =
mutableClass!!.findMutableMethodOf(method)
//ToDo: Add Settings toggle for whatever this is
mutableMethod!!.implementation!!.removeInstruction(removeIndex)
}
@@ -186,6 +187,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch() {
// return the method
val insertIndex = 1 // after super constructor
//ToDo: Add setting here
mutableMethod!!.implementation!!.addInstruction(
insertIndex, BuilderInstruction10x(Opcode.RETURN_VOID)
)