public static void Apply()
{
// Add an inventory.onAddItem call if Game1.player.addItemToInventoryBool();
Harmony.Patch(
original: AccessTools.Method(typeof(ItemGrabMenu), nameof(ItemGrabMenu.receiveLeftClick)),
prefix: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.receiveLeftClick_Prefix))),
transpiler: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.receiveLeftClick_Transpiler)))
);
// Add an inventory.onAddItem call if Game1.player.addItemToInventoryBool();
Harmony.Patch(
original: AccessTools.Method(typeof(ItemGrabMenu), nameof(ItemGrabMenu.receiveRightClick)),
prefix: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.receiveRightClick_Prefix))),
transpiler: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.receiveRightClick_Transpiler)))
);
// Print console output on Android to see if this method is the problem.
Harmony.Patch(
original: AccessTools.Method(typeof(ItemGrabMenu), nameof(ItemGrabMenu.emergencyShutDown)),
prefix: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.emergencyShutDown_Prefix)))
//transpiler: new HarmonyMethod(AccessTools.Method(typeof(ItemGrabMenuPatches), nameof(ItemGrabMenuPatches.emergencyShutDown_Transpiler)))
);
}